Re: Strict or Transitional

On Tue, 18 Jan 2005, David Dorward wrote:

> A better question - is the[re a] good reason to use Transitional?

Well, sometimes there is, like the fact that some visual properties
can be set using presentational HTML but no (working) CSS counterpart
exists. But it's a good idea to use Strict as far as feasible, and make
exceptions only after due consideration.

> > As i want to use the "target" attribute in <a ...> to open a link in
> > a new window. strict doesn't allow the attribut within the <a> tag.
>
> Why do you want that? Its generally considered harmful.

It's indeed harmful. Technically, however, it is possible to achieve such
an effect in many browsing situations using Strict HTML but then you
would use JavaScript to make a link open in a new window.

> Strict removes action and presentation from the markup language,
> leaving just structure, semantics and relationships.

Well, almost. Strict still has _some_ presentational attributes and
elements, with no apparent logic (e.g., the <b> element and the
width attribute for some elements).

> HTML is SGML based. XHTML is XML based. And that's the only difference
> between HTML 4.01 and XHTML 1.0 - both have Strict and Transitional
> (and Frameset for that matter) variants).

Well, almost.

In details, there are differences between HTML 4.01 and XHTML 1.0,
other than those resulting from the change of metalanguage.
Actually I have never taken a _really detailed_ look at the DTDs to find
out all the differences (has anyone?). In the prose description we find at
least the following statement in XHTML 1.0, which imposes a requirement
that is not present in HTML 4.01:
"XHTML 1.0 documents MUST use the id attribute when defining fragment
identifiers on the elements [a, applet, form, frame, iframe, img, and
map]"
   http://www.w3.org/TR/html/#h-4.10
On the other hand, this requirement is not part of the DTD (and cannot be,
since those elements need not define a fragment identifier).

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Tuesday, 18 January 2005 13:54:50 UTC