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

Roger Hågensen rescator at emsai.net
Thu Mar 18 01:01:26 PDT 2010


On 2010-03-18 03:37, Roger Hågensen wrote:

I know, replying to myself is a big no-no... *cough*

> I searched the list, and looked at the HTML5 briefly and found 
> nothing, nor can I ever recall such.
> So this is both a question and a proposal.
>
> 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.

I kept searching after posting that and looked more into HTML5 and 
microdata...
Besides a small anurism while trying to understand the darn thing I did 
find a possible solution, but is it valid?

Example using HTML5 microdata:
(would this be appropriate, would browser devs, and Google and other 
search engines support this?)

The following...

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Microdata replacing metadata example.</title>
</head>
<body>
<article>
<header>Section header.</header>
<p itemprop="#description">This is the first paragraph in the document 
or an aside or some other content perhaps.</p>
<p>More content here.</p>
<footer>Author: <a href="example.com/author/url/" 
itemprop="#author">Roger Hågensen</a> on <time 
datetime="2010-03-18T08:00:00" itemprop="#date">18th March 2010 at 8 
o'clock.</time><br />
<span itemprop="#copyright">© Roger Hågensen 2010</span><br />
Keywords: <span itemprop="#keywords"><a 
href="http://example.com/tag/Example/">Example</a>, <a 
href="http://example.com/tag/Microdata/">Microdata</a>, <a 
href="http://example.com/tag/HTML5/">HTML5</a></span></footer>
</article>
</body>
</html>

replaces this...

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="description" content="This is the first paragraph in the 
document or an aside or some other content perhaps." />
<meta name="author" content="Roger Hågensen" />
<meta name="date" content="2010-03-18T08:00:00" />
<meta name="copyright" content="© Roger Hågensen 2010" />
<meta name="keywords" content="Example, Microdata, HTML5" />
<title>Microdata replacing metadata example.</title>
</head>
<body>
<article>
<header>Section header.</header>
<p>This is the first paragraph in the document or an aside or some other 
content perhaps.</p>
<p>More content here.</p>
<footer>Author: <a href="example.com/author/url/">Roger Hågensen</a> on 
<time datetime="2010-03-18T08:00:00">18th March 2010 at 8 
o'clock.</time><br />
<span>© Roger Hågensen 2010</span><br />
Keywords: <span><a href="http://example.com/tag/Example/">Example</a>, 
<a href="http://example.com/tag/Microdata/">Microdata</a>, <a 
href="http://example.com/tag/HTML5/">HTML5</a></span></footer>
</article>
</body>
</html>

itemprop="#description" would basically need to be reserved in some 
standards document, I just used the # arbitrarily to indicate "this 
document" in this example.

-- 
Roger "Rescator" Hågensen.
Freelancer - http://EmSai.net/




More information about the whatwg mailing list