Answer the question
In order to leave comments, you need to log in
What tools are there to set the header and footer for all pages in one file during layout?
What tools are there to set the header and footer for all pages in one file during layout?
Answer the question
In order to leave comments, you need to log in
1. Building on the server from different files
2. Using SSI
3. Using project build systems like Grunt / Gulp (preferred)
You can use HTML import , but you need to know a little about JavaScript: https://learn.javascript.ru/link-import
If you use only html , there is one "so-so" way:
index.html
<!doctype html>
<html lang='ru' ><body>
<div id='header' >
<a href='/' >Главная</a>
<a href='/page1.html' target='niframe' >Страница 1</a>
<a href='/page2.html' target='niframe' >Страница 2</a>
</div>
<iframe name='niframe' ></iframe>
<div id='footer' >...</div>
</body></html>
<!doctype html>
<html lang='ru' ><body>
<div id='header' >
<a href='/' >Главная</a>
<a href='/page1.html' >Страница 1</a>
<a href='/page2.html' >Страница 2</a>
</div>
<div id='footer' >...</div>
</body></html>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question