Which spec to use?

S

Scott Johnson

Most of my experience is in back-end coding with PHP and MySQL but am
venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

Thanks
Scotty
 
R

rf

Scott said:
Most of my experience is in back-end coding with PHP and MySQL but am
venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

Given that the most common browser in use simply does not understand
XHLTML[1] your choice is pretty clear.

[1] Serve XHTML up to IE with the correct content type and it will politely
ask you if you want to download it. If you lie and serve it as text/html
then IE will happily error correct it to HTML.
 
R

rf

Ed said:
rf said:
Scott said:
Most of my experience is in back-end coding with PHP and MySQL but
am venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

Given that the most common browser in use simply does not understand
XHLTML[1] your choice is pretty clear.

[1] Serve XHTML up to IE with the correct content type and it will
politely ask you if you want to download it. If you lie and serve it
as text/html then IE will happily error correct it to HTML.

Is that still true with IE8?

I believe so. There surely would have been conserable fuss raised if they
had inadvertantly fixed it :)
 
R

rf

Scott said:
rf said:
Scott said:
Most of my experience is in back-end coding with PHP and MySQL but
am venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

Given that the most common browser in use simply does not understand
XHLTML[1] your choice is pretty clear.

[1] Serve XHTML up to IE with the correct content type and it will
politely ask you if you want to download it. If you lie and serve it
as text/html then IE will happily error correct it to HTML.

OK Thanks for the info.

I will stick to the html 4.01 strict specs then.

BTW is this the rf from the PHP ng?

Er, probably. I've never noticed another one. We all get around somewhat.
Why? Oh yes, the bad dope bit :)
 
L

Lars Eighner

In our last episode,
<[email protected]>,
the lovely and talented Scott Johnson
broadcast on alt.html:
Most of my experience is in back-end coding with PHP and MySQL but am
venturing out into the design area and need an opinion please.
Which spec would be the smartest one to live up to?
HTML 4.01 or XHTML 1.0 both being strict.

HTML 4.01. XHTML is not properly supported.

The idea of XHTML was to make transition/conversion to XML and other
sgml-type markup languages easier. However, XHTML leaves much to be
desired, part of which is XHTML's fault and part of which is owing to a
major browser not implementing it properly.

Much of the good XHTML promised can be achieved in HTML. You can close all
tags explicitly, you can use lowercase tag and attribute names, and you can
give a boolean attribute its own name as a value. You cannot close empty
tags, but if your markup is otherwise valid, it should be a simple matter to
write a filter to do this if you ever need to make a conversion. If you
are validating to strict you should have a leg up on avoiding deprecated
elements and attributes.
 
C

C A Upsdell

rf said:
Most of my experience is in back-end coding with PHP and MySQL but am
venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

Given that the most common browser in use simply does not understand
XHLTML[1] your choice is pretty clear.

Given that the most common browser renders XHTML sites just fine if the
sites are designed to conform to Appendix C of the XHTML 1 spec -- and
Appendix A of the XHTML Media Types spec -- the choice is not so clear.

(Hint: I have been making XHTML sites since the 1.0 spec spec appeared
.... with nary a problem.)

Of course the purists will wail and hunt you down if you use XHTML,
hence cowardice may be the better part of valour.
 
R

rf

C said:
rf said:
Most of my experience is in back-end coding with PHP and MySQL but
am venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

Given that the most common browser in use simply does not understand
XHLTML[1] your choice is pretty clear.

Given that the most common browser renders XHTML sites just fine if
the sites are designed to conform to Appendix C of the XHTML 1 spec

Which basically just means that your XHTML is written so as to be able to be
read as tag soup by an HTML user agent. You know, add a space before the /
so <br /> may be error corrected to <br> and write <p></p> rather than <p/>.

The title of appendix C even tells you this: HTML Compatibility Guidlines.
In the first paragraph we find "... who wish their XHTML documents to render
on existing HTML user agents."

IE is an HTML user agent. It does not render XHTML, it error corrects it to
HTML and renders that.

