[OT] HTML, XHTML, ... ?

C

Chris Uppal

Apologies for an off-topic question.

I'm hoping to collect a few opinions about current best-practise for the
flavour of HTML to use. XHTML ? HTML 4.0 transitional ? HTML 4.0 strict ?
Or... ?

I'm not asking what the current recommendations by the W3C are, nor what the
standards-obsessed think the best practice /should/ be (I'm standard-obsessed
myself, and I have my own opinions on this), but what is currently accepted as
the "right thing" by the clueful.

(A word of explanation: I could ask on an HTML-related group, but while I'm
sure I would get well-informed, and highly opinionated, responses; I wouldn't
be able to /use/ those opinions without some knowledge of the people offering
them.)

Thanks for your patience.

-- chris
 
D

Daniel Dyer

Apologies for an off-topic question.

I'm hoping to collect a few opinions about current best-practise for the
flavour of HTML to use. XHTML ? HTML 4.0 transitional ? HTML 4.0
strict ?
Or... ?

I'm not asking what the current recommendations by the W3C are, nor what
the
standards-obsessed think the best practice /should/ be (I'm
standard-obsessed
myself, and I have my own opinions on this), but what is currently
accepted as
the "right thing" by the clueful.

I don't produce that many web pages but, for what it's worth, I use XHTML
1.0 Strict. I'm sure you're already aware of the pros and cons. You
might choose to use XHTML Transitional over Strict "to get things done",
if you are not fully up-to-speed with the Strict way of doing things
(which is mostly via CSS), but I don't see any compelling reason to favour
HTML over XHTML.

Dan.
 
T

Thomas Hawtin

Chris said:
I'm hoping to collect a few opinions about current best-practise for the
flavour of HTML to use. XHTML ? HTML 4.0 transitional ? HTML 4.0 strict ?
Or... ?

I don't have a good opinion, but... I did hear recently that W3C were
looking back to update the HTML 4 line. It would be more helpful if I
could remember where I heard that, or could find any references to it.

XHTML does really have seen to take off amongst the hoards of HTML
authors or with browser implementors. IIRC, the concept of the W3C HTML
effort was to standardise practice, rather than develop new stuff.

Tom Hawtin
 
W

Wesley Hall

Chris said:
Apologies for an off-topic question.

I'm hoping to collect a few opinions about current best-practise for the
flavour of HTML to use. XHTML ? HTML 4.0 transitional ? HTML 4.0 strict ?
Or... ?

XHTML Strict for me.

There are all kinds of compelling reasons, but one of the slightly less
conventional is that I can put the XHTML dtd in the doctype and IDEA
will give me auto completion and error highlighting. No reason to treat
*HTML any different from any other kind of XML document simply because
it is interpreted by the browser.

It's context sensitive though, if I am throwing up a quick page, I may
not be as strict with myself :)
 
D

David Segall

Chris Uppal said:
Apologies for an off-topic question.

I'm hoping to collect a few opinions about current best-practise for the
flavour of HTML to use. XHTML ? HTML 4.0 transitional ? HTML 4.0 strict ?
Or... ?

I'm not asking what the current recommendations by the W3C are, nor what the
standards-obsessed think the best practice /should/ be (I'm standard-obsessed
myself, and I have my own opinions on this), but what is currently accepted as
the "right thing" by the clueful.
You seem to have eliminated the only two sources of the "right thing".
The W3C use XHTML 1.0 which is why I chose it. The main arguments
against it from the "standards-obsessed" were first presented by Ian
Hickson <http://hixie.ch/advocacy/xhtml>. I don't find them convincing
because it seems desirable to head for the latest W3C recommendations
even if they are impossible to implement "correctly". Of course, you
should use CSS for the formatting and the [X]HTML tag based (only) on
the content.
 
A

Andrew Thompson

Well, I might have been really terse at your post
that was in the wrong usenet 'major hierarchy', but..
(explanation snipped earlier) shrugs.. yeah, OK.

The only pages I will do in '4.01 trans.' any more are
ones where I want to throw in an applet, and am too
lazy to deal with the tag soup mess that Sun
recommends, but then - I write far too many
applet pages anyway.

That has been my ideal *till* now, but..

I am tending to go with the general direction (most)
other posters and say 'stricter the better', and in
specific reference to XHTML. ..
....
The W3C use XHTML 1.0 which is why I chose it. The main arguments
against it from the "standards-obsessed" were first presented by Ian
Hickson <http://hixie.ch/advocacy/xhtml>. I don't find them convincing

Me neither. Most of the criticisms presented in
that page seem to focus on what happens to embedded
scripts and styles, and I think that encourages
putting the styles and scripts into external files* referenced
by link/import elements - the way they should be, then
separating styles for advanced and old browsers can be
much easier.
because it seems desirable to head for the latest W3C recommendations
even if they are impossible to implement "correctly".

