W3C home > Mailing lists > Public > public-html@w3.org > December 2011

[Bug 15304] New: Nested <META> tags in <HEAD>

From: <bugzilla@jessica.w3.org>
Date: Wed, 21 Dec 2011 21:57:38 +0000
To: public-html@w3.org
Message-ID: <bug-15304-2495@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15304

           Summary: Nested <META> tags in <HEAD>
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Microdata (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: evan@nytimes.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org, evan@nytimes.com


I would like to suggest that the WG consider adding support for nested <META>
tags in the <HEAD> element to facilitate the embedding of complex microdata
objects.  

I am currently advising a number of teams on the implementation of HTML
Microdata Schema.org markup and the inability to nest <META> tags in the <HEAD>
has lead to some challenges.

An example:

Suppose you have a document to which you have added an 'itemscope' to the
<HTML> element.  Lets further suppose that you want to add some non-visible
metadata to the <head> element, say the word count.  To do this you'd code up
something like:

<html itemscope itemtype='http://schema.org/NewsArticle">
<head>
    <meta itemprop="wordCount" content="1138"/>
    ...

So far so good, but now suppose we want to add another bit of non-visible
metadata to the <head>, but this time we want to add a 'Person' object.  

This is where the problem comes in.  Inserting a 'Person' object requires that
we nest elements and it isn't legal to nest <META> tags.   Nor can you nest any
of the other elements  legal in the scope of <HEAD> (i.e. <TITLE>, <BASE>,
<LINK> and <STYLE>).  

If it were legal to nest <META> tags, I could write something like this:

<html itemscope itemtype='http://schema.org/NewsArticle">
<head>
    <meta itemprop="wordCount" content="1138"/>
    <meta itemscope itemtype="http://schema.org/Person">
        <meta itemprop="name" content="Evan Sandhaus"/>
    </meta>
       ....
</head>
    ...
</html>

So this is why I'd love to see support for nested <META> tags in the <HEAD>
element.

I've posted this idea to the <public-vocabs@w3.org> and a couple of
contributors raised questions that I'd like to quickly address.

1)  Why not place these complex objects inside of an invisible element (such as
a <DIV style='display:none'> or simply an empty <DIV>) in the <BODY> element?

My concern with this approach is twofold.  

First, the HTML 5 Spec defines the <HEAD> element as "a collection of metadata
for the Document" whereas <BODY> element is defined as "the main content of the
document."   Based on these definitions, a bit of descriptive metadata, such as
the person a document is about, seems far more appropriate for the <HEAD> than
the <BODY>.   

Secondly, I am concerned that placing non-visible content in the <BODY> may be
interpreted as "cloaking" by search providers.  In fact, the documentation at
schema.org says the following of this approach:  "This technique should be used
sparingly. Only use meta with content for information that cannot otherwise be
marked up." [http://schema.org/docs/gs.html]

2)  Why not use a flat <META> tag structure and use the itemref attribute to
link the appropriate <META> tags to one another?

My concern with this approach is that it will likely be confusing to many
potential implementors.  Nested <META> tags, however, offer what seem to me a
far more intuitive approach.

Thank you for considering this feature request,

Evan
--
Evan Sandhaus
Lead Architect, Semantic Platforms
The New York Times Company

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 22 December 2011 01:57:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:42 GMT