html5 - Should I use 'li' or 'article' for products listing? -
i made research , didn’t find appropriate answer. i’m wondering if it’s better keep using li
elements products listing or maybe switch article
element?
every product list contains 1 main image, name , price.
from how describe product listing (image + name + price), doesn't seem fit description of article in html5:
the article element represents section of content forms independent part of document or site; example, magazine or newspaper article, or blog entry.
ask yourself: content independent rest of page content? if take out of context, make sense itself? if answer "no", should consider <article>
may not suitable tag.
if have multiple products display, styled list (ordered or unordered) seems best approach this. check practical cases: how big companies it?:
- amazon, google shopping, tmall, , walmart use lists (
ol
orul
) - alibaba , ebay uses
div
boxes without type of list. - taobao uses combination of both (
div
box, ,ul
name , price)
Comments
Post a Comment