Anything that helps encourage those (damn) browser
manufacturers to render valid content in a logical
(if not entirely predictable - I like to allow my users
to set their own font size) manner, has got to be a
good thing - far too much time and effort has gone into
second guessing what some crappy, broken HTML was
'supposed' to look like. :-/
...Of course, you
should use CSS for the formatting and the [X]HTML tag based (only) on
the content.

(Assuming I understood your last point correctly).
* ..which ties in with/supports that. Separate the content
from the styles - it makes so much more sense.

Andrew T.
 
A

Andy Dingley

Chris said:
Apologies for an off-topic question.

Take it to c.i.w.a.h

For that matter, just search c.i.w.a.h This is done to death twice
weekly.
I'm hoping to collect a few opinions about current best-practise for the
flavour of HTML to use. XHTML ? HTML 4.0 transitional ? HTML 4.0 strict ?

HTML 4.01 Strict. No exceptions, except possibly for internally to an
XML CMS where I'll use XHTML 1.0 Strict. Even if it's actually badly
done 3.2, then label the doctype as 4.01 Strict and proceed from there
to improve it.

You still can't use pure-XML XML on the web, so that's XHTML out of the
picture. Appendix C is viable, but harder to generate than HTML (for
most combinations of XML to (X)HTML, especially via XSLT)

Hixie is barking mad though.
 
S

Simon Brooke

Chris Uppal said:
Apologies for an off-topic question.

I'm hoping to collect a few opinions about current best-practise for the
flavour of HTML to use. XHTML ?
Yes.

HTML 4.0 transitional ?

Good God no, that's been obsolete for six years.

The primary reason to prefer XHTML over HTML is because you can use the
same parsers and transform engines on it as you use on everything else.
The reason to deprecate 'transitional' use is because it was intended to
help us transition from the bad old world of Netscape 4. Netscape 4 is
dead and gone, praise be; none of the features which are in transitional
but not in strict are any longer of any value to anybody.

Neither XHTML nor Strict are enough in themselves for good, flexible
design - you can create appalling abortions in both, as all the most
expensive 'Web design' agencies rejoice in demonstrating. But XHTML 1.0 is
a good place to start.
 
A

Andy Dingley

Oliver said:
Why (not)?

Label your XHTML with an appropriate HTTP content-type header for XML
and IE will choke on it.

If you take your same XHTML, label it with content-type as text/html
(as recommended by Appendix C) then this is actually HTML and will find
itself getting parsed as SGML. You can certainly make this work, but
it's harder and requires more obscure SGML knowledge then using plain
old HTML.

Most XML production processes revolve around XSLT and these permit an
easy serialisation into HTML for the final output step.
 
O

Oliver Wong

Andy Dingley said:
Label your XHTML with an appropriate HTTP content-type header for XML
and IE will choke on it.

If you take your same XHTML, label it with content-type as text/html
(as recommended by Appendix C) then this is actually HTML and will find
itself getting parsed as SGML. You can certainly make this work, but
it's harder and requires more obscure SGML knowledge then using plain
old HTML.

I tend to write my sites in XHTML1.0 Strict, and they tend to look fine
in IE6 (usually, though occasionally it'll messes up), FF1.5, FF2.0, Opera
(don't recall which version), and lynx. Haven't tried any of them in IE7
yet.

A quick check tells me that the content-type is probably always sent as
text/html.

- Oliver
 
A

Andy Dingley

Oliver said:
A quick check tells me that the content-type is probably always sent as
text/html.

Then they're not in XHTML, they're in Appendix C XHTML. Where it
matters, when you investigate in detail, this is actually closer to
HTML than to XHTML. You might be authoring in XHTML, but the
downstream processing is pure HTML with a funny doctype on it, and
relying on some recovery behaviours for mal-formed HTML.

If you get really into the details, this is more troublesome than
simply staying with pure HTML. In particular, Appendix C is hard to
produce reliably from XSLT.
 
O

Oliver Wong

Andy Dingley said:
Then they're not in XHTML, they're in Appendix C XHTML. Where it
matters, when you investigate in detail, this is actually closer to
HTML than to XHTML. You might be authoring in XHTML, but the
downstream processing is pure HTML with a funny doctype on it, and
relying on some recovery behaviours for mal-formed HTML.

If you get really into the details, this is more troublesome than
simply staying with pure HTML. In particular, Appendix C is hard to
produce reliably from XSLT.

You're getting a bit over my head with the "Appendix C is hard to
produce from XSLT" part, but I think I get what you're saying in the first
paragraph. Thanks.

- Oliver
 

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,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top