I would like to know what the function of the <aside>
tag is and to know if there is any similarity to the <nav>
tag, since in the code I am doing I changed aside
to nav
and there were no changes.
I would like to know what the function of the <aside>
tag is and to know if there is any similarity to the <nav>
tag, since in the code I am doing I changed aside
to nav
and there were no changes.
What is the element?
The HTML element represents a section of a page that consists of content that is tangentially related to the content of your environment, which could be considered separate from the content.
These sections are often represented as sidebars. They often contain side explanations, such as the definition of a glossary; vaguely related content such as warnings; the biography of the author; or in web applications, profile information or related blog links.
Usage example
<p>My family and I visited The Epcot center this summer.</p>
<aside>
<h4>Epcot Center</h4>
<p>The Epcot Center is a theme park in Disney World, Florida.</p>
</aside>
Compatibility
linkwhereItook images and reference
aside
is a semantic tag introduced in HTML5. That is, it aims to better describe the meaning of its content for both browsers and programmers.
In the case of the aside
tag ( reference ):
The HTML element represents a section of a page that consists of content that is tangentially related to the content of the its surroundings, which could be considered separate from the content. These sections are often represented as sidebars.
The image below illustrates where the aside
tag should be used in HTML documents:
So if the content that is inside your aside
tag is not lateralized on your page, most likely you should not use it.
The nav
tag is used to index a navigation element. Usually it includes a set of links. In the image above, the nav
tag is used below the header
of the page, a place that is often used to house navigation menus.
When you switch% of% by% with%, you are no longer indicating to the browser that the content in question is a side content and that such content is browsing content. That is: change is semantics (meaning) and not visual