Forum Moderators: open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
That was a piece of cake. Now what?
About those meta tags - isn't this form also valid?
<meta name="description" contents="Ladle read rotten hut"></meta>
Why would they have to? They only need to be able to ignore it. If you place a space before the /, then they will treat it as an "unknown attribute" to the respective tag. If you leave away the space, then a simplistic parser may not be able to seperate the / from the preceding tag name or attribute. And you don't want it to appear at the end of your description in a SERP, do you? ;)
About those meta tags - isn't this form also valid?
<meta name="description" contents="Ladle read rotten hut"></meta>
From the XHTML 1.0 specification [w3.org]:
...
[big]Appendix C. HTML Compatibility Guidelines[/big]
This appendix is informative.
...
[big]C.2 Empty Elements[/big]
Include a space before the trailing / and > of empty elements, e.g. <br />, <hr /> and <img src="karen.jpg" alt="Karen" />. Also, use the minimized tag syntax for empty elements, e.g. <br />, as the alternative syntax <br></br> allowed by XML gives uncertain results in many existing user agents.
...
So yes, the </meta> would be technically valid, but probably not a good idea. I'd avoid the experiment with a real site.
I have had absolutely no problem with my XHTML sites with any of the major search engines.
So I agree with tedster and disagree with bird, based off my personal experience.
I recommend that you always use <meta></meta> instead of <meta />.
I cannot find anything on the W3C spec that clarifies this. I always view the source code of the W3C pages to see what they are doing and they use the " /> format.
My goal is to follow the spec and not take any shortcuts if I don't have to.
In regards to XHTML and its current status, do you see the web making a transition to XHTML or will this end up being a long drawn out battle like CSS?
And, in the case of simplistic brochureware sites, would it be necessary to make the conversion? Are there any advantages from an SEO standpoint. I read what detlev had to say in the post mentioned above but I'm not fully understanding the implications just yet.
Okay, so there are three methods to closing off the <meta> tags...
1. " />
2. </meta>
3. <meta />
The first one is not recognized by the spidering programs I am using and it is the recommended format by the W3C. The second two spider fine. What concerns me is the W3C recommendation which does not mention the use of #2 and #3. So, where is the XHTMLGuy?
(edited by: pageoneresults at 5:57 pm (utc) on Mar. 22, 2002)
That is the W3C recommendation for closing off the <meta> tags. Here is a piece of meta from their own site...
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
I should have included the content before the <" to make sure there was no confusion. I'm not closing off the meta with <" />. Sorry, I updated my post above and eliminated the beginning <.
Google has absolutely no problem with it, but then again, Google will index the contents of your cigar humidor if they find a link to it. :)
I don't know if the bots you are using have any support for XML. With XML, more than any other markup, I find it especially important to go with the W3C recommendations. The browser developers are particularly lost as are most search engines when it comes to XML so I expect they will look first to the W3C when developing for it.
DG
On a side note, Brett, is the SIM Spider set up to validate XHTML properly?
XML data can be processed without a DTD. If the XML is well-formed all the entities are declared. In many instances a DTD is used during the authoring, then discarded as it slows processing.
Spiders may need the DTD now, although I've seen well-formed XML documents properly indexed, but that shouldn't be a long term requirement.
DG
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
I have been following the recommended specs since converting to xhtml early last year.
Since migrating to XHTML my pages have had great success in the SERPS, this is why I believe there will be a strong migration to XHTML & CSS - the optimized pages are much more "spider friendly."
Especially when use of tables is limited to "tabular" data and not used for layouts.
I was finding that some of the spiders were getting confused, but that was over a year ago. That's why I recommend the closing tag. Both are valid XHTML, but as we all know, just because it's in the spec doesn't mean that the parser handles it correctly.