HTML & CSS Masterclass Tutorial

Comprehensive guide to modern HTML and CSS development.

Document Structure

Semantic Document Structure

In the past, developers used <div> for everything. HTML5 introduced semantic tags that describe their meaning to both the browser and the developer.

Key Semantic Elements:

  • <header>: Introductory content, usually containing the logo and navigation.
  • <nav>: Navigation links.
  • <main>: The primary content of the document.
  • <section>: A thematic grouping of content.
  • <article>: A self-contained, independent piece of content (like a blog post).
  • <aside>: Sidebar content.
  • <footer>: The bottom of the page, containing copyrights and links.

Using semantic HTML is crucial for SEO (Search Engine Optimization) and Accessibility for screen readers.

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics