Click to See Complete Forum and Search --> : doctype question..
elainebludfairy
09-07-2007, 03:09 PM
hi..
whats the difference between using
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
and
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
The first puts conforming browsers into standards mode (excluding IE6 and lower)
The second puts browsers into quirks mode.
http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html
http://www.w3.org/International/articles/serving-xhtml/Overview.en.php#quirks
NogDog
09-08-2007, 02:20 AM
The first puts conforming browsers into standards mode (excluding IE6 and lower)
The second puts browsers into quirks mode.
http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html
http://www.w3.org/International/articles/serving-xhtml/Overview.en.php#quirks
As I believe Fang is alluding to, the first one will leave IE6- in "quirks mode" since the first line is the XML declaration instead of the doctype declaration. If this is an issue, you can leave the XML declaration out and then all browsers should be in compliance mode and display the page OK, though technically they are not valid XML documents now.
Kravvitz
09-08-2007, 04:21 AM
There's also the differences of using HTML 4.01 mark up or XHTML 1.0 mark up and using the transitional or strict variant of each.
XHTML vs HTML FAQ (http://www.sitepoint.com/forums/showthread.php?t=393445)
What's the lastest DOCTYPE? (http://www.webdeveloper.com/forum/showthread.php?t=95897)
No more Transitional DOCTYPEs, please (http://www.456bereastreet.com/archive/200609/no_more_transitional_doctypes_please/)
It's Time To Kill Off Transitional DOCTYPES (http://accessites.org/gbcms_xml/news_page.php?id=23)
Transitional vs. Strict Markup (http://24ways.org/advent/transitional-vs-strict-markup)
felgall
09-08-2007, 07:48 PM
If you understand properly what the difference between HTML and XHTML actually is and have a good reason for using XHTML then the doctype you should be using is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
If you don't understand exactly what XHTML is and have a good reason for using it then the doctype you should be using is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
All other doctypes are either outdated and so should not be used for new web pages or are so new that browsers don't support them properly yet. (even XHTML 1.0 is not supported by Internet Explorer 8 or earlier)
kiwibrit
09-09-2007, 04:18 AM
............All other doctypes are either outdated and so should not be used for new web pages or are so new that browsers don't support them properly yet. (even XHTML 1.0 is not supported by Internet Explorer 8 or earlier)
Can you give a reference for that? I have seen on the Microsoft blog that IE8 has issues with Netscape (if it is installed after IE) handling xml - which rather suggests to me that MS do intend to support XHTML.
felgall
09-09-2007, 10:41 PM
We don't know what problems IE8 will have as Microsoft hasn't written it yet. All we know is that they have said that they will not be adding support for XHTML.
IE has supported XML for quite a while (possibly longer than most other browsers have). It is only XHTML that it doesn't support.
NogDog
09-09-2007, 10:55 PM
My guess is that M$ will put most of its effort for supporting any new standard for IE8 into implementing their "Open Office XML" protocol (recently voted down by the ISO (http://uk.reuters.com/article/technologyNews/idUKN0443877620070905) as a standard).
felgall
09-10-2007, 12:38 AM
My guess is that M$ will put most of its effort for supporting any new standard for IE8 into implementing their "Open Office XML" protocol (recently voted down by the ISO (http://uk.reuters.com/article/technologyNews/idUKN0443877620070905) as a standard).
IE8 will probably be delayed while they produce a patch to incorporate that into IE7. That isn't the sort of thing I would expect them to want to wait any longer than necessary before implementing it. Shouldn't be too difficult for them anyway since IE7 already supports XML so it is just the parts of that protocol that are not XML that would require more than minimal work.
drhowarddrfine
09-10-2007, 02:09 PM
CSS must be on the back burning because Chris Wilson said they are going to be working on RSS and didn't even mention CSS.
kiwibrit
09-12-2007, 11:49 AM
CSS must be on the back burning because Chris Wilson said they are going to be working on RSS and didn't even mention CSS.
Not quite with you on that. IE7 already does support RSS.
drhowarddrfine
09-12-2007, 06:21 PM
He said on his blog they would be working on increased support for it. I know it already works.
bals28mjk
09-13-2007, 03:18 AM
Wait there are other browsers besides internet explorer?
kiwibrit
09-13-2007, 04:55 AM
Wait there are other browsers besides internet explorer?
Yes (http://www.w3schools.com/browsers/browsers_stats.asp). Even by those stats, IE still has the lion's share. I am a little suspicious of those stats; I suspect that for business users, the IE share is higher.
Kravvitz
09-13-2007, 04:59 AM
I think bals28mjk was being facetious. :p
The stats shown on w3schools.com only apply to their site.
Here are some others that are probably less site specific:
http://www.thecounter.com/stats/2007/August/browser.php
http://www.upsdell.com/BrowserNews/stat.htm
http://marketshare.hitslink.com/report.aspx?qprid=0
drhowarddrfine
09-13-2007, 11:59 AM
Firefox usage is much higher in Europe and Australia. Some European countries have 40% FF usage.
elainebludfairy
09-18-2007, 04:40 PM
um.. reading here is like talking to Einstein:) ..
this is an embarrassing question..
which is best/safer to use then if i dont understand properly the difference between HTML and XHTML nor having a good reason for using which??
do i have to use only
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
if my concerns are only for IE/FF browsers only:o
TJ111
09-18-2007, 05:00 PM
Haha yeah that's probably what you want to use. It will work fine. And to everyone else, refer to sig.
elainebludfairy
09-19-2007, 02:15 PM
er.. thanks!! the reason i asked is becoz i have noticed i have noticed the site im building has 2 doctypes.. the site's on frames.. mainframe is in xhtml and the rest html 4..
i worry of conflicts..
thanks again..