W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2010

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

From: Roger Hågensen <rescator@emsai.net>
Date: Thu, 18 Mar 2010 09:01:26 +0100
Message-ID: <4BA1DDD6.4050208@emsai.net>
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/
Received on Thursday, 18 March 2010 01:01:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC