question xhtml transitional or strict !?

T

t

hay,
i am reading about xtml, and don't know which one is better
transitional or strict !?
which one you use when writting code in xthml, i am little
confused about dicision?

tnx
 
M

mynameisnobodyodyssea

hay,
i am reading about xtml, and don't know which one is better
transitional or strict !?
which one you use when writting code in xthml, i am little
confused about dicision?

tnx

Better use XHTML strict, you have a better chance
for the page to be displayed as intended in most browsers.

Also valid XHTML strict does not include the target
attribute of <a> tags, usually used to open links in new tabs,
and this is a good accessibility feature.

Check valid XHTML mark-up with the W3C validator
http://validator.w3.org/

For differences between strict and transitional have a look at
http://en.wikipedia.org/wiki/HTML#Transitional_versus_Strict
 
B

Beauregard T. Shagnasty

Better use XHTML strict, you have a better chance
for the page to be displayed as intended in most browsers.

...except most Internet Explorer browsers, unless you cheat and serve it
as "text/html" instead of the correct "application/xhtml+xml"

Unless you know exactly why you think you need XHTML, use HTML 4.01
Strict.

Transitional (either HTML or XHTML) is for working with old legacy
pages, and not new ones. New pages should be Strict.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Here's a test page, first as properly served XHTML. Try it with IE.
http://fingerlakesbmw.org/test/xhtml.php
and the companion HTML page,
http://fingerlakesbmw.org/test/html.php
 
M

Michael Fesser

..oO(t)
i am reading about xtml, and don't know which one is better
transitional or strict !?
which one you use when writting code in xthml, i am little
confused about dicision?

For new sites always Strict. But you should consider to use HTML 4.01
Strict instead, there's little point in using XHTML these days.

Micha
 
B

Beauregard T. Shagnasty

Oh, and this:

Also valid XHTML strict does not include the target attribute of <a>
tags, usually used to open links in new tabs, and this is a good
accessibility feature.

No, it is certainly not a "good accessibility feature" especially for
visitors who have maximized browser windows.

Why don't you let me decide where I want to open links?
 
M

mynameisnobodyodyssea

..except most Internet Explorer browsers, unless you cheat and serve it
as "text/html" instead of the correct "application/xhtml+xml"

It is obvious that logic fails in discussing this one somehow.
I meant a text/html document starting
with the XHTML doctype declaration.
Unless you know exactly why you think you need XHTML, use HTML 4.01
Strict.

I think it is better to use XHTML than HTML because

- it is better for mark-up validation tools,
HTML and CSS validators work better for XHTML,
they follow more consistent rules than for HTML.
The same probably goes for parsers of search engines,
and for some web accessibility tools.

- XHTML is needed for example when using Google Maps with polylines.
Why change to XHTML from HTML if deciding later to include
things which need XHTML, when it is easier to start with the XHTML
mark-up.
 
M

mynameisnobodyodyssea

Oh, and this:
:

No, it is certainly not a "good accessibility feature" especially for
visitors who have maximized browser windows.

Why don't you let me decide where I want to open links?


Sorry, I meant Strict is good in not validating the
target attribute for links, so not to open links
in new tabs by using the target attribute.
Strict good, transitional bad.
 
M

Michael Fesser

..oO([email protected])
It is obvious that logic fails in discussing this one somehow.
I meant a text/html document starting
with the XHTML doctype declaration.

Then it is no real XHTML, but pseudo-XHTML written in an HTML-compatible
way, declared and served as HTML for being handled and rendered as HTML
by an HTML tag soup parser. Pretty pointless IMHO.
I think it is better to use XHTML than HTML because

- it is better for mark-up validation tools,
HTML and CSS validators work better for XHTML,

CSS has nothing to do with the markup. Additionally for XHTML you need a
special schema validator, not an SGML-based one like the W3 validator.
they follow more consistent rules than for HTML.

XML enforces a stricter syntax, but you can use the same strictness in
HTML (lower-case tag names, always quoted attributes, well-formedness,
no optional tags etc.)
The same probably goes for parsers of search engines,
and for some web accessibility tools.

- XHTML is needed for example when using Google Maps with polylines.
Why change to XHTML from HTML if deciding later to include
things which need XHTML, when it is easier to start with the XHTML
mark-up.

* Real XHTML doesn't work in IE.
* It's pretty easy to switch from clean HTML to XHTML if it should ever
become necessary (can be done almost automatically).
* If there will ever be an XHTML 2.0, it will _not_ be backwards-
compatible with the current XHTML standards, hence XHTML 1.0 and 1.1
can be seen as a dead end road.
* They're working on HTML 5 already ...

Micha
 
J

Jonathan N. Little

Sorry, I meant Strict is good in not validating the
target attribute for links, so not to open links
in new tabs by using the target attribute.
Strict good, transitional bad.

Well yes strict is best for new documents, where you are mistaken is in
believing xhtml is somehow better than html for webpage design. Most
sites do not the features that xml would bring to it and will only cause
trouble with deployment because MS refuses to support it in their browsers.
 
B

Beauregard T. Shagnasty

It is obvious that logic fails in discussing this one somehow. I
meant a text/html document starting with the XHTML doctype
declaration.

Then you are not writing XHTML, so why be a fake?
I think it is better to use XHTML than HTML because

- it is better for mark-up validation tools,
HTML and CSS validators work better for XHTML,
they follow more consistent rules than for HTML.
The same probably goes for parsers of search engines,
and for some web accessibility tools.

- XHTML is needed for example when using Google Maps with polylines.
Why change to XHTML from HTML if deciding later to include
things which need XHTML, when it is easier to start with the XHTML
mark-up.

