I'm a newbie at upgrading to XHTML (ie, been at it about 2 weeks), but have been a software professional for 38 years.
I seek both specific & general advice.
SPECIFIC.
Via use of Tidy, have upgraded a CSS-intensive Web page. W3C validates the page as HTML 4.01 strict.
Decided to upgrade the page to XHTML 1.0 Transitional. Not a big deal. The only change necessary was closing tags like <br> & <img>, adding a " /" before the ending ">". W3C validates this page as XHTML 1.0 Transitional.
Here's the problem. To conform to XHTML, the " /" is required to close both the <link> & <meta> tags. However, the page no longer validates as HTML 4.01 strict. In fact, the specific error message warns of this backwards incompability.
Here are the questions:
(1) Is there some way to have the <link> & <meta> tags validate as both?
(2) Is this even desirable?
(3) Is this even necessary?
GENERAL
Getting back to the real world, the above issue is part of this question: Which is better, HTML 4.01 strict or XHTML 1.0 transitional?
Henri Sivonen in his "Activating the Right Layout Mode Using the Doctype Declaration" article at recommends not using a XHTML 1.0 Transitional DOCTYPE since it causes more browsers to go into quirks mode. Of all the articles I've found re this issue, his seems to embody the most detailed analysis.
Re the real world. Here are the DOCTYPE's used by 10 Top 100 sites on their Home Pages:
o None: Google, eBay, Amazon
o HTML 4.0 Transitional: Microsoft, New York Times
o HTML 4.01 Transitional: Yahoo, the BBC, CNN
o XHTML 1.0 Transitional: Mapquest, Wikipedia
Sure, these sites may still be using legacy code, but the XHTML 1.0 recommendation was published December 1999. 5-1/2 years seems like more than enough time for these major Web-oriented sites to upgrade to XHTML.
Sivonen's article & the results of the survey I did raise a red flag: In the real world, Is there something inherently wrong with using both HTML 4.01 strict & XHTML transitional DTD's?
I'm willing to upgrade my site to XHTML 1.0 transitional, or even 1.0 strict, 1.1 strict, or 2.0 when it becomes official. That's not the problem. The relatively small penalty that validated HTML/XHTML assesses is more than compensated for by the assurance that different browsers will render the same HTML/XHTML the same -- at least, that's the intent, isn't it?
In essence, using Supply Sergeant or Polish peasant mentality here, what is the best alternative, and why?
Thanks very much in advance for your valuable time.
livefree
I seek both specific & general advice.
SPECIFIC.
Via use of Tidy, have upgraded a CSS-intensive Web page. W3C validates the page as HTML 4.01 strict.
Decided to upgrade the page to XHTML 1.0 Transitional. Not a big deal. The only change necessary was closing tags like <br> & <img>, adding a " /" before the ending ">". W3C validates this page as XHTML 1.0 Transitional.
Here's the problem. To conform to XHTML, the " /" is required to close both the <link> & <meta> tags. However, the page no longer validates as HTML 4.01 strict. In fact, the specific error message warns of this backwards incompability.
Here are the questions:
(1) Is there some way to have the <link> & <meta> tags validate as both?
(2) Is this even desirable?
(3) Is this even necessary?
GENERAL
Getting back to the real world, the above issue is part of this question: Which is better, HTML 4.01 strict or XHTML 1.0 transitional?
Henri Sivonen in his "Activating the Right Layout Mode Using the Doctype Declaration" article at recommends not using a XHTML 1.0 Transitional DOCTYPE since it causes more browsers to go into quirks mode. Of all the articles I've found re this issue, his seems to embody the most detailed analysis.
Re the real world. Here are the DOCTYPE's used by 10 Top 100 sites on their Home Pages:
o None: Google, eBay, Amazon
o HTML 4.0 Transitional: Microsoft, New York Times
o HTML 4.01 Transitional: Yahoo, the BBC, CNN
o XHTML 1.0 Transitional: Mapquest, Wikipedia
Sure, these sites may still be using legacy code, but the XHTML 1.0 recommendation was published December 1999. 5-1/2 years seems like more than enough time for these major Web-oriented sites to upgrade to XHTML.
Sivonen's article & the results of the survey I did raise a red flag: In the real world, Is there something inherently wrong with using both HTML 4.01 strict & XHTML transitional DTD's?
I'm willing to upgrade my site to XHTML 1.0 transitional, or even 1.0 strict, 1.1 strict, or 2.0 when it becomes official. That's not the problem. The relatively small penalty that validated HTML/XHTML assesses is more than compensated for by the assurance that different browsers will render the same HTML/XHTML the same -- at least, that's the intent, isn't it?
In essence, using Supply Sergeant or Polish peasant mentality here, what is the best alternative, and why?
Thanks very much in advance for your valuable time.
livefree