XHTML 1.0 or HTML 4.01 - thoughts

R

Rob

Hi Folks

Before I launch into creating a new website, looking at the doctype...
what's the feeling on whether I should start using XHTML1.0 or stick with
HTML 4.01? Or doesn't it really matter? The w3 site mentions more UAs such
as cell phones, televisions, cars, wallet sized wireless communicators,
kiosks (and the reflections on the back of a wombat's botty) in context, but
correctly formed html should do that job, no?

Many thanks
Rob
Melbourne, Oz
 
M

Mark Parnell

Hi Folks
G'day.

what's the feeling on whether I should start using XHTML1.0 or stick with
HTML 4.01?

Do you need to use XML tools for the site? If so, use XHTML. Otherwise,
you may as well use HTML. At least IE actually understands HTML.
 
N

Neal

Hi Folks

Before I launch into creating a new website, looking at the doctype...
what's the feeling on whether I should start using XHTML1.0 or stick with
HTML 4.01? Or doesn't it really matter? The w3 site mentions more UAs
such
as cell phones, televisions, cars, wallet sized wireless communicators,
kiosks (and the reflections on the back of a wombat's botty) in context,
but
correctly formed html should do that job, no?

Many thanks
Rob
Melbourne, Oz


XHTML has real value if you are using XML tools for building the pages, or
if you plan on serving XHTML to the browsers (and have a reliable content
negotiation plan for serving IE text/html instead).

Use HTML 4.01 Strict, but employ the strictness of XHTML like lower-case
tags and closing all non-empty elements.
 
R

RobM

XHTML has real value if you are using XML tools for building the pages, or
if you plan on serving XHTML to the browsers (and have a reliable content
negotiation plan for serving IE text/html instead).

Use HTML 4.01 Strict, but employ the strictness of XHTML like lower-case
tags and closing all non-empty elements.

Thanks - I'm definitely doing the lower-case and the closing tags thing (the
latter's got me in trouble before).
Cheers for the advice.
Rob
 
R

RobM

Mark Parnell said:
Do you need to use XML tools for the site? If so, use XHTML. Otherwise,
you may as well use HTML. At least IE actually understands HTML.

Thanks Mark, no XML tools involved.
Cheers for the reply
Rob
 
S

SpaceGirl

RobM said:
Thanks Mark, no XML tools involved.
Cheers for the reply
Rob

Not even RSS? How quaint :)

I'd say work to XHTML... all of our own sites are now XHTML. It makes
the cross browser stuff easier, even when you have to cludge for IE.
Plus, it's a good habit to get into for future projects when XML (beyond
RSS) is needed.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
W

Webcastmaker

Before I launch into creating a new website, looking at the doctype...
what's the feeling on whether I should start using XHTML1.0 or stick with
HTML 4.01? Or doesn't it really matter? The w3 site mentions more UAs such
as cell phones, televisions, cars, wallet sized wireless communicators,
kiosks (and the reflections on the back of a wombat's botty) in context, but
correctly formed html should do that job, no?

Not all browsers understand XHTML.
 
R

RobM

what's the feeling on whether I should start using XHTML1.0 or stick
Not even RSS? How quaint :)

I'd say work to XHTML... all of our own sites are now XHTML. It makes
the cross browser stuff easier, even when you have to cludge for IE.
Plus, it's a good habit to get into for future projects when XML (beyond
RSS) is needed.

x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #

Hmmm... interesting...
http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html
Cheers
Rob
 
A

Andy Dingley

what's the feeling on whether I should start using XHTML1.0 or stick with
HTML 4.01?

Yes, you should definitely do one of these.

Doesn't matter much which one. Just choose one (flip a coin) and then
_do_it_. Write valid code, and check it afterwards. Pick any standard
you like, but actually comply with it. There's no clear advantage of
one over the other - if there is a benefit, it comes from being
_compliant_, not from some inherent superiority of one standard.

X1.0 is the same as H4.01 anyway - just re-cast in XML. It's nothing
like the difference from H3.2 to H4.


