ze0nyx
02-16-2005, 09:18 AM
I've read somewhere that in XHTML all tags must be closed. I have the following meta tag:<meta name="Description" content="Developer's Heaven" />And it fails in the W3C validator. The error I get isYou 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).When I remove the backslash and space at the end of the tag the code doesn't fail in the validator. So I come to the conclusion that meta tags are an exception and should not be closed. Am I wrong?
Also, if you look at the validator result I've quoted, you'll see something strange. It says that the content should not be put directly inside the body tag but in some other tag. Is that right? What if I do it this way:<body>Hello world!</body>
Also, if you look at the validator result I've quoted, you'll see something strange. It says that the content should not be put directly inside the body tag but in some other tag. Is that right? What if I do it this way:<body>Hello world!</body>