Hi,
Please provide me feedback on this project. Here is the link to the code.
Codepen: Structuring a page of content
Thanks.
Girish
Hi,
Please provide me feedback on this project. Here is the link to the code.
Codepen: Structuring a page of content
Thanks.
Girish
Hi again @girish.2500
Nicely done!
There’s just one thing. Do you remember what I said about the <header>
element in your other topic? One of the three <header>
elements is correct and the other two aren’t.
Do you know what I mean?
See you,
Michael
Hi Michael,
I remember you mentioned that <header>
includes everything on the top of the page including navigational elements, logo etc, not just for <h1> tag.
However, the reference page for <header>
uses it for <article>
as well.
Reference : Header
Also, HTML validator does not give error, with or without <header>
.
Thanks for the additional research.
It’s indeed valid HTML to use <header>
at other places than just the top part of the page. Where I see the problem when using <header>
just around a single <h1>
is that it doesn’t add any useful information. As you can see on the <header>
article, the element groups the title and the date. Another similar use case would be when you add various social media icons next to the title to let the reader share the story. And you would then group the title with the icons in a <header>
. Kind of an introductory part to your article.