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 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    58
    Thanks
    2
    Thanked 6 Times in 6 Posts

    [HTML5]Proper Use for Article?

    I am curious about one thing. According to w3schools.com's article tag definition, the <article> tag defines external content.

    So what tag would I properly use for an article on my own site? A simple section tag?
    Last edited by Blue_Jeans; 06-03-2010 at 04:07 PM.

  • #2
    Regular Coder optimus203's Avatar
    Join Date
    Sep 2008
    Location
    CT
    Posts
    317
    Thanks
    22
    Thanked 16 Times in 15 Posts
    "...content from an external source."

    So if your including an article or section of article from another site, you would use this tag.

    If its an original article of your own posted on your site, section tag should work.
    Always thank those CF Users who help you solve issues...
    Connecticut Web Design

  • #3
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    Hm I always thought you would have used article but from reading that it is explicitly stating that it defines external content? Personally I think it's misleading us, even though it's a pretty reputable site so what do I know.

    If we look at the spec here:
    http://dev.w3.org/html5/spec/Overvie...rticle-element

    It doesn't really say anything about external, but maybe implies that it can be re-used..

  • #4
    Regular Coder optimus203's Avatar
    Join Date
    Sep 2008
    Location
    CT
    Posts
    317
    Thanks
    22
    Thanked 16 Times in 15 Posts
    You could be right. Maybe its <article> regardless if its external or internal. But why would w3schools say external only? This implies that something else should be used for internal articles.

    http://www.smashingmagazine.com/2009...-from-scratch/ doesn't distinguish between external or internal articles.

    However, according to http://www.brucelawson.co.uk/2010/ht...he-difference/ , here is the difference:

    An article is an independent, stand-alone piece of discrete content.

    Section, on the other hand, isn’t “a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable”. It’s either a way of sectioning a page into different subject areas, or sectioning an article into … well, sections.


    By this definition, I would use <article> for everything that is intended to be an article.
    Always thank those CF Users who help you solve issues...
    Connecticut Web Design

  • #5
    New Coder
    Join Date
    Aug 2007
    Posts
    58
    Thanks
    2
    Thanked 6 Times in 6 Posts
    To make things more confusing (for me, at least), section has an optional attribute for cite in the event it is taken from an external source. If it isn't "a self-contained composition in a document, page, application, or site and that is intended to be independently distributable or reusable," then why do we need the cite attribute? Wouldn't we then use the article tag?

    Edit: Or is it simply that the cite attribute is there if we DO take something from another website that wasn't intended to be independently distributed? In such an event, though, I would think that the blockquote tag is then the better option.

    Semantics: gotta love it.

    Edit2: I just found this article: http://boblet.tumblr.com/post/130610...ml5-structure1
    I'm not sure I agree with all of it, such as when he says:
    Also avoid nesting an <article> inside another <article>—use <section> for indicating logical parts of an <article> instead.
    In one of the examples article element examples it nests an article (comments of an article) inside of the main article.
    Last edited by Blue_Jeans; 06-04-2010 at 05:40 AM.


  •  

    Posting Permissions

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