[whatwg] [WA1] Idea: meta attribute

Matthew Raymond mattraymond at earthlink.net
Tue Aug 2 08:54:00 PDT 2005


   I've been noticing that a lot of metadata gets repeated in the web
pages. For instance, the copyright notice you have at the bottom of a
web page may be repeated in a <meta> element...

In <head>:
| <meta name="copyright"
|  content="Copyright © 2005 by Matthew Raymond.">

In <body>:
| <div id="copyright">
|   Copyright © 2005 by Matthew Raymond.
| </div>

   This is a pain, because it increases the size of the document
unnecessarily. So, I was thinking that it would be nice if we could just
say that a specific element contains metadata of a particular type.
Here's and example:

| <div meta="copyright">
|   Copyright © 2005 by Matthew Raymond.
| </div>

   The value of the |meta| attribute above is the same as that of the
|name| attribute in a <meta> element. So the above markup creates the
same metadata as following <meta> element:

| <meta name="copyright"
|  content="Copyright © 2005 by Matthew Raymond.">

   When you have multiple elements with the same |meta| value, you get a
composite. So the following...

| <p meta="description">
|   This page is a page for fans of
|   <span meta="keywords">Stargate SG-1</span> who want to learn more
|   about the <span meta="keywords">X-303</span>, otherwise known as
|   the <span meta="keywords">Prometheus</span>. It also contains
|   detailed blueprints for the <span meta="keywords">X-302</span>.
| </p>

...would have metadata equivalent to the following...

| <meta name="description" content="
|   This page is a page for fans of Stargate SG-1 who want to learn more
|   about the X-303, otherwise known as the Prometheus. It also contains
|   detailed blueprints for the X-302.
| ">
| <meta name="keywords"
|  content="Stargate SG-1; X-303; Prometheus; X-302">

   Notice, by the way, that you can actually style based on the |meta|
element value:

| span[meta=keywords] { color: red; }

   Well, it's just a thought. Seemed like a good one, thought, so let me
know what you think.



More information about the whatwg mailing list