aside tag in HTML5
- 24-07-2022
- Trung Minh
- 0 Comments
In this article, I would like to introduce the aside tag in HTML5, this is a commonly used tag on the HTML5 interface.
I also don't know what people create this card for, but if you consider the meaning of it, which positions are on the side, the aside card will be used. This also depends on the habits of each person.
1. What is aside tag in HTML5?
Aside translates into English as one side , used in side-lying positions such as the sidebar. These placements usually have content related to the current topic of the article.
You should not place the aside tag inside the article tag, or if you do, the aside's content must be related to that article. Normally, we just put aside on the sidebar.
You can place heading tags (h1 -> h6) inside the aside tag.
The aside syntax is as follows :
<aside></aside>
2. How to use aside in HTML
Just apply it according to its definition. Here are a few basic examples.
Mục lục
Put aside inside the article . tag
In this case, aside's data must be related to the main content of the article article.
<article> <header> <h1>Học HTML5 tại web888.vn<h1> <p class="byline">by Cường Nguyễn</p> </header> <section> <h2>The Two Types of Wheat</h2> <p>There … to rise.</p> <p>Where … with less protein.</p> </section> <aside> HTMl5 có rất nhiều thẻ khác nhau ... </aside> </article>
Put aside outside the article
In this case, aside's content must be relevant to the entire site.
<aside> <h3>Học lập trình</h3> <a href="#">Học C++</a> <a href="#"> Học Javascript</a> <a href="#">Học Python</a> </aside> <article> <header> <h1>Học HTML5 tại web888.vn<h1> <p class="byline">by Cường Nguyễn</p> </header> <section> <h2>The Two Types of Wheat</h2> <p>There … to rise.</p> <p>Where … with less protein.</p> </section> </article>
Above is how to use the basic aside tag in HTML5. As long as you understand the meaning of this tag, you can apply it to your real project interface.