start learning
Image 1
320989695

HTML Aside tag

The HTML <aside> tag is used to mark content that is tangentially related to the main content of a web page. It's often used to enclose content that is considered to be a sidebar, a pull quote, advertising, or any content that is not an essential part of the primary content but still provides additional context or information.

Here's an example of how the <aside> tag can be used in an HTML document:


<!DOCTYPE html>
<html>
<head>
    <title>Sample Page</title>
</head>
<body>
      <header>
        <!-- Header content here including h1 title-->
    </header>
 <main>
        <article>
            <h2>Article Title</h2>
            <p>This is the main content of the article...</p>
        </article>

        <aside>
            <h2>Related Links</h2>
            <ul>
                <li><a href="#">Link 1</a></li>
                <li><a href="#">Link 2</a></li>
                <li><a href="#">Link 3</a></li>
            </ul>
        </aside>
    </main>
<footer>
        <!-- Footer content here -->
    </footer>
</body>
</html>

In this example, the <aside> tag is used to contain related links that are not directly part of the main article content. These links provide additional information but are not essential to understanding the main article.

Using the <aside> tag helps provide semantic structure to your HTML document and informs both human readers and search engines that the content within the <aside> element is not crucial to the main content but provides supplementary information or context. This can improve the organization of your page and help assistive technologies better convey the relationships between different content sections.

×