B
Bernhard Sturm
Steve said:What do these user agents do when presented with a page that is not
well-formed XHTML?
the page will not being rendered...
What do they do when presented with a page that is
not valid XHTML?
the page will not being rendered...
What do they do when presented with a page that is
HTML?
the page will not being rendered...
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?
a few.
all of these discussions are always a bit like wagging the dog. I know
it's a pain in the ass, but if you have rules (reading standards), you
shall not bend them to your own needs ;-)
many webauthors say: 'the browser is rendering even badly nested HTML
perfectly, although it's not recommended by W3C and non-standardised,
non-valid code, it's perfectly working in 90% of all browsers, hence
it's valid for my own purpose and the targeted audience!'
But then comes the day, when certain UAs emerge that have, for the sake
of accessibilty, implemented the W3C standards, suddenly those HTML
quirk mode pages will no longer work... Now, who are you going to blame?
The UA which is running in XHTML strict mode not trying to 'guess' what
the author wanted with his/her code (as does ATM IE6.x) or the author
who was just too lazy to adopt to a new standard?
Those guessing HTML UAs are a real pain, because you can code your page
in a very bad manner (using uppercase tags, using badly nested
arguments), and people tend to think, that this is great, as the browser
is rendering the page perfectly.
All this reminds me of the old Pascal vs Basic discussion. Both were
valid and powerful languages. Pascal forced the user to declare
variables, Basic didn't. A lot programmers said: Basic is more flexible
as the language let us the freedom to introduce variables where ever we
want. However, they usually forgot how difficult it was to debug a Basic
source where every 5th line you introduce randomly a new variable (and
don't forget the misspelled var names).
I personally don't care if people favour HTML instead of XHTML, as I
tend to stick more on the secure side: if XHTML forces me to use
lowercase (which complies with my usual programming habits where a
variable name TimeStamp is not the same as timestamp), and forces me to
nest my tag structure in a well-formed manner, then I am in. (don't
forget: you CAN do this as well in HTML, but it's you, the human author,
who has to enforce it. One mistake, and your HTML code will still
render. One mistake in XHTML and your code is non-valid.)
I leave it to you to judge.
cheers
bernhard
www.daszeichen.ch
remove nixspam to reply