Search code examples
htmlsemantic-markup

Is the HTML5 <article> tag appropriate for the text on this home page?


I had a little disagreement with a friend yesterday and rather than continuing a never-ending discussion I thought I'll just ask here.

I recently coded a site using HTML5 semantics. The page has relatively little content and I wrapped it in an article tag.

You can check out the page and it's source here: http://inneresauge.co/

And here is the lowdown for those that don't like clicking links...

<div id="container">
    <header>
    <h1 id="logo"><a href="index.html">Inneres Auge Co.</a></h1>
    <nav id="main-nav">
        ...
        </nav>
        ...
    </header>
    <article id="main">
        <p>We're <strong>Inneres Auge Company</strong>, a creative media company that knows no limits.</p>
        <p>We do everything and more, from mobile games and apps to web sites and platforms to video and audio production.</p>
        <p>The best thing about it?<br />
        We're amazing at all of them!</p>
        <p>Don't believe us?<br />
        Just see for yourself...</p>
    </article>
</div>

I figured section wouldn't be appropriate, because it really isn't an individual section of the page that could stand on its own, the text alone can however stand on its own without feeling out of place, that's why I figured article is the best choice.

What's the best choice here? article, section or maybe just a plain div because neither is a good match?

Please feel also free to mention if there is any other unsemantic/unproper usage of html elements.


Solution

  • Doesn’t look like an article to me. As per the spec:

    The article element represents a self-contained composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.

    http://dev.w3.org/html5/spec-author-view/the-article-element.html#the-article-element

    I don’t think the text is really a self-contained composition that’s reusable. It’s marketing blurb, an introduction to the company.

    Whereas <section>, I think, would be fine:

    The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading.

    Examples of sections would be chapters, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site's home page could be split into sections for an introduction [emphasis mine], news items, and contact information.

    http://dev.w3.org/html5/spec-author-view/the-section-element.html#the-section-element

    I don’t think it matters that you’d only have one section — the spec doesn’t say you need multiple <section>s. (And the company may well add additional sections to the page later on.)

    It’s all a matter of interpretation, of course. And it doesn’t have a lot of practical consequences.