HTML Semantic Elements

HTML Semantic Elements

Semantic Elements

  1. <article>
  2. <aside>
  3. <details>
  4. <figcaption>
  5. <figure>
  6. <footer>
  7. <header>
  8. <main>
  9. <mark>
  10. <nav>
  11. <section>
  12. <summary>
  13. <time>

<section> Element

Section Element

Level1

some text

Level2

some more text

html
<!DOCTYPE html>
<html>

<haed>
  <title>Section Element</title>
</haed>

<body>

<section>
  <h1>Level1</h1>
  <p>some text</p>
</section>

<section>
  <h1>Level2</h1>
  <p>some more text</p>
</section>

</body>
</html>

<article> Element

Article Element

Weather forecast

26 July 2025

Rain.

27 July 2025

Light rain.

28 July 2025

Heavy rain.

html
<!DOCTYPE html>
<html>

<head>
  <title>Article Element</title>
</head>

<body>

<article>
  <h3>Weather forecast</h3>
  <article>
    <h2>26 July 2025</h2>
    <p>Rain.</p>
  </article>
  <article>
    <h4>27 July 2025</h4>
    <p>Light rain.</p>
  </article>
  <article>
    <h4>28 July 2025</h4>
    <p>Heavy rain.</p>
  </article>
</article>

</body>
</html>