Except for perhaps that Google Maps thing (I don't use it), none of your
arguments are correct.

I can't at this moment think of any "things which need XHTML."
 
A

Andy Dingley

i am reading about xtml, and don't know which one is better
transitional or strict !?

Use HTML 4.01 Strict

If you don't want to do this, please explain your reason (and make it
a good one!)

There are two separate issues here: HTML vs. XHTML and _separately_
Strict vs. Transitional.
For both questions, the answer is HTML 4.01 Strict unless you have a
really good reason not to.
 
M

mynameisnobodyodyssea

CSS has nothing to do with the markup.

I think it is obvious in what I wrote
that I assumed that everybody
knows what CSS is, meaning
HTML mark-up is HTML mark-up and
CSS is.. CSS, not HTML mark-up.
 
M

Michael Fesser

..oO([email protected])
I think it is obvious in what I wrote
that I assumed that everybody
knows what CSS is, meaning
HTML mark-up is HTML mark-up and
CSS is.. CSS, not HTML mark-up.

Then please explain:

| [...] CSS validators work better for XHTML

Micha
 
M

mynameisnobodyodyssea

Then please explain:

| [...] CSS validators work better for XHTML

Micha

CSS validators (example the W3C CSS validator)
extract style information (inline or from the <style> element in
<head>)
and URLs of external style sheet files from the source of
the (X)HTML file,
CSS validators recognize an XHTML (or HTML) doctype
and parse the XHTML (or HTML) source accordingly.
It is easier to parse a valid XHTML Strict document
than an HTML document because there are more relevant rules
followed by a document with the XHTML doctype.
 
C

C A Upsdell

t said:
hay,
i am reading about xtml, and don't know which one is better
transitional or strict !?
which one you use when writting code in xthml, i am little
confused about dicision?

One thing you may wish to consider is that XHTML is stricter than HTML,
which MIGHT be helpful while you are learning. For example, if you
validate an XHTML file, it will complain if end tags are missing: if
you validate an HTML file, it will not complain about this.

Using XHTML Strict is better than XHTML Transitional for learning, again
because the validator will warn you if you use depecated features, which
you really should not use.

(An alternative is to use HTML 4.01 Strict with some tool which tells
you about coding problems.)

When building real sites, however, you may want to revisit this issue:
as many have pointed out, there are good reasons for using HTML 4.01
Strict instead of XHTML Strict ... for real websites.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Tue, 19 Feb 2008 18:19:03
GMT Michael Fesser scribed:
CSS has nothing to do with the markup. Additionally for XHTML you need
a special schema validator, not an SGML-based one like the W3
validator.

Yep, and the w3c validator doesn't accept the application/xhtml+xml
header.
XML enforces a stricter syntax, but you can use the same strictness in
HTML (lower-case tag names, always quoted attributes, well-formedness,
no optional tags etc.)


* Real XHTML doesn't work in IE.
* It's pretty easy to switch from clean HTML to XHTML if it should
ever
become necessary (can be done almost automatically).
* If there will ever be an XHTML 2.0, it will _not_ be backwards-
compatible with the current XHTML standards, hence XHTML 1.0 and 1.1
can be seen as a dead end road.

Yep. I've already done some testing on xhtml 2.0 online. You can
download the X-smiles browser which is partially (somewhat primitively)
xhtml 2.0 compatible. FWIW, the new links/href techniques are terrific
(in my opinion), and there are other improvements. Xthml 1.0 and 1.1
are already obsolete. Backward-compatibility is not beneficial when it
extends compatibility to what is basically crap anyway.
* They're working on HTML 5 already ...

Great, but to reiterate what has already been stated, for _today's_ web
page, html 4.01 strict is the only thing that makes good sense.
 
J

Jonathan N. Little

C said:
One thing you may wish to consider is that XHTML is stricter than HTML,
which MIGHT be helpful while you are learning.

Not if in real-world application you would be using *html*
For example, if you
validate an XHTML file, it will complain if end tags are missing: if
you validate an HTML file, it will not complain about this.

Only for elements where the closing tag is optional. If yhey are
optional then it *is* valid markup.
Using XHTML Strict is better than XHTML Transitional for learning, again
because the validator will warn you if you use depecated features, which
you really should not use.

It warns you for deprecated elements for HTML 4.01 Strict as well. No
advantage there.
(An alternative is to use HTML 4.01 Strict with some tool which tells
you about coding problems.)

When building real sites, however, you may want to revisit this issue:
as many have pointed out, there are good reasons for using HTML 4.01
Strict instead of XHTML Strict ... for real websites.

Such as if done *properly* poor folks who insist on using IE get a
download box.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Tue, 19 Feb 2008 22:18:16
GMT Beauregard T. Shagnasty scribed:
Are you sure?

<http://validator.w3.org/check?verbose=1&uri=http://www.fingerlak
esbmw.org%2Ftest%2Fxhtml.php>

"Content-Type: application/xhtml+xml"

Yes, that's what it says, and I think it means the tested page is so
designated. But the _validator page_ is text/html.

Now check "Page Info" (right-click context) in Firefox and see what
content-type is actually rendered (for the validator).
 
B

Beauregard T. Shagnasty

Neredbojias said:
Beauregard T. Shagnasty scribed:

Yes, that's what it says, and I think it means the tested page is so
designated. But the _validator page_ is text/html.

Sure. As it should be. It is not a good idea to use
application/xhtml+xml on the web.
Now check "Page Info" (right-click context) in Firefox and see what
content-type is actually rendered (for the validator).

The validator sends as "text/html" as it should. How is that relevant?
You said, "the w3c validator doesn't *accept* the application/xhtml+xml
header." [emphasis mine], which I was rightly disputing.
 

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


Members online

Forum statistics

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

Latest Threads

Top