XHTML vs. HTML 4.01

T

The Doormouse

It seems pretty easy to write XHTML strict - but what sort of tangible
benefits does it have over the even-easier 4.01 transitional?

The Doormouse
 
D

David Christopher Weichert

It seems pretty easy to write XHTML strict - but what sort of tangible
benefits does it have over the even-easier 4.01 transitional?

Easier is debatable. Depending on your Editor and whether or not it parses
against a DTD/XSD and other considerations that are rather a matter of
personal choice.

I generally produce HTML 4.01 transitional to deliver content via web to
browsers. However only yesterday I was happy to have an XHTML Document I
could process with XSLT straigth away. It all depends on what
you want to do.


Regards
David
 
T

Toby A Inkster

The said:
It seems pretty easy to write XHTML strict - but what sort of tangible
benefits does it have over the even-easier 4.01 transitional?

You can use XML tools to create and manipulate XHTML. You cannot with HTML.

All Transitional doctypes suck ass. If you're going to use HTML, use HTML
4.01 Strict.
 
W

Whitecrest

All Transitional doctypes suck ass. If you're going to use HTML, use HTML
4.01 Strict.

And then you can play "break the browser" Sounds like a plan to me....
 
A

Andy Dingley

The Doormouse said:
It seems pretty easy to write XHTML strict - but what sort of tangible
benefits does it have over the even-easier 4.01 transitional?

None. It is in no way "better".

There is a possible advantage (in an altruistic sense) if everyone
used it and the non-strict versions withered away. But on the level of
individual documents, there just isn't a difference.
 
G

George Self

It seems pretty easy to write XHTML strict - but what sort of tangible
benefits does it have over the even-easier 4.01 transitional?

The Doormouse
The short answer is there is no difference. However, that does not
tell the whole tale.

HTML is a dead language; it died with version 4.01. The Web Consortium
is no longer working on HTML and there will be no further improvement
in that language. The current standard is XHTML 1.0, which has only
minor differences from HTML - and none that your Web visitors would
notice. However, the consortium's original plan when they released
XHTML was to begin with the familiar and slowly move designers toward
XHTML and the improvements that language would eventually bring. For
example, XHTML 1.1 will remove many presentation elements (relying on
CSS instead) and include modularization so the language set will be
customizable and small enough to work on devices like cell phones. One
example of these "families" of modules already on the drawing board
is XHTML 1.1 plus MathML 2.0.

HTML 4.01 works fine and will continue to do so for many years.
However, to exercise the full power of the Web's future it seems
reasonable to start working with XHTML. To convert your documents from
HTML to XHTML is a trivial exercise and, to me, the real question is
not "why change" but "why not change".

--George
 
W

Whitecrest

The current standard is XHTML 1.0, which has only
minor differences from HTML - and none that your Web visitors would
notice.

Maybe none of your visitors would notice.
 
E

Eric B. Bednarz

George Self said:
HTML is a dead language; it died with version 4.01.

HTML as procedural markup with pointy brackets is very much alive here,
there and anywhere.
The Web Consortium is no longer working on HTML

The W3C delusion of a retrofitted SGML application has never been alive
in the first place. Those nifty specs have the overall environmental
impact of the working group that invents new latin vocabulary for the
speaking engagements of the pope.
To convert your documents from HTML to XHTML is a trivial exercise

Since trivial exercises attract trivial minds, it shouldn't take too
long until XML is liberalised to death as a result, for such purposes
like, erm, compatibility (the actual need usually grows proportionally
with the volume of appearance).
 
J

Jeff Thies

Whitecrest said:
And then you can play "break the browser" Sounds like a plan to me....

Where does that break?

As I understand it all that does is turn off quirks mode which largely
deals with paddings in the box model. Am I wrong?

Whether the page validates in strict mode does not mean it won't display
correctly. I've switched to strict with the url.

Jeff

 
J

Jeff Thies

Toby A Inkster said:
You can use XML tools to create and manipulate XHTML. You cannot with HTML.

All Transitional doctypes suck ass. If you're going to use HTML, use HTML
4.01 Strict.

Does xhtml strict turn off quirks mode?

Jeff
 
D

David Dorward

Jeff said:
Does xhtml strict turn off quirks mode?

An XHTML 1.0 Strict doctype might trigger the switch from quirks mode to
standards mode (providing you leave out that XML prolog, at least for IE).
 
D

David Dorward

