Forum Moderators: open
My current doc type is set to:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
This works fine when previewing the page in I.E/FF. However 'the validator' throws numerous errors like this one:
Line 6, column 55: document type does not allow element "LINK" here
<link href="main.css" rel="stylesheet" type="text/css" />
I don't much about doc types (as you've probably guessed) and I just want my simple page (made up of 1 table) to work in most major browsers.
Could anyone give me a starting point on 'doctypes' so I can build this page with a solid foundation?.
Once again thanks
Looking at a few sites there is no doc type specified - is this the best option for an all round compliant site?
On other related note. It is suggested that you always use a full doctype instead of the partial one you have give. In this cause it would be:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
use a full doctype
And if you do, be ready for browsers to render things differently. Learn more in this thread:
Standards Mode and Quirks Mode [webmasterworld.com]
About accessibility - bobby isn't enough. You need to thoroughtly read the WCAG guidelines and do some reading around to make sure you're not making any obvious mistakes. A lot of accessibilty can't be machie tested in a meaningful way today. I'd suggest accessify.com as a good starting point.
Its an ASP site that has to be accessible approved, all the pages are quite flat - 1 table, couple of images and a RAD panel bar for the menu (this is java menu but RAD claim that is will pass accessibilty checks)
XHTML vs HTML - whats the major differences?
With this being an asp site when I use XHTML strict doc type theres no chance of validation, change it to XHTML basic and it throws more errors. I'm stuck at a standstill at the minute..running out of hope
The applet element is deprecated as of HTML4, so you'll want to be using a transitional doctype. Unless ASP's generating an object element for it, but I doubt that. Having said that, I'd still be extremely surprised if the applet was considered accessible. Does it obey tabindexes? Is it keyboard navigable? Can screenreaders access it? If not then I'd leave it well alone. If you do stick with it make sure to replicate the menu structure as a fallback inside the applet element and provide a 'skip to main content' link. Also, bear in mind that's there's a difference between "accessible" and "passing accessibility checks".
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Once you've got that in place, what kind of errors/warnings are you getting? The above doctype is the most forgiving and flexible of the XHTML doctypes.