How to use only once | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to use only once

How to use one elemnt (header,footer etc.) in every page?For example: I will write footer or header section on another html file...So it must be displayed for example in 50 pages.

22nd Jun 2018, 9:07 AM
Fury
3 Answers
0
There are lots of ways to accomplish this. I would select my approach depending on the type of content on these 50 pages as each approach has trade-offs to consider. What would be on your 50 pages, Fury?
22nd Jun 2018, 10:10 AM
Janning
Janning - avatar
0
news lifehacks etc.
22nd Jun 2018, 10:45 AM
Fury
0
You should use backend (in php, c#, java etc.) to generate dinamic pages, using the templates you have created. E.g. if your backend is written in php and you have made a header and saved it into file "header.php", you should put: include 'header.php' before the page main contents.
22nd Jun 2018, 12:13 PM
Дмитро Іванов
Дмитро Іванов - avatar