Appendix C further states: "Note that this recommendation does not define
how HTML conforming user agents should process HTML documents" to which I
would further suggest that niether does it define how HTML conforming user
agents should process XHTML documents, even appendix C conforming ones.

Further to that, by writing correctly formed (even allowing for appendix C)
XHTML you should have put a, XML declaration or whatever it is at the front
of the document, before the DOCTYPE. This of course puts IE into quirks
mode, where it carefully reproduces the layout bugs back to version 5.5.

So, why are you risking your sites on the non-defined error correction
capabilites of IE running in quirks mode?
(Hint: I have been making XHTML sites since the 1.0 spec spec appeared
... with nary a problem.)

You can make whatever sort of sites you want to, I personally make HTML
sites :)
 
R

rf

Ed said:
So, can someone make a case for using XHTM instead of HTML? I mean, is
there any case where it /should/ be (or /needs/ to be) used?

You just might be exporting the page from something that uses XML in its
underlying architecture. XML to XHTML is easy, because XHTML *is* XML. XML
to HTML is a bit harder.

This is of course a wild guess. I have never done such a thing.
 
R

rf

C said:
rf said:
Most of my experience is in back-end coding with PHP and MySQL but
am venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

Given that the most common browser in use simply does not understand
XHLTML[1] your choice is pretty clear.

Given that the most common browser renders XHTML sites just fine if
the sites are designed to conform to Appendix C of the XHTML 1 spec
-- and Appendix A of the XHTML Media Types spec -- the choice is not
so clear.

A further thing I forgot. You have to serve your XHTML document as text/html
or IE will ask you if you want to download it.

So, you aren't really serving XHTML at all, even to user agents that *do*
understand XHTML (unless you indulge in some server side browser sniffing).
Why go to all of the trouble to write XHTML (not that it's much trouble
anyway) and then lie about it by telling the browsers it is actually HTML?
 
N

Nik Coughlin

Ed Mullen said:
So, can someone make a case for using XHTM instead of HTML? I mean, is
there any case where it /should/ be (or /needs/ to be) used?

If you want to be able to post-process your web pages in some way with
another tool that understands well formed XML but not HTML
 
J

John Hosking

C said:
Of course the purists will wail and hunt you down if you use XHTML,
hence cowardice may be the better part of valour.

This could be the key I've been missing to let me unlock the door to
true enlightenment. I think I will add this to my .sig, and meditate on
the meaning of it. :)
 
D

David Segall

Scott Johnson said:
Most of my experience is in back-end coding with PHP and MySQL but am
venturing out into the design area and need an opinion please.

Which spec would be the smartest one to live up to?

HTML 4.01 or XHTML 1.0 both being strict.

The main arguments against XHTML are at
<http://www.hixie.ch/advocacy/xhtml>.
An amusing counter-argument to Hickson's is here
<http://lists.w3.org/Archives/Public/www-html/2007Jun/0008.html>.
The main argument in favour of XHTML is that the World Wide Web
Consortium, the source for HTML scripture, uses it
<http://www.w3.org/MarkUp/Activity.html>.
 
B

Beauregard T. Shagnasty

David said:
The main argument in favour of XHTML is that the World Wide Web
Consortium, the source for HTML scripture, uses it
<http://www.w3.org/MarkUp/Activity.html>.

Content-Type: application/xhtml+xml; charset=utf-8

The amusing part of that page is that 58.3% of visitors will be asked if
they want to "download the page." <lol>
 
D

David Segall

So, can someone make a case for using XHTM instead of HTML? I mean, is
there any case where it /should/ be (or /needs/ to be) used?

I don't think that is necessary. The W3C uses and recommends XHTML so
it is up to its detractors to make a case for _not_ using XHTML. The
entire argument is based on conforming to standards and the source of
those standards is the W3C. There is a simple work-around for the
failure of Internet Explorer to correctly interpret the XHTML standard
and the DOCTYPE ensures that the author adheres to XHTML even if a
browser does not.
 
D

dorayme

