[whatwg] <summary> tag to help avoid redundancy of meta description tag

Ian Hickson ian at hixie.ch
Tue Jul 27 11:41:52 PDT 2010


On Thu, 18 Mar 2010, Roger Hågensen wrote:
> 
> On my own site currently I mostly replicate the first paragraph of an 
> article in my journal as the meta description, and write one up for 
> other pages, usually replicating some of the content.
> 
> I'm both looking for and want a solution to avoid such redundancy.

The simplest solution is to just not include a description, and rely on 
tools to determine automatically what the most relevant information on the 
page is.


> The perfect solution would be a <summary> tag, if you look at the 
> journal articles on my site you can imagine the first paragraph being 
> done like this:
> 
> <p><summary>This is just an example, it's a replacement for the old meta 
> description, and is a brief summary (description) of the page 
> (content)</summary></p>
> 
> This way the first paragraph in a page would remain unchanged from how 
> it is done today, and a search engine like Google or screen readers etc. 
> would use the summary tag instead of the meta description (which is no 
> longer needed at all in cases like this), if more than one summary tag 
> the first is considered the page summary one, while the others are 
> ignored (but still shown as content obviously).

That, or an attribute, would be a reasonable solution, but I'm not really 
convinced the problem is that important.


On Thu, 18 Mar 2010, Roger Hågensen wrote:
> 
> Example using HTML5 microdata: (would this be appropriate, would browser 
> devs, and Google and other search engines support this?)

You _could_ use microdata to do this, but I don't think it's really a 
great use of microdata. This kind of thing would be better done as a 
microformat, e.g. using a well-known class value.


On Fri, 19 Mar 2010, Ashley Sheridan wrote:
> 
> Why not just use server-side code to output the first paragraph of 
> content as the description for the page also?

That is indeed another possible solution to avoid hand-authoring 
duplicate content.


On Fri, 19 Mar 2010, Roger Hågensen wrote:
> 
> http://lists.w3.org/Archives/Public/public-html/2009Aug/0990.html
> suggests <link rel="description" href="#desc" />, which is ok I guess.
> 
> But why not simply allow this instead:
> <meta name="description" href="#desc" />
> 
> Existing parsers would notice that content="" is missing which is stated 
> as being required, parsers that have been updated would notice there is 
> a href="" instead, so search engines could just look for that id in the 
> page. I think this would have the highest success rate.
> 
> If backwards compatibility is such a major concern then this could be 
> done: <meta name="description" content="" href="#desc" />
> 
> I'm unsure what gives the best result for varous parsers though, would 
> empty content make them behave the same as if the meta tag was not there 
> at all? Or would a empty tag cause them to use "" as the actual page 
> description?
> 
> I'd prefer to have the content attribute missing instead myself, but...

<link> is the right element for links, <meta> for text data. Either way, 
though, the right way to address this is to convince implementors (such as 
a search engine developer) that they should follow these links and get the 
description from them. That is an early step in changing the spec:

   http://wiki.whatwg.org/wiki/FAQ#Is_there_a_process_for_adding_new_features_to_a_specification.3F


On Thu, 18 Mar 2010, Roger Hågensen wrote:
>
> [regarding data-*=""] Maybe a better naming would have been: doc-* It's 
> short, it kinda reflect what it's related to as well right? Or does that 
> clash with something?

data-*="" is probably too well established to change at this point unless 
there's a really compelling reason.

Cheers,
-- 
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