HTML5 introduced a set of semantic elements that provide meaning to the structure of web content. These elements are used to define the different parts of a web page, such as the header, footer, navigation, main content, and more.
Here are some of the most commonly used HTML5 semantic elements:
<header>
– Defines the header of a document or section. It typically contains the logo, site title, and navigation links.<nav>
– Defines a section of navigation links.<main>
– Defines the main content of a document that is unique to the document and excludes content repeated across a set of documents such as site navigation, header, or footer.<article>
– Defines a standalone, self-contained article, such as a blog post or news story.<section>
– Defines a distinct section of content, such as chapters, headers, footers, or any other thematic grouping.<aside>
– Defines content aside from the main content, such as sidebars, pull quotes, or advertisements.<footer>
– Defines the footer of a document or section. It typically contains copyright information, links to related documents, and the document’s author.<figure>
– Defines a self-contained content unit, such as images, charts, or code snippets.<figcaption>
– Defines a caption for a<figure>
element.<mark>
– Defines marked/highlighted text.
Using these semantic elements, web developers can create more meaningful and accessible websites that are easier for users and search engines to understand and navigate.