Assessment required for "Structuring a page of content


Please provide me feedback on this project. Here is the link to the code.
Codepen: Structuring a page of content



1 Like

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? :slightly_smiling_face:

See you,

1 Like

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>.


1 Like


It is optional.

So, You may or may not use it It depends.

1 Like

Thanks for the additional research. :+1:

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.

1 Like