How would I link identical HTML used in several pages, instead of adding the same markup in all of the several pages.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do this using an
iframeon each of the several pages, with thesrcbeing the common HTML.It also is possible on the client-side using javascript. jQuery makes this particularly easy providing a
loadmethod. You can usejQuery.load()to add an HTML block into elements across different HTML pages.As an example, if every one of the pages has an
divnamedcontent:Then you could do this in each page: