What is XHTML?

J

Jukka K. Korpela

Andy Dingley said:
My experience has been with Lottery and NOF funded sites, but there's
a similar lip-service to standards or acessibility, and a total
failure in practice.

That's fairly common - actually I don't know any official
recommendation or standard on Web site design or aspects thereof
that would even itself obey the principles it proclaims.
(I mean the Web versions of such documents. If they don't exist on the
Web at all, that's even worse - absolute inaccessibility in Web terms.)
 
F

Firas D.

Jukka said:
Are you sure? Many authoring tools spit out funny doctype declarations,
even completely bogus. Anyway, if your tools does strange things and
cannot be configured and you insist on using them, then "stubborn" is
indeed a word that comes into my mind.

Well, it's a stripped-down CMS of sorts (http://www.wordpress.org), not
an authoring tool. Outputs XHTML 1.1 and sends it with an XHTML 1.0
Transitional doctype. But then again, it outputs all sorts of data that
you'd raise eyebrows at, like RSS 2.0 (not blessed by any standards
body), Atom (going to the IETF but yet at version 0.3), and copious
amounts of RDF (is that a spec yet?)

So yeah, it can't be configured otherwise. And I have no other reason
not to love it (used on http://www.inthistogether.net, which is
basically where I and some others indulge our amateurism).
So why don't you use good old HTML, which you presumably understand?

I never claimed that :D No, I just have novice-level knowledge about the
strange ways of code.
No, there are lots of other useless things to be done, too.

Escape the ampersands? I never tried to validate stuff I authored as
HTML 4.01 (never put a doctype) so I'm not aware of major heartaches
that result from the conversion, but then again, I haven't done much
authoring at all.
It actually says very little about any rendering.

I meant in terms of what UAs conformant to HTML should do with tags like
<br />

It explains what
those funny <br /> things really are. If you don't care, fine. But why
do you use them if you don't know what they are? (And <br /> does not
_do_ anything different from <br> visually, except in the rare browsers
that comply with HTML 2.0, HTML 3.2, HTML 4.0, or HTML 4.01
specification - browsers that you probably never saw.)

well...

Ok, so what we have here is,

1) XHTML breaks backwards compatibility with proper browsers,
2) XHTML 2 breaks backwards compatibility with everything under the sun.

How do post-HTML 2.0 documents render in browsers which don't support
tags introduced later? Tags are ignored, right? (I'm just guessing from
<noscript> <noframes> etc.) So HTML 4.01 preserves
backwards-compatibility with a niche collection of UAs where XHTML
doesn't, which is the real argument against using the latter?

