On Tue, 11 Jan 2011 17:06:33 -0800 Jeff <codedr...@gmail.com> wrote: > Doesn't HTML5 microdata use the <meta> element for this purpose?
That doesn't really work outside XHTML. The problem is that the HTML5 parsing algorithm hoists <meta> elements into the document head. In other words: <!doctype html> <head><title>Example</title></head> <body> <meta name="foo" content="bar"> <script> var heads = document.getElementsByTagName('head'); var metas = heads[0].getElementsByTagName('meta'); window.alert(metas[0].name + metas[0].content); </script> </body> Will alert "foobar". The browser assumes that you really meant to put the <meta> element in the head. This behaviour is inherited from legacy browsers who made this assumption because <meta> has never been allowed in the <body>. RDFa's content attribute is a nice solution for hiding a machine readable value, and somewhat less of a hack: e.g. <p about="#i" rel="foaf:based_near"> I live in <span property="geo:lat_long" content="50.875627;0.017855">Lewes (50°52′N, 0°1′E)</span> </p> -- Toby A Inkster <mailto:m...@tobyinkster.co.uk> <http://tobyinkster.co.uk> _______________________________________________ microformats-discuss mailing list microformats-discuss@microformats.org http://microformats.org/mailman/listinfo/microformats-discuss