I have been running tests on various doctypes and
found something interesting.
I set up a test page using this doctype...
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 1//EN">
....and put this in the head:
<link rel="stylesheet " type="text/css" href="http://www.example.com/test.css">
The page failed the W3C validator. Changing the above to...
<link rel="stylesheet " href="http://www.example.com/test.css">
....allowed the page to validate.
I already tell the browser what type of document test.css
is in my .htaccess file:
AddType 'text/css; charset=US-ASCII' .css
AddCharset US-ASCII .css
AddLanguage en-US .css
I repeated the test with HTML 4.01 strict and XHTML 1.1
pages (making the other changes needed) and it still validated.
Other than the usual Internet Explorer choking on XHTML 1.1
served as application/xhtml+xml, the HTML 2.0, HTML 4.01 strict
and the XHTML 1.1 test pages are all following the directives
in the CSS file just fine. The only quirk I found was that the
W3C CSS Validator couldn't find the CSS from the HTML/XHTML
file (but it validated when I pointed it at the CSS file).
Is there any good reason why that type="text/css" is found
in every example of using an extenal CSS that I can find?
-
Guy Macon <http://www.GuyMacon.co m/Guy Macon <http://www.GuyMacon.co m/>
Guy Macon <http://www.GuyMacon.co m/Guy Macon <http://www.GuyMacon.co m/>
Guy Macon <http://www.GuyMacon.co m/Guy Macon <http://www.GuyMacon.co m/>
Guy Macon <http://www.GuyMacon.co m/Guy Macon <http://www.GuyMacon.co m/>
Comment