(Is it that much of a sin to say "good riddance" to browsers that are
painfully well-compliant with HTML but don't know XHTML?)
 
M

Mark Parnell

(Is it that much of a sin to say "good riddance" to browsers that are
painfully well-compliant with HTML but don't know XHTML?)

What, like all versions of Internet Explorer (for Windows at least)? No,
no sin to wish away ~85% of your visitors. Probably very stupid, but not
a sin. ;-)
 
B

Bernhard Sturm

Matthias said:
Could you point me to those rules? I guess I'm looking at the wrong
places. Thanks!

read my post above. The guidelines I am talking about are internal
guidelines handed to webdesigners during a tender phase.
But there is a federal law enforcing the use of XHTML/CSS together in
order to achieve a higher degree in accessibility on user agents for
handicaped people:

http://www.admin.ch/ch/d/sr/151_31/a10.html

The law enforces webdesigners to code along the most recent
recommendations of W3C.

HTH
bernhard
 
B

Bernhard Sturm

David said:
That isn't the point. The point is that XHTML doesn't contribute towards the
use of structured markup any more or less then regular HTML.

Look David, this is a bit a tricky one. It is a bit like you would
argue, that the German language also contains some four letter words,
and is therefore not suitable for the use in public places. You are
right. It's not suitable, and the German language does not enforce you
not to use the four letter words on public places. However you can still
speak decent German on public places without offending bystanders,
because the German language also contains a set of rules which allows
you to speak in a decent manner.
XHTML allows you to code pages well-formed, but - depending on the user
agent - you can also code nonwell-formed, and your page will still be
rendered (maybe not valid, but rendered).
You don't have to structure your code with <h1>, and your page will
still be rendered (it's a bit offensive for some user agents, but if
your target audience doesn't use that kind of user agent: who cares?
BTW this is the same for C#, Java, VBA, JS, PHP, Perl, English,
Chinese... All of these languages can be missused.
As I said - nobody is claiming that structured markup isn't a good idea,
only that XHTML enforces it.




OK, now I know one. However, as I said, I don't know if providing content
in, for example, XHTML Strict is going to be any good towards a WAP 2.0
user agent, but I do know that any variant of XHTML is going to cause
problems in some HTML user agents. Admittedly those HTML user agents which
get /> right are few and far between, so if WAP 2.0 agents can cope with
XHTML 1.0 Strict, then the weight will probably be towards those.

I wonder how they treat content types? Do they reject text/html resources
entirely? Attempt to render it no matter what content type it uses?

You have to use a mobile profile content type.
in this article you will find a description of how to use XHTML basic on
mobile devices:
http://builder.com.com/5100-6371-1051816.html

it's just more easier to make a page readable on any user agent if it's
already in wellformed XHTML, instead of cluttered HTML.


bernhard
 
B

Bernhard Sturm

Steve said:
Every element that's in XHTML 1.0 is in HTML 4.01 and vise versa.

don't just count the elements ;-)
a markup language is more than just the sum of their elements...
I use Lynx quite regularly.

then you might have recognised that Lynx is treating <h1> different than
a said:
You seem to have totally missed the point.

How does XHTML force authors to use <h1> instead of <div
class="title">?

It is obvious that <h1> is better. But XHTML does nothing to enforce
that on users.

nor does any other language do that. with PHP you can still produce
cluttered and unstructured code. XHTML offers you the possibility to
create wellformed code, whether you accept this or not, is entirely up
to you.
I have. Can you point at anything in the W3C specs that says that
XHTML 1.0 can't be used to create exactly the same presentational crud
that HTML 4.01 does?

:) no. you still can. Maybe this comparison might help you to
understand it a bit: using FreehandMX or Illustrator doesn't mean that
you automatically create nice designs and well organsied layouts. You
can still create layouts without using layers. However, this is
considered bad style by the design community, and doesn't help you to
maintain your drawings very well. Of course you can still print nice
posters with such layouts, but to maintain your drawings you need a lot
more time (and money if you rely on it).
XHTML does nothing to enforce or even encourage separation of
structure and layout. HTML 4.01 can be just as well separated as XHTML
1.0.

of course. but why not using wellformed code if you have the language
supporting it?

bernhard
 
B

Bernhard Sturm

David said:
WAP 2.0 is based on XHTML Basic, not Strict, not Transitional, but Basic.
Does that mean that documents still have to be converted?

yes. but if your structure is already in XHTML you don't need to fuzz
too much about it compared to HTML to bring it to XHTML basic.

see also:
http://www.w3.org/TR/xhtml-basic/

bernhard
 
B

Bernhard Sturm

Matthias said:
Cool, thanks! The only thing that bugs me here: They don't mention
people with learning disabilities.

no, as this would be more content related. I am working here together
with a company called lernetz ag (www.lernetz.ch), and they deal exactly
with those questions.
the above link covers the technical aspects of barrier-free webdesign.
and because in switzerland education is regulated by each canton, it's
up to the cantons administrations to set up rules of how content has to
be presented for people with learning disabilities. As far as I know,
this has never been done.

HTH
bernhard
 
S

Steve Pugh

Bernhard Sturm said:
don't just count the elements ;-)
a markup language is more than just the sum of their elements...

XHTML also has all the attributes that HTML has. The only differences
are in the syntax. How does a slightly different syntax benefit either
author or end user?
then you might have recognised that Lynx is treating <h1> different than
a <div class="h1"></div>?

Yes. But that has nothing to do with XHTML. Lynx treats <h1> in an
XHTML the same way it treats said:
nor does any other language do that.

XHTML offers you the possibility to
create wellformed code, whether you accept this or not, is entirely up
to you.

HTML offers exactly the same possibilities. I accept that fact - that
both HTML and XHTML can create nice clean, structured code. Look at my
home page and you'll see valid XHTML 1.0 Strict, but I also have an
identical version written in valid HTML 4.01 Strict. Do you think that
the XHTML is any better than the HTML one?

http://steve.pugh.net/default.html
http://steve.pugh.net/default-4.html
:) no. you still can.

Thank you.
of course. but why not using wellformed code if you have the language
supporting it?

I am 100% in favour of using well formed code (well formed has a
specific meaning in the context of XML, as we're comparing HTML and
XHTML I assume that you are using the term in a more general sense)
but I am not going to kid myself that using XHTML makes my code any
better, or that using XHTML will magically make a sloppy author write
better code.

Steve
 
B

Bernhard Sturm

