HTML5 Content Structure


https://www.semrush.com/blog/semantic-html5-guide/





https://wordpress.stackexchange.com/questions/323221/allowing-webp-uploads

https://developers.google.com/speed/webp/
https://gulshankumar.net/how-to-serve-webp-format-images-in-wordpress/
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nunc leo, fringilla vel laoreet eget, auctor sed lorem. Pellentesque a condimentum dolor. In laoreet nunc sit amet sem commodo tempor. Fusce sodales sagittis sollicitudin. Morbi diam enim, mattis vel cursus eu, pellentesque id ex. Etiam diam magna, euismod nec felis vel, dignissim facilisis massa. Cras vulputate egestas odio, vitae tristique nulla aliquam ac. Aenean id aliquet ante, vitae blandit massa.

Sed dignissim feugiat nulla. Suspendisse tincidunt a massa nec gravida. Phasellus sit amet dolor eget ipsum rhoncus laoreet. Vestibulum aliquam, mi in tempor facilisis, urna ante porttitor orci, quis tristique nisl elit eu libero. Suspendisse maximus pellentesque orci, sit amet dictum nisi cursus non. Nullam vitae pharetra metus, quis molestie augue. Phasellus ut mi facilisis, dignissim arcu et, luctus tellus. Maecenas at feugiat ex. Ut tempus dui mauris, ac pretium augue mollis eu. Donec condimentum neque eget ante convallis, ut lacinia tellus malesuada. Mauris consequat purus pulvinar volutpat tristique. Proin tristique eu nisi et hendrerit. Praesent tempor erat eget vulputate gravida.

Vivamus facilisis enim pellentesque, euismod lectus sed, iaculis metus. Donec maximus augue nunc, sit amet luctus nisi efficitur non. Phasellus dictum quis ante eget interdum. Sed efficitur, leo at aliquam condimentum, dolor metus hendrerit odio, at accumsan nisi neque at magna. Maecenas sit amet aliquam orci. Nullam metus lacus, bibendum non enim ac, mattis mollis nisl. Maecenas dolor diam, tincidunt ac faucibus pulvinar, convallis non mi. Cras vehicula velit ut convallis sollicitudin. Sed egestas dolor vitae porttitor vulputate. Sed velit quam, bibendum eu nunc a, faucibus euismod dolor. Nunc ultricies in metus id interdum.

Pellentesque sem purus, elementum non ultrices efficitur, imperdiet quis ligula. Nullam vel mollis justo, ac malesuada purus. Suspendisse faucibus arcu ut ipsum consequat accumsan. Pellentesque quis mi quis justo pharetra dignissim. Curabitur rhoncus augue orci, sit amet varius tellus egestas eu. Nam elementum porta massa, et efficitur risus ultrices quis. Nunc sodales varius ligula, et mattis quam consequat sit amet

Sed pellentesque, magna ut elementum egestas, nunc mauris semper est, sed euismod magna tellus ac est. Etiam hendrerit metus vitae euismod laoreet. Morbi enim turpis, consequat et cursus sit amet, congue maximus lectus. In viverra euismod mi, vitae tempus metus ultricies vitae. Cras non fermentum felis. Vestibulum lacinia lacus at lacus ullamcorper feugiat. Curabitur elementum pretium fringilla. Aliquam a convallis erat, in egestas diam. Sed non leo porta nunc sagittis ornare in fringilla elit. Suspendisse convallis aliquam mollis. Donec auctor lorem at tempus rutrum. Morbi finibus arcu sapien, ac rutrum sem lobortis eu. Proin eget malesuada urna, vulputate finibus turpis.


semrush.com/blog/semantic-html5-guide

What does it look like?

Examples of semantic HTML tags include <nav>, <footer> and <section>. There are many more semantic HTML5 tags that can be used (for example <blockquote> and <em>), but in this article I am only looking at those semantic HTML tags that you will need to divide the page content into its basic parts.

The following HTML5 tags can be used in the place of <div> tags to break your page content into identified parts each of which fulfills a specific role. As you can imagine, machines like Google and Bing LOVE this.

This clear delimitation and explicit attribution of roles to each part of the content makes the page much clearer and easier to index correctly for Google and Bing.

NB Since these tags all behave exactly like <div> tags they can simply replace existing <div>s in the page without affecting the layout. In a lot of cases implementing semantic HTML5 can be as easy as finding the correct pair of <div> and </div> and replacing them.

Examples of Semantic HTML5

Super simple semantic HTML5 Example:

Here we have simply defined what role each part of the page plays. When you start applying HTML5, this is a safe place to start – header, nav, main, footer.

It is better to have a super simple implementation that is 100% correct, rather than a complex implementation that is incorrect.

An inaccurate implementation sends conflicting and confusing signals which will make things worse, not better.

A simple and correct implementation is already a big step forward in your communication with Google and Bing. Don’t be overly ambitious; get it wrong, and you could create more problems than you solve!

More Complex Examples

Using sections and articles:

Here we have made a hierarchy within our main content. There is an all-encompassing article that identifies the central content within the main tag. This gives an overview of the topic of that part of the page. Within that article, we have multiple sub-topics that develop the main topic that is identified by the nested sections.

Notice that the design (the orange blocks) are not being used to define the semantic areas of the page. Looks a little confusing, but shows well that layout HTML and semantic HTML5 have distinct roles.

In the real world, the semantic markup often follows the layout more than this example. General rule: A section forms part of something else. An article is its own thing.

Also note, that here I added a nav section to the footer. Logically, just like the header, the footer contains navigational elements.

Here we have added two pieces of directly related content to the principal article of content. Using asides, we indicate that the related content (aside) is optional. The principal section of content can be shown without the aside(s) and still be understood.

Note: an aside does not have to be a sidebar beside the main content. It can also be used for blocks below the main content containing a title, text, and link to another page

Here we have identified some indirectly related content to the page, outside the principal article of content. Here we indicate that the content in the aside is not directly related to the principal article.

That is enough for most needs.

Our final version

Helpful Tips

Section vs. Article

There is much discussion about this. There is no fixed rule about sections and articles, and their implementation is pretty flexible. They are more or less the same and can be used interchangeably most of the time. Just be sure to be logical and consistent.

Personal tip: I have found that nesting sections inside an article of content is both logical for a machine, but also for a human (the HTML code will be easier to read for the developer).

Nesting Elements

Elements can nest other elements. For example, an article can have its own <header>, <footer>, <h2> (as seen above), and even <nav> (anchor links, are a good example). I have not given an illustration of this “super nesting’, and there is a reason for that: This is an SEO blog and, from an SEO standpoint, there is no real benefit from pushing the logic of semantic HTML5 this far.

As mentioned above, for SEO purposes, you should concentrate on providing a solid, simple structure.

What NOT to Do

Just a warning – I have seen many sites using the visual design as a guide for their HTML5 implementation. As seen above, this is not what semantic HTML5 is designed for.

This (surprisingly typical) example simply duplicates the visual layout. Worse than pointless, this indicates that the page contains 4 different topics, rather than one topic and 3 sub-topics. Explicitly providing misleading information to the machines will have a negative impact on its understanding.


Scroll to Top