[whatwg] HTML5 fo ecommerce

Ian Hickson ian at hixie.ch
Thu Feb 12 17:54:50 PST 2009

On Fri, 23 Jan 2009, Mynthon wrote:
> I have some questions about html. I really like new <section /> tag and 
> its possibility to have its own <hx /> structure. Dont like mixing <hx 
> /> levels but thats BTW.
> I have strange feeling that in next 5 years not only blogs will be 
> available on the web but also some e-commerce pages (online shop, 
> auctions). Also some new applications. Now i cant figure out how to use 
> html5 for those sites.
> On my companys page there are no articles and sections. There are 
> products and product lists. Isnt it wrong to use
> <article>
>   <section>
>     <h1>product1</h1>
>     some data
>   </section>
>   <section>
>     <h1>product2</h1>
>     some data
>   </section>
>   <section>
>     <h1>product3</h1>
>     some data
>   </section>
> </article>
> while it wil be misleading screen readers? For users without 
> disabilities there is no problem but for eg. blind peple? Calling 
> product list an article is... hmmm... wrong.

Yup. Don't do it. :-)

> The same goes for pages with advertisements and announcements, e-mail 
> web frontends, forums, and every other page that is not blog or 
> newspage. If there are new tags for blogs (<article />, <section />, 
> <audio />, <video />) are there plans for tags usable for other pages 
> (<product />, <productlist />, <price />, <subject />, <thread />, 
> <announcement />, <review /> etc.)

There are no plans for this in HTML5 (though maybe in HTML6).

If you have a (product) list, then we have <ul> and <ol>. Threads (like in 
forums) can be represented with nested <article> elements; that's part of 
what that element is for -- a post is considered an article, in fact a 
forum post is the very first example in the spec.

> Something like:
> <product>
>   <h1>New book</h1>
>   <p>by Chris Grabowski</p>
>   <p>old price: <span>5usd</span></p>
>   <p><strong>Now only:</strong> <price>3.99usd</price></p>
>   <p>This is description of product ...</p>
> </product>
> Will be very cool for me and many other.

I think using <section> for this is fine, along with some classes:

  <section class="product">
    <h1>New book</h1>
    <p>by Chris Grabowsky</p>
   <p>Old price: <span>5 USD</span></p>
   <p><strong>Now only:</strong> <span class="price">3.99USD</span></p>
   <p>This is description of product ...</p>

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list