Steve said:
I am 100% in favour of using well formed code (well formed has a
specific meaning in the context of XML, as we're comparing HTML and
XHTML I assume that you are using the term in a more general sense)
but I am not going to kid myself that using XHTML makes my code any
better, or that using XHTML will magically make a sloppy author write
better code.

no it does not :)
but since the doc type of XHTML is based on XML, and XHTML is a subset
of XML, and hence works with XML-based user agents, I am speaking of
wellformed in the sense of XML wellformed documents. (note, that this is
all according to the W3C: http://www.w3.org/MarkUp/
Why not using XHTML as your standard when it's there? closing all tags,
using lowercase and even if it's not part of XHTML rules: separating
structure from layout can indeed make your life much easier. And, yes:
you can still use VisualBasic 4.0 to program applications, but is it
very future safe?
I don't believe that this would be a good argument: 'In all available
browsers my HTML4.0 page looks perfect, so why using XHTML?'
It's not a good argument, because you are using currently available
browsers as your validators. What is with future user agents (note, that
I am not talking about browsers), that are based on XML, as recommended
by the W3C? WAP2.0 user agents (my nokia is already WAP2.0) are based
only on XHTML...

bernhard
 
E

Eric Bohlman

WAP2.0 user agents use XHTML as their basic profile, and not HTML. I
always wonder why so many webdesigner always think in terms of
IE/Mozilla/Opera when talking about user agents, and tend to forget
that there are millions of mobile users out their using their WAP
browsers. It's just much easier to have an XHTML site ready for WAP,
instead of an non-wellformed HTML site.

It's also true that not all (X)HTML is used in Web sites viewed with Web
browsers. It's also commonly used as a format for help files displayed by
applications; most GUI toolkits have an HTML-display widget. XHTML is at
least conceptually useful for such applications because the help displayer
could use a standard XML parser rather than either a full-blown SGML parser
or a custom-written HTML parser. That's not directly relevant to Web
authoring, but it does indicate a reason for defining an XML version of
HTML.
 
E

Eric Bohlman

XML is not very complex, but it isn't all that useful unless you are
planning to shunt data between systems.

Or unless you've got documents that need to be rendered in multiple forms.
Some years back on comp.text.xml, there was a post from the program
director of a community cable TV channel. He was getting quite frustrated
because he and his staff had to key in the station's program guide *four*
times:

1) To produce the channel's Web site.
2) To produce the channel's printed program guide.
3) To produce the channel's "scroller" that appears in between programs.
4) To set up the automation system to play the right tapes at the right
times.

The point was that, in principle (the technology wasn't mature enough at
the time), he could create *one* XML document which could then be
transformed to meet the needs of all four applications. Of course in this
case, the structure of the information is so regular that it could be
stored in a relational database, but it's easy to think of similar
applications where the information is "semi-structured" and therefore
doesn't map well into a repeated-records-with-defined-fields model.
 
B

Bernhard Sturm

Eric said:
It's also true that not all (X)HTML is used in Web sites viewed with Web
browsers. It's also commonly used as a format for help files displayed by
applications; most GUI toolkits have an HTML-display widget. XHTML is at
least conceptually useful for such applications because the help displayer
could use a standard XML parser rather than either a full-blown SGML parser
or a custom-written HTML parser. That's not directly relevant to Web
authoring, but it does indicate a reason for defining an XML version of
HTML.

ACK. we had to create a help system for a JAVA application that used a
linux XML parser as a help file viewer. XHTML was the only way to go.

bernhard
 
F

Firas D.

Mark said:
What, like all versions of Internet Explorer (for Windows at least)? No,
no sin to wish away ~85% of your visitors. Probably very stupid, but not
a sin. ;-)

I said painfully well-compliant :D Seriously, the only factors against
using XHTML seem to be

a) It's tough, which isn't really an issue for me--it's the only way I
know since I only started serious authoring late last year,
b) You have to lie about your content-type to IE, which really has no
noticeable effect,
c) Two or three marginal but celestially-forged UAs choke on it. Really,
their users should upgrade by now.
 
P

Paul Furman

Eric said:
...unless you've got documents that need to be rendered in multiple forms.
...
The point was that, in principle (the technology wasn't mature enough at
the time), he could create *one* XML document which could then be
transformed to meet the needs of all four applications.


Thanks folks, now I'm starting to understand the potential applications.

Of course in this
case, the structure of the information is so regular that it could be
stored in a relational database, but it's easy to think of similar
applications where the information is "semi-structured" and therefore
doesn't map well into a repeated-records-with-defined-fields model.


