Is it possible to have a regular html page inherit its layout from another html page? If so, what is the most advisable approach for doing this? I know that aspx uses .master pages to hold the elements common to all pages in the site.
Asked
Active
Viewed 7,599 times
4
-
Can you not just use a CSS file? – OdinX Dec 01 '11 at 10:23
-
Are you referring to they layout of the page content, or to some content which acts as a template for the pages on your site? – Shaun Bouckaert Dec 01 '11 at 13:12
-
I meant as a template for for the other pages in the website. – Anna Lam Dec 01 '11 at 19:37
2 Answers
3
You could fetch resources using JS and AJAX if you absolutely cannot use a serverside language.
how can we avoid header and footer code repeating in each html pages
Jekyll works too: What is the best way to manage duplicate code in static HTML websites

Community
- 1
- 1

tekknolagi
- 10,663
- 24
- 75
- 119
0
You could also use get variables and php functions to create and display the content dynamically and avoid using more that one HTML

Carlos Arturo Alaniz
- 418
- 3
- 11