Type something to search...

HTML Semantic Elements

HTML Semantic Elements

Semantic elements clearly define the role of content on a web page, improving structure and accessibility. Examples include <header>, <footer>, <article>, and <section>.

Example:

<header>
  <h1>Welcome to My Website</h1>
</header>
<section>
  <article>
    <h2>Article Title</h2>
    <p>This is an article.</p>
  </article>
</section>
<footer>
  <p>&copy; 2023 My Website</p>
</footer>

Benefits of Semantic Elements:

  1. Improved Accessibility: Helps screen readers understand the structure of the page.
  2. Better SEO: Search engines can better understand the content.
  3. Cleaner Code: Makes the code easier to read and maintain.

Next Steps

In the next tutorial, we will explore HTML Best Practices, where you will learn how to write clean, maintainable, and accessible HTML code.

Next: HTML Best Practices →