Forum Moderators: open
So true "errors" matter, but "warnings" are less of an issue for SEO. Still, all of validation is valuable knowledge to acquire - as you do, ALL your mark-up will improve and your understanding of HTML will deepen.
I've seen trouble on my own sites from invalid mark-up. I just couldn't believe a page didn't rank for a given phrase -- and then I found an HTML tag problem just before that phrase. When I fixed that, the expected ranking was there within a few days.
Phrases later on the page were always in the index, because search engine spiders have basic error recovery routines. However that error recovery is on a more basic level than a browser will have. That's why just checking how your page looks in various browsers isn't enough - you need to validate the mark-up as well.
If you're just learning the ropes, I'd suggest validating to one of the "transitional" DTD's (either HTML 4.01 or XHTML - whichever you've been using). All the DTD's are listed on the W3C site here: [w3.org...]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Neither one will help or hurt as far as the SERPS are concerned, except as tedster noted above.
[edited to add opening bracket--thanks encyclo]
[edited by: photon at 3:15 pm (utc) on April 26, 2004]
If you are curious enough you can follow that link ( [w3.org...] ) and have a look at the DTD itself, although it's probably going to be meaningless if you've never viewed a DTD before.
- Tony
[edited by: Dreamquick at 3:19 pm (utc) on April 26, 2004]
What about the W3C in it, does it mean the sitemane? And can people have there own dtd page, like <!DOCTYPE html PUBLIC "-//yoursite//DTD HTML 4.01 Transitional//EN" "http://www.yoursite.com/loose.dtd">
The doctype defines what SGML language the document is written in, with HTML being a SGML language. Another SGML language is DocBook, who have this to say about this:
[docbook.org...]
Jon.
It is also possible for a document to use a custom DTD, but that is pretty deep water for the average websmaster. As I understand it, if you are taking XML data and transforming it with your own custom rules to create a web document, then creating a custom DTD "may" be useful to you. That isn't me, and it isn't most web authors I know.
phpnet, I'd say you are safe leaving the DTD as you have it.
You can use either of the following declarations for the ISO standards.
<!DOCTYPE HTML PUBLIC "ISO/IEC 15445:2000//DTD HyperText Markup Language//EN">
<!DOCTYPE HTML PUBLIC "ISO/IEC 15445:2000//DTD HTML//EN">