Oh, this is very interesting to me. So the XML technique allows a really
flexible data structure. I've got data for plant species lists that
would be nice to organize in all sorts of varying circular and dendritic
type logical structures but some levels of those branches might be
treated differently. Then somewhere in there I want to link the
descriptions to photographs which often show more than one species.

Another thing I'm interested in is compiling availability lists from
various sales outlets (each with their own format) so that has to do
with data exchange rather than just the one way client-server relationship.

Here's a powerpoint slideshow that covers some of those topics:
http://ted.see.plymouth.ac.uk/andyhandouts/ISAD320/XML databases.ppt
Google's html translation:
<http://216.239.57.104/search?q=cach...ases.ppt+xml+"semi-structured"&hl=en&ie=UTF-8>


Hmmm, it looks really simple actually, Self-Describing data that just
tells what the name of the field is so you don't need a pre-configured
database structure to hang it on or view it through. It looks awfully
clunky though. And I still don't get how it's supposed to figure out how
to present itself. I guess you have to also write rules for sorting and
formatting each field. I'm not sure how this is easier maybe just that
it's completely self contained/self described. I don't know if there is
a bunch of complicated scripting that goes on behind the scenes on the
server side. If so it's not much different than ASP or PHP with an SQL
database.
 
M

Mark Parnell

You don't have to structure your code with <h1>, and your page will
still be rendered (it's a bit offensive for some user agents, but if
your target audience doesn't use that kind of user agent: who cares?
BTW this is the same for C#, Java, VBA, JS, PHP, Perl, English,
Chinese... All of these languages can be missused.

Which is exactly what David was saying. XHTML can be misused just as
easily/as much as HTML can/is.
 
M

Mark Parnell

I said painfully well-compliant :D Seriously, the only factors against
using XHTML seem to be
<snip>

d) It offers no real advantages over HTML in the majority of instances.
There are a few cases where it can be genuinely useful, but they are
rare.

By all means, if you want to use XHTML, do so. I'm not going to stop
you. :) But personally I don't really see the point for most sites.
 
B

Bernhard Sturm

Mark said:
Which is exactly what David was saying. XHTML can be misused just as
easily/as much as HTML can/is.

yes, so then excuse my misinterpretation of his post. I read his post in
the way, that he was 'accusing' XHTML of not forcing authors into
structured coding. And I argued, that there is no markup language or any
other language that would do that, hence it's useless to blame the
language for unstructured code :)

cheers
bernhard
 
S

Steve Pugh

Bernhard Sturm said:
no it does not :)

I think you mean :-(
but since the doc type of XHTML is based on XML, and XHTML is a subset
of XML,

application of, not subset of.
and hence works with XML-based user agents, I am speaking of
wellformed in the sense of XML wellformed documents.

Rather pointless talking about it a conversation regarding HTML vs
XHTML. Well formedness is just on of the syntax differences between
the two, it is not a benefit in itself.
Why not using XHTML as your standard when it's there?

Using something because one can is what gives us all Flash web sites,
etc. Show me the clear benefits of XHTML over HTML.

At the moment HTML and Appendix C XHTML 1.0 are supported equally well
by all the tag soup slurpers out there. Using one or the other is
purely a matter of personal choice - I use XHTML 1.0 for my personal
home page and HTML 4.01 for other personal sites. For commercial site
I use HTML 4.01 unless XHTML is requested by the client.

I am not anti-XHTML, I am just trying to point out that XHTML is not
automatically better than HTML.
closing all tags,

A good idea that I was following before XHTML was even invented.
using lowercase

Actually makes editing pages harder for me. I like the contrast
between said:
and even if it's not part of XHTML rules: separating
structure from layout can indeed make your life much easier.

Again, I was doing that before XHTML existed.
I don't believe that this would be a good argument: 'In all available
browsers my HTML4.0 page looks perfect, so why using XHTML?'

That's not what I'm saying. For XHTML to be as good as the evangelists
say it is there have to be some tangible benefits.
It's not a good argument, because you are using currently available
browsers as your validators.

No, I'm using browsers as browsers and validators as validators.
WAP2.0 user agents (my nokia is already WAP2.0) are based only on XHTML...

What do these user agents do when presented with a page that is not
well-formed XHTML? What do they do when presented with a page that is
not valid XHTML? What do they do when presented with a page that is
HTML? I'm really curious because there are very few XHTML pages on the
web, and even fewer valid, well-formed ones. So how much of the web
can such browsers access?

Steve
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top