XHTML Declarations

W

Web Developer

Hi,

I'm not sure if this is the right place to talk about XHTML but here goes.
There seems to two types of document declarations for XHTML: one that
contains a strict DTD and the other transitional.

My question: do you save the transitional ones with .htrml or .xhtml
extension? I'm guessing only .html as transitional would not validate with a
strict DTD. Why? I assume xhtml with strict DTD only contains structural
markup.

Any comments appreciated.


Regards
WD
 
D

David Dorward

Web said:
I'm not sure if this is the right place to talk about XHTML but here goes.
There seems to two types of document declarations for XHTML: one that
contains a strict DTD and the other transitional.

Actually, there are rather more then that.
My question: do you save the transitional ones with .htrml or .xhtml
extension?

The file extension is irrelevent, only the content type counts.

Any varient of XHTML should be served as application/xml+html, some may be
served as text/html. Internet Explorer doesn't understand XHTML though, so
it has to be told its text/html before it can render it.
I assume xhtml with strict DTD only contains structural markup.

Pretty much.

You should avoid Transitional anyway.
 
W

Web Developer

Actually, there are rather more then that.
like?


The file extension is irrelevent, only the content type counts.

Any varient of XHTML should be served as application/xml+html, some may be
served as text/html. Internet Explorer doesn't understand XHTML though, so
it has to be told its text/html before it can render it.

IE 6.0 service pack 1 seems to understand XHTML.
Pretty much.

You should avoid Transitional anyway.

Disagree. Right now, completely separating structural from presentational
markup can do alot of harm in terms of limiting the number of people who can
view your material. How many browsers do you know can interpret XHTML and
CSS? not many I would imagine. Transitional seems to be the best approach
right now, but this will change in a few years to come.

I just noticed many sites used transitional XHTML and had them saved with
HTML extensions - probably for the reason you had mentioned above.

Thanks anyway.


Regards
WD
 
D

David Dorward


frameset, basic, 1.1, ...
IE 6.0 service pack 1 seems to understand XHTML.

It is served as XHTML? Or is it served as HTML? I've never seen an XHTML in
the whild that is served to MSIE as XHTML. If the latter then it is
treating it as HTML and performing error correction for the variences.
Disagree. Right now, completely separating structural from presentational
markup can do alot of harm in terms of limiting the number of people who
can view your material.

Mainly due to bugs in browsers, learning your way around those bugs isn't
difficult.
How many browsers do you know can interpret XHTML

Most modern browsers can, with the exception of MSIE.

Most modern browsers can, but the implementations are buggy.
not many I would imagine. Transitional seems to be the best
approach right now, but this will change in a few years to come.

If you are looking for browser support, with presentation, then use HTML
4.01 Transitional.

If you are looking for browser support with sensible seperation of style and
content, use HTML 4.01 Strict.

Only use XHTML if you have some pressing reason to use it.
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top