The benefits to be had here are twofold, one from standards compliance
(any standard) and one from not writing bogus code. For legacy reasons
you could still write valid but bogus code, but you shouldn't do so.
Ditch the nested <blockquote>s and the <img src='1x1.gif' >. It's time
to do it right.


Avoid the Strict DTDs. No benefit to be had there. It's _not_
"better".


Use XHTML if you have the slightest interest in using XML tools for
any sort of content management. Do it anyway, you'll be grateful
later.
 
T

Toby Inkster

Andy said:
Avoid the Strict DTDs. No benefit to be had there. It's _not_
"better".

Strict DTDs are "better". They force you to avoid certain nastinesses,
such as <font> and target="_blank".
 
A

Andy Dingley

Strict DTDs are "better". They force you to avoid certain nastinesses,
such as <font> and target="_blank".

No, _ignoring_ <font> is what causes you to avoid <font>. Now <font>
is bogus, and it's a good thing to avoid, but it's one of the rare
cases where the DTD assists rather than remaining neutral.

I don't have any problems with legacy <font> in old pages. Markup
with some other presentation control instead (classes and CSS), then a
trivial regex to strip the <font> tags themselves - problem solved.
What's much harder is something like a nested tables page layout - you
have to fix this by manual rework rather than just killing tags and
the DTD is of no help.

The target attribute is a loss on Strict. Target is _good_ and useful
if you need a popup. Popups aren't evil, spurious popups are evil.
 
J

Jukka K. Korpela

Toby Inkster said:
Strict DTDs are "better". They force you to avoid certain nastinesses,
such as <font> and target="_blank".

Force does not work on WWW. :)

Worshipping Strict DTDs just makes people replace <font> by CSS
monstrosities like font-size: 9pt (which is considerably more harmful
than <font>) and target="_blank" by JavaScript code that opens a "link",
in a manner that sets up no link when JavaScript is off.

Strict DTDs are only useful to authors who already know what to do and
just use validators to check, among other things, that they didn't use
deprecated features _by accident_.
 
R

RobM

Andy Dingley said:
No, _ignoring_ <font> is what causes you to avoid <font>. Now <font>
is bogus, and it's a good thing to avoid, but it's one of the rare
cases where the DTD assists rather than remaining neutral.

The target attribute is a loss on Strict. Target is _good_ and useful
if you need a popup. Popups aren't evil, spurious popups are evil.

I have actually used 'target' (yikes... ducks...) for a link that opens up a
PDF file (dynamically created in an app server) so the adobe (etc) is opened
away from the web application; user still has the nav links. I've seen the
whole page replaced by adobe if user has set to open within browser. Just an
example how I've used that.

Cheers
Rob
 
N

Nick Theodorakis

[...]
I have actually used 'target' (yikes... ducks...) for a link that opens up a
PDF file (dynamically created in an app server) so the adobe (etc) is opened
away from the web application; user still has the nav links. I've seen the
whole page replaced by adobe if user has set to open within browser. Just an
example how I've used that.

However, if the user's browser already opens PDF files in its own
application rather than in the browser window, the user gets an extra
useless blank page she has to close.

Nick
 
A

Adrienne

Gazing into my crystal ball I observed (e-mail address removed) (Nick
Theodorakis) writing in
[...]
I have actually used 'target' (yikes... ducks...) for a link that opens
up a PDF file (dynamically created in an app server) so the adobe (etc)
is opened away from the web application; user still has the nav links.
I've seen the whole page replaced by adobe if user has set to open
within browser. Just an example how I've used that.

However, if the user's browser already opens PDF files in its own
application rather than in the browser window, the user gets an extra
useless blank page she has to close.

Nick

I really don't like PDF... no I shouldn't say that. I should say I would
like authors to clearly indicate that a link is a PDF. I do not like PDF
documents that open in browser windows, a) because I usually have a lot of
stuff running and it may crash the browser or my system, b) the useless
blank page.
 

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,282
Latest member
RoseannaBa

Latest Threads

Top