Semantic HTML

 Semantic HTML


Semantic HTML - In addition to the basic tags used to define the structure of a web page, HTML also provides a set of semantic tags that describe the meaning of the content they contain. Examples of semantic tags include <header>, <nav>, <main>, <article>, <section>, and <footer>. By using these tags, you can create web pages that are more accessible and easier to understand for both humans and machines.


<header>

  <h1>My Website</h1>

  <nav>

    <ul>

      <li><a href="/">Home</a></li>

      <li><a href="/about">About</a></li>

      <li><a href="/contact">Contact</a></li>

    </ul>

  </nav>

</header>


<main>

  <article>

    <h2>Article Title</h2>

    <p>This is some article content.</p>

  </article>


  <section>

    <h2>Section Title</h2>

    <p>This is some section content.</p>

  </section>

</main>


<footer>

  <p>&copy; 2023 My Website</p>

</footer>

No comments:

Post a Comment

The Importance of Cybersecurity in the Digital Age

 The Importance of Cybersecurity in the Digital Age Introduction: In today's digital age, where technology is deeply intertwined with ev...