Forum Moderators: open
<meta name="description" content="description of my site" />
The new W3C validator throws up the following error:
Line 1, column 304: character data is not allowed here
...end of description" /><meta name="keywords" content="start of keywords
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p> ) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).
highlighting the end > of the meta description tag.
Have I made some simple error somewhere?
Thanks. :)
<meta name="description" content="description of my site" /> Do this...
<meta name="description" content="description of my site"></meta> This discussion came up about a year ago and the above
</meta> was the solution. I'm not sure what is going on with the W3 in this instance, it could be a bug of some sort.
<meta name="description" content="description of my site"> And the site will validate correctly as HTML 4.01. Same thing for other tags, too: <br> instead of <br />, etc.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and get
DTD did not contain element declaration for document type name
I'm also getting a bug where it doesn't like <html> at the top of the code after the DTD - should that be <xhtml>?
<html [b]xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"[/b]> You may also get errors related to CaPitaliZation of other elements - you need to make sure everything is in lower case (including stuff like onclick).