Reputation: 11
Can I just used body and just format it properly in CSS? It just seems like it would be easier to not need header and footer.
Upvotes: 0
Views: 2439
Reputation: 258
Yes, you can but see in HTML5 A semantic element clearly describes its meaning to both the browser and the developer.
non-semantic elements: <div> and <span>
- Tells nothing about its content.
semantic elements: <header> and <footer>
- Clearly defines its content.
And if you are asking about <head>
tag
In HTML 4.01 the <head>
element is required.
In HTML5, the <head>
element can be omitted.
Upvotes: 1
Reputation: 1918
It is not mandatory to use header and footer even there were not html tag header or footer before HTML5.
Header and footer gives option to manage whole html tree in more structured way but it is not mandatory to use.
Upvotes: 0
Reputation: 4552
Well, you certainly don't need <header>
and <footer>
elements (they were only added in HTML5 anyways). The idea is to help semantic analyzers of web pages (everything from search engines to screen readers) distinguish what is the "content" of a page and what is the navigation and other information.
Note that the <header>
tag is completely different from the <head>
tag, which you probably do want.
Upvotes: 0