[thelist] Valid form for meta tags?
David Dorward
evolt at david.us-lot.org
Thu Jul 31 03:24:01 CDT 2003
On Wed, Jul 30, 2003 at 10:19:44 -0700, Edwin Horneij wrote:
> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
>
> I am using the HTML 4.01 transitional doctype. When I run a page
> through the W3C HTML validator it gives the error message "character
> data is not allowed here", while seeming to indicate the forward slash
> closing my meta tags. I don't get this error with tags like
>
> <br />
>
> so I am confused. The text of the error message says nothing to me, but
> I suppose that just shows my ignorance. Are meta tags somehow special?
<meta> tags are in the <head> section.
This has to to with what "<element />" action means in SGML, which is
different to what it means in HTML.
In XML, <element /> means <element></element>.
In SGML, <element /> means <element>> becuase the "/" ends the tag.
HTML 4.01 is SGML based, and while you are allowed to have ">"
characters in the body (where they will be displayed like 'a', 'b' and
'c'), they are not allowed in the <head> (and nor is 'a', 'b' or 'c')
Don't use XHTML syntax in an HTML document.
--
David Dorward http://david.us-lot.org/
Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
it'll stop pop-up ads? -- Dork Tower
More information about the thelist
mailing list