Understanding Semantic Tags
Semantic tags aren’t just about styling—they provide structure, clarity, and meaning. Instead of using non-descriptive
<div> elements everywhere, you use semantic tags to help browsers, search engines, and screen readers
understand the layout and hierarchy of your content.
<header>– Contains introductory content or navigation links.<nav>– Defines a block of navigational links.<main>– Specifies the main content of the document that is unique from other pages.<section>– Groups content into thematic sections with a header, often with their own heading.<article>– Encapsulates a self-contained composition that can be independently distributed or reused.<aside>– Contains content indirectly related to the main content, like sidebars or call-out boxes.<footer>– Provides information about its containing section, such as author info or related documents.
By using these elements, your HTML becomes more readable, accessible, and easily maintained.