XHTML and how to do it right

D

DU

Jukka said:
Why would anyone convert anything to XHTML 1.1, which is just an
exercise in futility, except that it confuses some people, so that it's
worse than futile? And I'm afraid you are farther from actual use of
language information - those few programs that recognize language
markup may well know lang but not xml:lang.

This is what I wanted to know and didn't know.
There's such a thing as too much markup.




Pointless. There's a well-defined mechanism for declaring the document
language in HTML itself. Any software that does not use it will not be
a success in language support.

In HTML 4.01 said:
That hackery is what the specification tells you to use if you have
style attributes. But it's completely useless, since browsers default
to text/css anyway. Does any browser actually use such a tag for
anything?

css is/was not the only styling language, apparently. I just followed
what was in the spec.
Does any browser actually use such a tag for anything? Besides, if you
think you are doing the Right Thing, think again. There is no
registered Internet media type text/javascript.

[snipped]

That is not how I understood the use of this meta tag; I thought it was
to define a default scripting language for the document.

DU
 
J

Jukka K. Korpela

DU said:
In HTML 4.01, it would be the lang attribute in the <html> tag,
right?

Yes, the lang attribute in that tag _and_ in almost any other tag as
needed - you can, and by WAI rules should, specify all language changes
in the document. Besides, in principle the Content-Language header has
a slightly different meaning - it does not specify the language of the
document but the language(s) that is (or are) needed for understanding
the document. The distinction might be rather theoretical, but any
processing of the document's content by language-dependent rules should
be based on lang (or xml:lang) attributes.
Does any browser actually use such a tag for anything? Besides, if
you think you are doing the Right Thing, think again. There is no
registered Internet media type text/javascript.

[snipped]

That is not how I understood the use of this meta tag; I thought it
was to define a default scripting language for the document.

It is, but you actually cannot do that in a protocol-correct way. The
point is that by the specifications, the language shall be specified by
an Internet media type (somewhat odd, but that's what they decided),
and text/javascript is not registered, hence incorrect according to the
applicable RFC. So it's not a theoretically correct tag anyway, and on
the practical side, it is not needed.
 
J

Jukka K. Korpela

Toby A Inkster said:
DU would probably do better with:

<meta name="DC.date.created"
content="2004-01-28T09:54:03+08:00"
scheme="W3CDTF"
/>

Yes, if the intent is to specify the time of creation of the document.
However, the Dublin Core "standard" seems to be a moving target. Last
time I checked (a few days ago), the recommended practice, at
http://dublincore.org/documents/dcmi-terms/
was to use "DCTERM.created" rather than "DC.date.created".

(If such information is included as meta data, Dublin Core is probably
the best approach, since it's the only system that seems to have
chances of ever becoming common and widely supported.)
 
T

Toby A Inkster

Jukka said:
Yes, if the intent is to specify the time of creation of the document.

Well, I did also explain that there were also DC.date.modified, etc.
However, the Dublin Core "standard" seems to be a moving target. Last
time I checked (a few days ago), the recommended practice, at
http://dublincore.org/documents/dcmi-terms/
was to use "DCTERM.created" rather than "DC.date.created".

I just stick to the RFC 2731 syntax. And then use:

<head profile="http://www.ietf.org/rfc/rfc2731.txt">
<link rel="schema.DC" href="http://purl.org/DC/elements/1.2/" />
...
</head>
 
M

Mark Parnell

Also sprach Mark Parnell:


In which case the meta element would be necessary.

*If* the server doesn't send anything, and if you are using a charset
and characters within that charset that don't exist in the browser's
default charset (which of course you can't know). But the server should
always send the charset, so in theory (ha!), that will never happen.
So it would do no harm if it was present?

Unless it is different, as mentioned below.
I promise that will not happen.

But when someone else takes over when you get hit by a bus and then the
site gets moved to another server with a different default and he/she
doesn't change it (or something along those lines)... ;-) Yes, I'm
arguing against my comments above re: the server always sending the
information, but it is another thing to take into consideration.
Or if someone saves my page locally?

That too.

As I said, there are arguments both ways. It is up to you to decide
which way to go. :)
 
M

Mark Parnell

Also sprach Mark Parnell:
I hope you're not saying this is a good thing. Doctype sniffing is an
Evil Thing[TM], and should be condemned to the depths it came from.

But as long as it is there, the best approach would be to force "all"
browsers into standards compliant mode.

Of course. But DU made a comment about the fact that the doctype
declaration didn't do anything a few years ago, whereas now it is used
for doctype switching. The context seemed to indicate that he thought
this was a good thing. I was just clarifying that it is not.
B.T.W., why do browsers like Mozilla have a "quirks mode"?
In which way does it differ from their standards compliant mode?

In general they emulate the bugs in IE, so that all the sites that are
badly written to cater to IE's bugs will still display the way the
author intended, instead of the way they should.
 
T

Thomas Mlynarczyk

Also sprach Mark Parnell:
But when someone else takes over when you get hit by a bus and then

You think of everything... How could I possibly have overlooked *that*!
the site gets moved to another server with a different default and
he/she doesn't change it (or something along those lines)... ;-)

Then it will be the responsibility of my successor to do his/her job
properly.
As I said, there are arguments both ways. It is up to you to decide
which way to go. :)

I will probably stick to HTML 4.01 Strict after all. It will safe me from a
lot of trouble and the bus might spare me if it validates...
 
T

Thomas Mlynarczyk

Also sprach Mark Parnell:
In general they emulate the bugs in IE, so that all the sites that are
badly written to cater to IE's bugs will still display the way the
author intended, instead of the way they should.

Even the box model?
 
M

Matthias Gutfeldt

Thomas said:
Also sprach Mark Parnell:




Even the box model?

Mozilla doesn't use the broken box model in Quirks mode. But Opera does:

<http://www.opera.com/docs/specs/doctype/>
"Box-sizing is based on the IE/Windows border-box model in quirks mode

The CSS 'width' property specifies content width. In IE/Win 3.0-5.5 it
specifies content width + padding width + border. The same applies to
the 'height' property. Opera in Quirks Mode emulates this behavior.
Opera 7 and IE/Mac, but unfortunately not IE/Win, support the box-sizing
CSS property proposed for CSS 3. Netscape and Mozilla supports the
equivalent -moz-box-sizing property."


They deliberately introduce an error their browser never had. It's
reddicculoose.


Matthias
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top