Can a web page contain multiple <header> elements? And what about <footer> elements? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Can a web page contain multiple <header> elements? And what about <footer> elements?

2nd Jul 2017, 1:25 AM
Elena
Elena - avatar
4 Answers
+ 7
You can use multiple <header> and <footer> in only one page, since it's semantically right: the page (<body>) itself should contain only one of each at direct child, but you can use other ones in specific containers as <article> which can have semantical <header> and <footer> attached (direct child) of them ^^
2nd Jul 2017, 4:04 AM
visph
visph - avatar
+ 4
Yes it can, but the search engines will be confuse I think.. Because <header> and <footer> elements have semantic importance.. therefore, you should use it wisely like the <strong> tag and <em> tag. The search engines recognizes them.
2nd Jul 2017, 2:02 AM
Marco Macdon
Marco Macdon - avatar
+ 2
Each webpage should be contain one header and one footer.
2nd Jul 2017, 2:00 AM
Calviղ
Calviղ - avatar
+ 1
Both the <header> and <footer> tags are designed to serve their respective purposes in relation to whatever their parent “section” may be. So not only can the page <body> contain a header and a footer, but so can every <article> and <section> element. In fact, a <header> should be present for all of these, although a <footer> is not always necessary.
3rd Jul 2017, 1:57 AM
Elena
Elena - avatar