
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, unique to the document and excluding content that is 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 of content.<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 information such as copyright information, links to related documents, and the author of the document.<figure>
– Defines a self-contained unit of content, such as images, charts, or code snippets.<figcaption>
– Defines a caption for a<figure>
element.<mark>
– Defines marked/highlighted text.
By using these semantic elements, web developers can create more meaningful and accessible websites that are easier to understand and navigate for users and search engines alike.