View Full Version : doctype help
littlewebby
August 3rd, 2004, 02:31 PM
I have compiled my site using notepad, thus it is full of errors, but that is not my main concern.
Once I have fixed my errors I know I need the correct doctype as recommended by w3c, is this an absolute requirement or is it optional ?
The W3C is an absolute goldmine of information, but that is half the trouble it is like reading an anagram of a dictionary backwards when you need to find what you want.
Here is the link to my site;
www.tcaec.co.uk (http://www.tcaec.co.uk)
What doctype should I use ?
:(
degsy
August 3rd, 2004, 04:00 PM
What do you want your page to be vaild to?
The doctype holds the standards that your code has to conform to.
So if you use a HTML4 doctype then your page will be vaildated against the HTML4 spec.
This will be quite leanient.
If you want more upto date or stricted code then go for XHTML Transitional.
or if you want it completely upto date then go for XHTML Strict.
Most, if not all will be able to view your page without a doctype, but your page will not be valid HTML.
note! that for valid code then the DOCTYPE tag is mandatory.
Without it you can't validate the page.
I would recommend XHTML Transitional as it should help your conform to most standards & browsers.
littlewebby
August 4th, 2004, 12:18 PM
What do you want your page to be vaild to?
The doctype holds the standards that your code has to conform to.
So if you use a HTML4 doctype then your page will be vaildated against the HTML4 spec.
This will be quite leanient.
If you want more upto date or stricted code then go for XHTML Transitional.
or if you want it completely upto date then go for XHTML Strict.
Most, if not all will be able to view your page without a doctype, but your page will not be valid HTML.
note! that for valid code then the DOCTYPE tag is mandatory.
Without it you can't validate the page.
I would recommend XHTML Transitional as it should help your conform to most standards & browsers.
Thanks for your help Degsy
other than my code being all over the place I will put xhtml tran code in and see how much the validator complains at me
littlewebby
August 4th, 2004, 12:29 PM
sorry to be a nuisance but I Tried this one;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
It just killed my default stylesheet.
degsy
August 4th, 2004, 03:54 PM
What do you mean by "killed"?
And is your CSS valid?
littlewebby
August 10th, 2004, 10:16 AM
What do you mean by "killed"?
And is your CSS valid?
When I write that doctype and then post it it just takes away all the desired effects of one of my stylesheets.
The css is valid.
cheers
degsy
August 10th, 2004, 03:16 PM
Can you post an example?
littlewebby
August 11th, 2004, 11:52 AM
Example here :-
This example (http://www.tcaec.co.uk/example.htm)
The accessibility to the site is practically inoperable to the visually impaired (try using the "enlarge text" or "smaller text" links below the date, as well as the basic aesthetic effect of the site (the highlight colour).
I hate to sound like a complete newbie but I do wish to code all my sites the right way so I might as well start as I mean to go on, by having valid html/css as well as having them as accessable to as many browsers as possible.
Any more help would be appreciated Degsy :dizzy:
degsy
August 11th, 2004, 03:54 PM
Is your problem with the CSS or the Javascript?
rockboy
August 11th, 2004, 08:13 PM
I took a look and found a number of errors that need to be fixed. There might be more.
The first you need to fix as it will affect everything else is missing <tr> and <td> tags in your first table.
Following that table are more nested tables. There is a missing <tr> tag in the nested table:
<div id="pic" class="pic">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table>
<td>
The extra text" code will play havoc with any code following an extraneous quote mark:
<a title="Black text on a white background" text" href="#"
The validator will likely find these errors also. Its a matter of being able to translate the validator.
littlewebby
August 18th, 2004, 10:07 AM
So once I sort the code housekeeping out the doctype should validate to:-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
???
degsy
August 18th, 2004, 04:30 PM
Yes, you can validate your page here
http://validator.w3.org/