10 Secrets to Unlocking All Tags Availble in HTML5 and Define In

   10 Secrets to Unlocking All Tags Availble in HTML5 and Define In


In HTML5, there are various tags available for structuring and organising content on a web page. Below, I'll provide an overview of some commonly used tags along with their definitions, demonstrated using headings and titles:


<header>:

  • Definition: Defines a header for a document or a section.

  • Example:


<header>

    <h1>This is the Main Heading</h1>

    <h2>Subheading 1</h2>

</header>


<nav>:

  • Definition: Defines a set of navigation links.

  • Example:


<nav>

    <ul>

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

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

        <li><a href="#">Services</a></li>

    </ul>

</nav>


<section>:

  • Definition: Defines a section in a document.

  • Example:

<section>

    <h2>Section Title</h2>

    <p>This is the content of the section.</p>

</section>


<article>:

  • Definition: Defines an independent, self-contained piece of content.

  • Example:


<article>

    <h2>Article Title</h2>

    <p>This is the content of the article.</p>

</article>


<aside>:

  • Definition: Defines content aside from the content (like a sidebar).

  • Example:


<aside>

    <h3>Related Links</h3>

    <ul>

        <li><a href="#">Link 1</a></li>

        <li><a href="#">Link 2</a></li>

    </ul>

</aside>


<footer>:

  • Definition: Defines a footer for a document or a section.

  • Example:


<footer>

    <p>&copy; 2024 Your Website</p>

</footer>


<main>:

  • Definition: Defines the main content of a document.

  • Example:

<main>

    <h1>Main Content Heading</h1>

    <p>This is the main content of the webpage.</p>

</main>


<header> (inside <article>):

  • Definition: Header for an article.

  • Example:


<article>

    <header>

        <h2>Article Title</h2>

        <p>Written by John Doe</p>

    </header>

    <p>This is the content of the article.</p>

</article>


These are just some of the many tags available in HTML5 for structuring content. Each tag serves a specific purpose in organising and presenting information on a web page.




No comments: