It depends on what tags you've used in the HTML.
Different doctypes declare different sets of tags as valid; and (with quirks mode) prompt some browsers into rendering some tags in different ways.
Full list of recommended doctypes here:
I suggest you start with a low numbered transitional type. Validate some pages with that dotype to get an idea of how well your HTML matches it.
i have tried and its does match nothing?
If you have an existing site with no doctype, the first one to try would be this one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
If you add that and the page layout goes all wrong, then use this instead:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Then use the HTML validator [validator.w3.org] and work your way through the validation errors - often by fixing one, others later on will be corrected too.
Thank you, i have just validated one of my sites using the first one you said.
But what does the doctype actually do to the performance of a web site and indeed how search engines pick it up?
|i have tried and its does match nothing? |
Thing of HTML as a set of dialects. The doctype says which of the dialects you are using. If you are not using any of the standard dialect variations, then your choices are:
1. be happy with unvalidated HTML -- ie HTML that does not match any given dialect
2. modidy your HTML to match one of the existing dialects. Then you can use that one's doctype
3. write your own doctype. This really only works if you HTML is well-formed (if it is full of syntax errors then you'll never match any doctype). Writing a DTD to precisely describe how your HTML is structured offers the ultimate degree of control.
i seem to have these errors:
cannot generate system identifier for general entity "Category".
It appears that the symbols & = appear to be the problem, how do i get around this?
& is traditionally the start of an entity reference. For example, £ is rendered as £. The spec says that if you want an & to appear in the page then you should use it's entity reference - & . This applies to links as well.
by changing the & to & would this have an effect on affiliate links?
How do i get around the "=" issue?
There shouldn't be any problems, as the links will still work fine.
= shouldn't be an issue. What's the validator's exact error msg?
|i need to declar a doc type in my web pages, currently i used html, asp in my pages, so what doctype should i place in my site? |
ASP is irrelevant since it is a scripting language that writes part of the HTML. And since you already stated that you are using HTML, the following doctypes are appropriate:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
The first allows you to use tags and attributes that have been declared deprecated (i.e. font, s, strike, u, basefont, center, applet and etc.). The second doctype does not. Even if you stick with the transitional doctype, it is generally best that you avoid the depreciated tags and attributes as much as possible.
The full doctype is recommended because it will force certain browsers, especially IE6, into standards mode. This mode corrects some of the errors that IE6 has when it comes to rendering CSS.
Using & instead of & in your links will not affect the links themselves.
the "=" appears an an issue
i have sorted most issues out now, but how can i get round this one:
Below are the results of attempting to parse this document with an SGML parser.
Error Line 172 column 47: an attribute value must be a literal unless it contains only name characters.
...ect name="Make" onchange=make1.submit() size="1" style="width: 135; font-fami
its telling there is a problem with ()
Just add some quote around the onchange value:
That should fix it. :)
Thank you, i now have perfect pages.
Something that i noticed is that there were a couple illegal characters lying about the place, could that be a reason why google is not indexing my home page, but updating the rest?