Semantic Elements represent their meanings to both the developer and the browser. The tag in the code tells the developer and the browser what to do. It defines the different sections and layout of web pages, which makes HTML more easily understandable.
In HTML, there are some semantic elements used to define when developing the frontend of the web pages.
Below are some examples of semantic tags:
<article>
element specifies the independent, self-contained content.<nav>
element defines a set of navigation links.<aside>
element represents sidebars or call-out boxes.<section>
element represents a section of the document.<details>
tag specifies the tag for additional details.<header>
tag represents a container for introductory content or a set of navigational links.<footer>
tag defines a footer for a document or section.<main>
tag specifies the main page.Non-semantic elements are similar to semantic elements, but they do not have any meaningful content. They can be used with different attributes to mark up semantics usual to a group.
<div>
tag is used to make the division of content in the web pages.<span>
tag is an inline container used to mark up a part of a document or a part of the text.