Aside Tag in HTML

The HTML <aside> tag provides information about the main content. It represents content that forms the main textual flow of a document.

It is used to bring out extra information to users to know important points about the article or the web page, but it is unnecessary for the page. It can also be used to write highlights of the web page. It is mostly used to represent sidebars. It explains something associated with the content present on the web page.

The content inside the <aside> tag looks like the content inside other HTML tags, so it isn't easy to differentiate between the content of the <aside> tag and some other HTML tags. We can use Cascading Style Sheets to make the different appearance of the content written inside the <aside> tag.

We will see the placement of the <aside> tag in semantic HTML, which is given below:

Aside Tag in HTML

Semantic HTML refers to the HTML tags describing the meaning of the content inside the tags.

Aside means to one side, and you can see that the <aside> tag in HTML is used on the side of the web page, so it conveys the same meaning as its name. Depending on your web page design, it can be on the right or left side so you can place the <aside> tag on the right or left.

Syntax of the <aside> Tag:

The <aside> is the opening tag, and the </aside> is the closing tag in the above syntax. The heading and paragraph tags are used inside the <aside> tag to add important information about the main content. The <h4> is the opening tag, and the </h4> is the closing tag of the heading used to denote the heading. The <p> is the opening tag, and the </p> is the closing tag used to denote the paragraph.

Examples of the HTML <aside> Tag

We will comprehend the HTML <aside> tag with the help of the following examples.

Example 1:

We will see the use of <aside tag> in this example.

Code:

Output:

It is a simple use of the <aside> tag to provide additional information to web page users.

Aside Tag in HTML

Example 2:

We will use the CSS to make the <aside> tag recognizable in this example.

Code:

Output:

The <aside> tag is easily recognizable in this example using the CSS.

Aside Tag in HTML

Example 3:

Let us see one more example to show the use of <aside tag>, and we will also use CSS to give <aside> tag a style.

Code:

Output:

The <aside> tag can be seen clearly on the right side of the web page as it is easily identifiable with the help of the CSS and provides additional information about the main content on the web page.

Aside Tag in HTML

HTML aside tag also supports global and event attributes in HTML.

Supporting Browsers

Here are the browsers that support the <aside> tag:

  • Google Chrome
  • Firefox
  • Internet Explorer
  • Opera
  • Safari

Next TopicHTML audio tag




Latest Courses