[html5] Distinguish main article from comments

Vahagn vahagnh at gmail.com
Fri Nov 23 01:50:55 PST 2012


As far as I understand, the "article" tag is for marking up self-contained
pieces of content. In other words, content that can be taken out of context
and distributed / reproduced elsewhere as a separate unit, with no loss of
meaning.

Wrapping each comment into it's own "article" tag seem to be wrong for that
reason. A comment, taken out of the context of the article and other
comments, would not represent a meaningful, self-contained piece of
content.

Here's how I'd mark up the example above:

> <article>
>   <h1>Cicero dictos est</h1>
>   <p>
>     Lorem ipsum dolor sit amet, consectetur
>     adipisicing elit,
>     sed do eiusmod tempor incididunt ut
>     labore et dolore magna aliqua....
>   </p>
>   <section>
>     <h1>comments</h1>

>       <h2>bonus est</h2>
>       <p>great article;
>        your Latin is excellent!</p>

>       <h2>malus est</h2>
>       <p>terrible article;
>        you misspelled "dictus", you moron</p>

>   </section>
> </article>


Less markup, too.

/ Vahagn


On Sun, Nov 18, 2012 at 7:42 PM, Ian Hickson <ian at hixie.ch> wrote:

> On Sun, 18 Nov 2012, Brian Tremblay wrote:
> > On 11/18/12 8:25 AM, Markus Ernst wrote:
> > >
> > > there are some types of webpages with a main article, and user
> > > comments; these are very common at news websites and blogs. I think it
> > > would be useful to mark up the main article specifically in order to
> > > give it a higher weight in search engines than the user contributed
> > > comments.
> >
> > I'd say:
> >
> > <article>
> >   <h1>Cicero dictos est</h1>
> >   <p>
> >     Lorem ipsum dolor sit amet, consectetur
> >     adipisicing elit,
> >     sed do eiusmod tempor incididunt ut
> >     labore et dolore magna aliqua....
> >   </p>
> >   <section>
> >     <h1>comments</h1>
> >     <article>
> >       <h1>bonus est</h1>
> >       <p>great article;
> >        your Latin is excellent!</p>
> >     </article>
> >     <article>
> >       <h1>malus est</h1>
> >       <p>terrible article;
> >        you misspelled "dictus", you moron</p>
> >     </article>
> >   </section>
> > </article>
> >
> > That way, the comments are a part of the article, as they should be, but
> > each within its own article, and all of them inside a section. So each
> > comment is 2 levels down from the main article.
>
> That's indeed what the spec suggests.
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
> _______________________________________________
> Help mailing list
> Help at lists.whatwg.org
> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20121123/77464b7d/attachment-0003.htm>


More information about the Help mailing list