Forum Moderators: open
Please, validate your XML document first!
Line 12
Column 3
The element type "meta" must be terminated by the matching end-tag "</meta>".
Can't say that I've seen that error before and I've validated a lot of sites. The above error happens when validating a CSS file on a page built in XHTML. I've been using that closing </meta> since I started with XHTML years ago. I don't see many others using it, how come?
[edited by: encyclo at 3:19 pm (utc) on May 15, 2006]
[edit reason] fix typo [/edit]
<meta ... />
The XHTML spec recommends using the shorthand version [w3.org], as the alternative syntax "gives uncertain results in many existing user agents."
..ype" content="text/html; charset=iso-8859-1"><meta />
Is that bold text part of a meta tag? I'm assuming so, in which case it should either look like this:
..ype" content="text/html; charset=iso-8859-1" />
or this:
..ype" content="text/html; charset=iso-8859-1"></meta>
You had the / in the wrong place in the closing tag.
<meta http-equiv="Content-Type" content="text/html; charset:utf-8" /> Yes, there are two methods of closing off metadata in XHTML with the above being one and </meta> being the other.
The reason I use </meta> is because years ago when I made the switch, I was using Brett's SIM Spider and it didn't see the metadata when closed off with />.
Also, the above error posted is being generated by the W3C validator and will only be seen when validating CSS in a referer type scenario. I was surprised to see them recommend the </meta> to close off the metadata.
<meta ... />
I misunderstood your reply. I thought you were suggesting to close off with <meta />, sorry about that.
So, we're back to the two valid methods of closing off metadata in an XHMTL document environment.
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"></meta> And...
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> Which takes me back to my original observation in that I've never seen the W3 return that particular error and then recommend a closing </meta> as opposed to <meta... />.
The HTML validator will offer better suggestions with regards to correcting the invalid HTML.
Actually, I think the CSS validator, when using the referer method will catch some things that the HTML validator will not. I'm trying to remember a specific error encountered when validating a CSS file. It was an i/o error and the HTML validator was not seeing it.
Error Line 5 column 72: end tag for "meta" omitted, but OMITTAG NO was specified.
...ype" content="text/html; charset=iso-8859-1">
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
Yup, the HTML validator offers the one method of closing off meta.
Keep in mind that </meta> is valid.