HTML <aside> Tag

In this post, we will talk about Tag Aside. Aspiring to meet the demands of learning.

The HTML <aside> tag is used to define content that is tangentially related to the main content on a webpage. The <aside> tag is typically used for content such as sidebars, callouts, or related content that is not the main focus of the page.

HTML <aside> Tag Uses

Here are some common use cases for the <aside> tag:

  • The <aside> tag can be used to define a sidebar that contains secondary content, such as a list of recent posts, advertisements, or related content.
  • The <aside> tag can be used to define a callout box that contains additional information related to the main content of the page, such as a definition, a quote, or a related news item.
  • The <aside> tag can be used to define a section of related content, such as links to other articles, products, or services that may be of interest to the reader.
  • The <aside> tag can be used to define an advertisement that is not the main focus of the page.
  • The <aside> tag can be used to define an author bio that contains information about the author of the content on the page.

Include some additional content besides those placed in Tag Aside:

Example: 

<!DOCTYPE html> <html> <body> <p>My friends and I visited Yellowstone National Park this summer. The weather was nice, and Yellowstone was amazing! I had a great summer together with my friends!</p> <aside> <h4>Yellowstone National Park</h4> <p>In the west of the country, Yellowstone National Park is one of the most well-known national parks, Wildlife and geothermal features are among the park's many attractions</p> </aside> </body> </html>

Tag <aside> elements can be styled with CSS as follows:

Example

<!DOCTYPE html> <html> <head> <style> aside { width: 33%; padding-left: 12px; margin-left: 12px; float: right;font-style: italic; background-color: lightblue; } </style> </head> <body><h1>The aside element</h1><aside> <p>In the west of the country, Yellowstone National Park is one of the most well-known national parks, Wildlife and geothermal features are among the park's many attractions</p> </aside><p>My friends and I visited Yellowstone National Park this summer. The weather was nice, and Yellowstone was amazing! I had a great summer together with my friends!</p><p>My friends and I visited Yellowstone National Park this summer. The weather was nice, and Yellowstone was amazing! I had a great summer together with my friends!</p> </body> </html>

Here is an example of aside tag with the article tag:

Example: 

<!DOCTYPE html> <html> <head> <style> aside { background-color: yellow; padding: 10px; margin-top: 20px; border-radius: 5px; } aside h3 { margin-bottom: 10px; } aside li { list-style-type: none; margin-bottom: 5px; } </style> </head> <body> <article> <h2>Google unveils new AI-powered Smart Home Platform</h2> <p>Google has announced the release of their new smart home platform, powered by artificial intelligence. The platform allows users to control all their smart home devices through a single app and it also features voice control with Google Assistant.</p> <p>The platform is compatible with a wide range of smart home devices, including lights, thermostats, and security systems.</p> <aside> <h3>Other Tech News</h3> <ul> <li>Tesla Autopilot gets major update</li> <li>5G rollout accelerates in major cities</li> <li>AI shows promise in medical research</li> </ul> </aside> </article> </body> </html>


Uses and Definition

Tag Aside <aside> indicates some content separate from the content it belongs to.

Content, in an aside, should be indirectly related to the content in the preceding paragraphs.

Advice: <aside> content is typically part of a sidebar in a document.

IMPORTANT: The <aside> element does not display differently from other elements. As an alternative, you can style <aside> elements using CSS.


Global Attributes

In HTML, the <article> Tag accepts Global Attributes as well.


Event Attributes

In HTML, the <article> Tag accepts Event Attributes as well.


Browser Compatibility

In the following table, the numbers indicate the version of the browser that is compatible with the element in the Tag Aside.

Element
<aside>6.09.04.05.011.1

CSS settings by default

The majority of browsers display the <aside> element utilizing the default values for Tag Aside:

aside {
display: block;
}


HTML <aside> Tag

Here are some of the benefits of using the <aside> tag:

  • Using <aside> tag to define content that is related to but not essential to the main content can make it easier for people using screen readers or other assistive technologies to understand the content and context of the page.
  • By separating tangentially related content from the main content of the page using the <aside> tag, the main content becomes more focused and easier to read.
  • The <aside> tag can be used to include additional content or features on the page, such as social media feeds, ads, or links to related content, without distracting from the main content.
  • By using the <aside> tag to wrap secondary content, search engines can better understand the structure and hierarchy of the content on the page, which can improve the page’s visibility and ranking in search results.
  • Using the <aside> tag can help to organize content on a webpage, making it easier to navigate and understand.
Do leave your reaction below in order to appreciate our efforts or to suggest some efforts for the betterment of this site.
We value your feedback.
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Subscribe To Our Newsletter
Enter your email to receive a weekly round-up of our best posts. Learn more!
icon

Leave a Reply

Your email address will not be published. Required fields are marked *