The said:
It seems pretty easy to write XHTML strict - but what sort of tangible
benefits does it have over the even-easier 4.01 transitional?

There are two issues here.

1. Transitional Vs Strict

Transitional contains a lot of obsolete junk that Strict doesn't. Using
Strict helps avoid the obsolete stuff.

2. XHTML Vs HTML

You can process XHTML using XML tools - this is not a benefit for most
people.

You also have to carefully jump through hoops to conform to Appendix C
(given that the vast majority of user agents, including Internet Explorer
depend on treating XHTML as HTML).

HTML 4.01 Strict is currently the best choice for most new documents.
 
T

The Doormouse

David Dorward said:
Transitional contains a lot of obsolete junk that Strict doesn't.
Using Strict helps avoid the obsolete stuff.

Oh! Yes, that is a good thing.
2. XHTML Vs HTML

You can process XHTML using XML tools - this is not a benefit for most
people.

You are right. I feel that most web sites are personal pages or shopping
sites. My needs are a little different.

I am really into learning XML, plus maintain a growing web site as a
volunteer webmaster. If it does no harm to have an XHTML web page, the
benefits of indexible pages and future compatibility seem attractive.

Though, at the moment, I have legit XML copies of the stuff that I am
posting - so maybe actual XHTML is not all that desirable.

I am not sure. Most of the "guts" of a page are quite transposable
between XHTML and HTML Strict with little effort.
You also have to carefully jump through hoops to conform to Appendix C
(given that the vast majority of user agents, including Internet
Explorer depend on treating XHTML as HTML).

I cheat. I have sample XHTML1.0/HTML4.01 pages, very basic, which
demonstrate the most common tags on a page that validates.

Why not? =)
HTML 4.01 Strict is currently the best choice for most new documents.

Thank you, David!

PS
Should an XHTML page have a special file extension, or is ".htm" or
".html" good enough?

The Doormouse
 
C

C A Upsdell

David Dorward said:
The Doormouse wrote:

Transitional contains a lot of obsolete junk that Strict doesn't. Using
Strict helps avoid the obsolete stuff.

Deprecated does not mean obsolete. Indeed, the HTML 4.01 spec says:

"Deprecated elements may become obsolete in future versions of HTML. User
agents should continue to support deprecated elements for reasons of
backward compatibility."
 
D

David Dorward

The said:
I cheat. I have sample XHTML1.0/HTML4.01 pages, very basic, which
demonstrate the most common tags on a page that validates.

Validation won't pick up non-conformancy to Appendix C - hence the
"carefully jump through hoops" comment.
Should an XHTML page have a special file extension, or is ".htm" or
".html" good enough?

File extensions are irrelevant on the web, its content type that counts.

http://www.w3.org/TR/xhtml-media-types/#summary

Noting that many user agents (including that thing from Microsoft known as
IE) do not recognise the application/xhtml+xml content type.
 
D

David Dorward

C said:
Deprecated does not mean obsolete.

That depends on which definition of obsolete you are using.

The w3c are using: "An obsolete element or attribute is one for which there
is no guarantee of support by a user agent."

I am using the more common: "Old or out of date."
 
W

Whitecrest

Where does that break?
As I understand it all that does is turn off quirks mode which largely
deals with paddings in the box model. Am I wrong?

Which can destroy the presentation which to some is important, and can
cost you visitors.
 
T

The Doormouse

David Dorward said:
Validation won't pick up non-conformancy to Appendix C - hence the
"carefully jump through hoops" comment.

Thank you - I will go take a look!

The Doormouse
 
J

Jeff Thies

Where does that break?
Which can destroy the presentation which to some is important, and can
cost you visitors.

Do you have a practical example? This seems a bit arcane to me and I'd
really like to see it in practise. As I understand it, which is not well,
this is something that seldom makes much difference in real life.

Cheers,
Jeff

 
C

C A Upsdell

David Dorward said:
That depends on which definition of obsolete you are using.

The w3c are using: "An obsolete element or attribute is one for which there
is no guarantee of support by a user agent."

I am using the more common: "Old or out of date."

Seems to me that, if we are talking about HTML/xHTML, we should use the
definition which the W3C uses in the HTML/xHTML specs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

HTML to XHTML 20
XHTML and HTML 14
Which DTD Should I Use? 7
html vs. xhtml 11
Change to html 4.01? 10
4.01 strict weirdness 5
IE9 beta finally seems to support xhtml properly 2
HTML transitional vs strict 3

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top