Reputation: 11330
I have some HTML which looks like this
<main>
<article></article>
<aside>
// a widget to show top reasons to shop with us
// a widget to show some related articles
<aside>
</main>
My question is, should each of the widget be contained in their own ASIDE, or should they each be inside a SECTION within the ASIDE or is the current structure OK?
Upvotes: 8
Views: 15496
Reputation: 2152
I think that is really up to you and how you wish to style the page. The html specification does not specify a limit on the number aside
elements and even gives an example that has multiple aside
elements on the same page.
I would say given that they are logically grouped it would make sense to put them together in the same aside
element.
http://www.w3.org/TR/html5/sections.html#the-aside-element
Upvotes: 8
Reputation: 221
The aside container can be use more than one. html5 uses the type of tag to determine the content over others. for example if you make this :
<article>
<header>
<h1>your title</h1>
</header>
<p>
your first paragraph
</p>
<p>
your second paragraph
</p>
<aside>
<ul>
<li>ref1</li>
<li>ref2</li>
</ul>
</aside>
</article>
<aside>
more information about you
</aside>
with that you have one aside you is linked with your article and one with the top container (I don't wrote it here)
in the html5 specification, the aside is some content aside from the content then you can define content aside for some other content who is already an
source : http://www.w3.org/html/wg/drafts/html/master/sections.html#the-aside-element
Upvotes: 0