I wanted to start using HTML 5 semantics for a header on my site, however when I looked into some documentation, I wasn't necessary sure that the <header> tag could be used for my site header which would occupy the <nav> property. Is that what header could be used for instead of the classical <div id='header'>?
3 Answers
The element represents a container for introductory content or a set of navigational links
So it means that some browsers and search engines may look at your <header> element and interpret it with some meaning.
<div id="header"> - there is block element with no additional meaning.
2 Comments
If you use the <header> syntax, the browser knows that it is reading a header. If you want to use the HTML5 syntax I recommend you use the header tag.
<header>would be where you put a header. Did you try? Did something not work as expected?<nav>,<header>and<div>are all different elements. Each has their own set of rules. Read them here: w3schools.com/html/html5_semantic_elements.asp