David Segall said:
There is a simple work-around for the
failure of Internet Explorer to correctly interpret the XHTML standard
and the DOCTYPE ensures that the author adheres to XHTML even if a
browser does not.

There are criticisms that IE does not "correctly" interpret the XHTML
standard.
 
B

Beauregard T. Shagnasty

These folks have presented a fairly good argument for using HTML:
<http://www.webdevout.net/articles/beware-of-xhtml>
I don't think that is necessary. The W3C uses and recommends XHTML so
it is up to its detractors to make a case for _not_ using XHTML.

Um, but they cheat and send their pages as:
Content-Type: text/html; charset=utf-8
instead of:
Content-Type: application/xhtml+xml; charset=utf-8
which is the correct content-type for XHTML.

This previous link you posted does use the correct content-type. How do
you see this page in Internet Explorer?
<http://www.w3.org/MarkUp/Activity.html>

The page also uses the correct XML prologue, and IE just dies.
<?xml version="1.0" encoding="utf-8"?>

Besides, I do not see anything on that page which states the W3C
actually recommends that anyone actually *use* XHTML. It's just an essay
on what's happening with their committees.
The entire argument is based on conforming to standards and the source
of those standards is the W3C.

I think you are confusing the meaning of "standards." Properly marked
HTML is a "standard."
There is a simple work-around for the failure of Internet Explorer to
correctly interpret the XHTML standard and the DOCTYPE ensures that
the author adheres to XHTML even if a browser does not.

...and that work-around is to cheat and tell your server not to send it
as XHTML, even though the markup may be valid.
 
D

David Segall

Beauregard T. Shagnasty said:
Content-Type: application/xhtml+xml; charset=utf-8

The amusing part of that page is that 58.3% of visitors will be asked if
they want to "download the page." <lol>

I had no trouble reading it on my computer. I use Firefox with the IE
View Add On, so I let Microsoft decide which version of Internet
Explorer they want me to use. They tell me it's currently 7.0.5730.11.

I tried the page in browsershots
<http://browsershots.org/http://www.w3.org/MarkUp/Activity.html> and
it seems to work in IE 5.5 and later. Based on that, I would expect
that only 13.8435% of visitors would have difficulty viewing the page.
Why do you think your estimate is more accurate than mine?
 
B

Beauregard T. Shagnasty

David said:
I had no trouble reading it on my computer. I use Firefox with the IE
View Add On, so I let Microsoft decide which version of Internet
Explorer they want me to use. They tell me it's currently
7.0.5730.11.

I tried the page in browsershots
<http://browsershots.org/http://www.w3.org/MarkUp/Activity.html> and
it seems to work in IE 5.5 and later. Based on that, I would expect
that only 13.8435% of visitors would have difficulty viewing the page.

Note that the Activity.html page does some cheating [1]. While its
server is sending as application/xhtml+xml, there is a meta line of:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
and who knows how that will affect browsershots or your Firefox addon.

I would suggest you use a real Internet Explorer running in some version
of Windows, rather than an add-on, or a "viewer" that may or may not
ignore the actual content type.

Here's another test for you. Try one of the XHTML links here on my site:
http://tekrider.net/html/doctype.php
Use a real Internet Explorer.
Why do you think your estimate is more accurate than mine?

What, that 58.3%? Heh, just a wild guess for today's IE users. There's
no real way to get an accurate measurement; UA strings are easily
forged.

[1] The cheating at W3C implies to me that even they believe that the
Web is not ready for XHTML. Not while Microsoft is in the browser
business.
 
D

David Segall

Beauregard T. Shagnasty said:
David said:
I had no trouble reading it on my computer. I use Firefox with the IE
View Add On, so I let Microsoft decide which version of Internet
Explorer they want me to use. They tell me it's currently
7.0.5730.11.

I tried the page in browsershots
<http://browsershots.org/http://www.w3.org/MarkUp/Activity.html> and
it seems to work in IE 5.5 and later. Based on that, I would expect
that only 13.8435% of visitors would have difficulty viewing the page.

