HTML Semantic

What is HTML Semantic:

Semantic HTML is about using the "right" HTML tags to describe the type and purpose of your content.

It's not how things look, but what they mean. A <button> is for clicking, an <h1> is the main heading, etc.


Common Semantic Elements

Headers: <h1>, <h2>, etc. show hierarchy of sections

Navigation: <nav> marks your site's main navigation links

Main Content: <main> wraps the primary focus of the page

Articles and Sections: <article>, <section> organize content into self-contained chunks

Aside: <aside> holds related but not essential content (like sidebars)

Footer: <footer> for copyright info, small links, etc.