<aside> is for SideBar.
The <aside>
element marks the surrounding elements.
It could be some additional background, a set of links to related articles, and so on.
<aside> |
Yes | 9.0 | Yes | Yes | Yes |
The <aside> tag is new in HTML5.
The <aside> tag supports the Global Attributes in HTML.
The <aside> tag supports the Event Attributes in HTML.
aside { display: block; }
The following code uses aside
to mark up a
"Related Links" section.
<!DOCTYPE html>
<html>
<body>
<article>
<header>
<h1>HTML5</h1>
</header>
<p><strong>This is a title.</strong> ?</p>
... <!-- ww w . ja v a2s .co m-->
</article>
<aside>
<h2>Related links</h2>
<nav>
<ul>
<li><a href="#">HTML4</a></li>
<li><a href="#">CSS3</a></li>
<li><a href="#">JavaScript</a></li>
</ul>
</nav>
</aside>
</body>
</html>
How to use aside tag in an article element.
<!DOCTYPE HTML>
<html>
<body>
<article>
<header>
<hgroup>
<h1>H1</h1>
<h2>H2</h2>
</hgroup>
</header>
<aside>
<h1>Sidebar H1</h1>
<section>
<p>This is a paragraph. </p>
<!-- ww w. j ava2 s . c o m-->
</section>
</aside>
</article>
</body>
</html>