Note that the Activity.html page does some cheating [1]. While its
server is sending as application/xhtml+xml, there is a meta line of:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
and who knows how that will affect browsershots or your Firefox addon.

I would suggest you use a real Internet Explorer running in some version
of Windows, rather than an add-on, or a "viewer" that may or may not
ignore the actual content type.

Here's another test for you. Try one of the XHTML links here on my site:
http://tekrider.net/html/doctype.php
Use a real Internet Explorer.
Why do you think your estimate is more accurate than mine?

What, that 58.3%? Heh, just a wild guess for today's IE users. There's
no real way to get an accurate measurement; UA strings are easily
forged.

[1] The cheating at W3C implies to me that even they believe that the
Web is not ready for XHTML. Not while Microsoft is in the browser
business.

I'm sorry. My post extremely badly expressed. Let me try again.

My Internet Explorer, Version 7.0.5730.11 displays the page correctly.
The version 5.5, 6.0, 7.0 and 8.0 of Internet Explorer used by
browsershots to render the page display it correctly. Why do you think
that any browser released this century would ask the visitor if they
want to download the page?

I don't dispute that there is a problem and your page does demonstrate
it. I just don't see a problem with the W3C page and I would be
stunned if they included content that would be difficult to read using
Internet Explorer.
 
B

Beauregard T. Shagnasty

David said:
Beauregard T. Shagnasty said:
David Segall wrote:
<http://www.w3.org/MarkUp/Activity.html>.

Content-Type: application/xhtml+xml; charset=utf-8

I tried the page in browsershots
<http://browsershots.org/http://www.w3.org/MarkUp/Activity.html>
and it seems to work in IE 5.5 and later. Based on that, I would
expect that only 13.8435% of visitors would have difficulty viewing
the page.

Note that the Activity.html page does some cheating [1]. While its
server is sending as application/xhtml+xml, there is a meta line of:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/> and who knows how that will affect browsershots or your Firefox
addon.

I would suggest you use a real Internet Explorer running in some
version of Windows, rather than an add-on, or a "viewer" that may or
may not ignore the actual content type.

Here's another test for you. Try one of the XHTML links here on my
site: http://tekrider.net/html/doctype.php Use a real Internet
Explorer.

[1] The cheating at W3C implies to me that even they believe that
the Web is not ready for XHTML. Not while Microsoft is in the
browser business.

I'm sorry. My post extremely badly expressed. Let me try again.

My Internet Explorer, Version 7.0.5730.11 displays the [W3C] page
correctly. The version 5.5, 6.0, 7.0 and 8.0 of Internet Explorer
used by browsershots to render the page display it correctly.

Since we don't know exactly how browsershots works, I'll take a stab at
it. I'd say that their server does a wget of a submitted page, and
stores the result to a temporary space. It then locally feeds the result
to the various selected browser engines, on their server. Therefore, the
actual page's server content-type is never seen by browsershots.
Why do you think that any browser released this century would ask the
visitor if they want to download the page?

That would be a question to ask Microsoft, whose browsers do not
understand properly-sent XHTML with the proper content-type of
application/xhtml+xml.
I don't dispute that there is a problem and your page does demonstrate
it.

So with my page in your own Internet Explorer, the problem was? It
offered to "download the file" ?

I've just sent my page to browsershots and chose IE 6 and 7.
http://tekrider.net/html/doc.xhtml1.0.php
After waiting about an hour, it came back and said that "IE6 not
available" and displayed it correctly with IE7. So their tool does not
recognize my server's content-type.
I just don't see a problem with the W3C page and I would be
stunned if they included content that would be difficult to read
using Internet Explorer.

And again, this is because they cheat and send a content-type of
text/html, which is something IE can comprehend.

Would anyone else care to step in and confirm that Internet Explorer
cannot comprehend XHTML sent as application/xhtml+xml? And that sending
XHTML with the required XML Prolog line above the doctype throws IE into
quirks mode?

As I stated previously, I think the world is not ready for real XHTML as
long as Microsoft is in the browser business.
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top