Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2005
    Posts
    120
    Thanks
    36
    Thanked 0 Times in 0 Posts

    Is it semantically correct to use <aside> more than once?

    example:

    Code:
    <section class="port_entry">
    <aside>
    	<h2>title</h2>
    	<p>Lorem ipsum...</p>
    </aside>
    
    <div class="port_image">
    	<img src="">
    </div>
    </section>
    
    <section class="port_entry">
    <aside>
    	<h2>title</h2>
    	<p>Lorem ipsum...</p>
    </aside>
    
    <div class="port_image">
    	<img src="">
    </div>
    </section>
    
    <section class="port_entry">
    <aside>
    	<h2>title</h2>
    	<p>Lorem ipsum...</p>
    </aside>
    
    <div class="port_image">
    	<img src="">
    </div>
    </section><!--end 'entry'-->

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,197
    Thanks
    23
    Thanked 605 Times in 604 Posts
    Sure, no problem. <aside> is suppose to relate to the main page or to an <article>. The way I understand it the contents within the <aside> could be removed without reducing the meaning of the page or the <article> Like a pull quote or advertising.

    But I bet it will be used for the columns on the right and left of the main section and I don't think that's what it's there for.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • Users who have thanked sunfighter for this post:

    johndove (05-24-2013)

  • #3
    Regular Coder
    Join Date
    Jul 2005
    Posts
    120
    Thanks
    36
    Thanked 0 Times in 0 Posts
    Thanks sunfighter. I googled it but couldn't find a definitive answer, but I did see an example of code that used it twice, so I thought it was okay.

    The way I understand it the contents within the <aside> could be removed without reducing the meaning of the page or the <article>
    That's my understanding of what differentiates an article from a section. Articles can basically be removed and stand on their own (like a blog post) whereas sections basically, but not exclusively, replace divs. Anyway, I used the <aside> tags exactly as my example above.

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by johndove View Post
    Is it semantically correct to use <aside> more than once?
    You can use as many as you want based on my interpretation. In fact, I don't understand why you would think otherwise. The HTML5 spec gives examples at http://www.whatwg.org/specs/web-apps...-aside-element.

    Quote Originally Posted by sunfighter View Post
    But I bet it will be used for the columns on the right and left of the main section and I don't think that's what it's there for.
    As long as the correct content is in the element, how it's rendered doesn't matter. I can think of plenty of scenarios where an aside element would be a column to the side of an article: a tower ad, a list of related links or facts, graphs, etc. Wouldn't make sense for a general site navigation column though.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •