Prevalence of XHTML?

Discussion in 'HTML' started by Neo Geshel, Apr 16, 2007.

  1. Neo Geshel

    Neo Geshel Guest

    I am curious about the prevalence of XHTML usage among web developers,
    and its usage in web sites in general. Does anyone have any statistics
    that could show the numbers of sites created in XHTML (all flavours) in
    comparison to traditional HTML (including spaghetti code sites)?

    Just curious.
    ...Geshel
    --
    *********************************************************************
    My return e-mail address is an automatically monitored spam honeypot.
    Do not send e-mail there unless you wish to be reported as a spammer.
    Please send all e-mail to my first name at my last name dot org, with
    a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
    *********************************************************************
    Neo Geshel, Apr 16, 2007
    #1
    1. Advertising

  2. Neo Geshel

    cwdjrxyz Guest

    On Apr 16, 5:49 pm, Neo Geshel <> wrote:
    > I am curious about the prevalence of XHTML usage among web developers,
    > and its usage in web sites in general. Does anyone have any statistics
    > that could show the numbers of sites created in XHTML (all flavours) in
    > comparison to traditional HTML (including spaghetti code sites)?


    Many write code in xhtml. However, this is useless unless the page is
    served properly as aplication/xml+xhtml, since if you just serve as
    the usual text/html, the xhtml code gets treated as ordinary html and
    not xhtml. The IE browsers can not handle true xhtml served properly,
    and if a page claiming to be xhtml can be viewed on an IE browser, it
    is not - just mis-served xhtml being treated as html. You have to
    convert an xhtml page to html for it to be seen on IE. This can
    involve separate xhtml and html pages with some mechanism to detect if
    the browser will accept xhtml at all, sometimes done with header
    exchange info, or if xhtml support is not detected, php or some other
    server side script is used to convert a single xhtml page to a html
    4.01 strict page for IE and other browsers that do not handle xhtml. I
    would guess that at least 95% of pages claiming to be xhtml are mis-
    served as only html. Since most servers already associate .html with
    the mime type for text/html, you must then use some other extension
    such as .xhtml or .xml and associate it with the mime type application/
    xml+xhtml for a true xhtml page.
    cwdjrxyz, Apr 17, 2007
    #2
    1. Advertising

  3. Scripsit Neo Geshel:

    > I am curious about the prevalence of XHTML usage among web developers,


    There are many ways to get cured from pointless curiosity. Did you try
    getting some interesting hobby?

    > Does anyone have any statistics
    > that could show the numbers of sites created in XHTML (all flavours)
    > in comparison to traditional HTML (including spaghetti code sites)?


    There are lots of statistics on the web, but you can generate statistics of
    comparable quality by using your favorite random number generator.

    But as a reliable piece of information, I can tell you that the percentage
    of web sites using genuine XHTML, declared as XHTML in HTTP headings, is
    zero (0), with a sufficient accuracy.

    > *********************************************************************
    > My return e-mail address is an automatically monitored spam honeypot.
    > Do not send e-mail there unless you wish to be reported as a spammer.
    > Please send all e-mail to my first name at my last name dot org, with
    > a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
    > *********************************************************************


    If that's your attitude, please report me as a spammer. Oh, and please keep
    that attitude visible in your sig as long as your message contents are not
    worth reading.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Apr 17, 2007
    #3
  4. Neo Geshel

    asdf Guest

    "Jukka K. Korpela" <> wrote in message
    news:091Vh.37964$...
    > Scripsit Neo Geshel:
    >
    >> I am curious about the prevalence of XHTML usage among web developers,

    >
    > There are many ways to get cured from pointless curiosity. Did you try
    > getting some interesting hobby?
    >


    It is a valid question, and worth pursuing. Your response reveals more about
    your own boring life than that of the OP.
    asdf, Apr 17, 2007
    #4
  5. Neo Geshel

    Steve Pugh Guest

    On Apr 16, 11:49 pm, Neo Geshel <> wrote:
    > I am curious about the prevalence of XHTML usage among web developers,
    > and its usage in web sites in general. Does anyone have any statistics
    > that could show the numbers of sites created in XHTML (all flavours) in
    > comparison to traditional HTML (including spaghetti code sites)?


    The biggest survey that I know of was the one carried out by Ian Hixie
    at Google: http://code.google.com/webstats/index.html This was carried
    out over a billion documents in December 2005.

    He doesn't record any data concerning doctypes but the occurence of
    the xmlns attribute on the html element was quite low:
    http://code.google.com/webstats/2005-12/pageheaders.html

    Steve
    Steve Pugh, Apr 17, 2007
    #5
  6. Neo Geshel

    mbstevens Guest

    On Mon, 16 Apr 2007 18:37:55 -0700, cwdjrxyz wrote:
    The IE browsers can not handle true xhtml served properly,
    > and if a page claiming to be xhtml can be viewed on an IE browser, it
    > is not - just mis-served xhtml being treated as html.


    You are right that IE does not serve xml pages as xml. But
    some pages can be served as xml to an IE browser and the browser still
    displays them as the author wishes. One should avoid serving xml to IE
    only if the page displays in a way the author does not want in IE. I find
    it easy to write pages that display as I want in IE -- probably because my
    style is not to use overly complicated layouts.
    --
    mbstevens
    http://www.mbstevens.com/
    mbstevens, Apr 17, 2007
    #6
  7. Jukka K. Korpela wrote:

    > There are lots of statistics on the web, but you can generate statistics of
    > comparable quality by using your favorite random number generator.


    Tee hee. I like this.

    --
    Toby A Inkster BSc (Hons) ARCS
    http://tobyinkster.co.uk/
    Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

    * = I'm getting there!
    Toby A Inkster, Apr 17, 2007
    #7
  8. Hello,

    Neo Geshel wrote:

    > I am curious about the prevalence of XHTML usage among web developers,
    > and its usage in web sites in general. Does anyone have any statistics
    > that could show the numbers of sites created in XHTML (all flavours) in
    > comparison to traditional HTML (including spaghetti code sites)?


    <http://triin.net/2006/06/12/HTML#document-types> might be what you are
    looking for. The author analyzed ~1.2 million documents.
    Unfortunately Googles Web Authoring Statistics
    <http://code.google.com/webstats/>, which analyzed a much larger number of
    documents, did not look at the DOCTYPE declaration...

    HTH

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://pink.odahoda.de/
    Benjamin Niemann, Apr 17, 2007
    #8
  9. Scripsit Benjamin Niemann:

    > <http://triin.net/2006/06/12/HTML#document-types> might be what you
    > are looking for. The author analyzed ~1.2 million documents.
    > Unfortunately Googles Web Authoring Statistics
    > <http://code.google.com/webstats/>, which analyzed a much larger
    > number of documents, did not look at the DOCTYPE declaration...


    What makes you think the DOCTYPE declaration determines whether a document
    is in fact an XHTML document? In principle, it simply specifies the DTD that
    the document purports to comply with. It cannot actually _make_ a document
    an XHTML document, any more than a boilerplate text "This message is
    certified virus free" makes anything virus free. In practice, there is a
    huge number of pages that are a horrendous mix of HTML and XHTML with lots
    of syntax errors, using an XHTML DOCTYPE.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Apr 17, 2007
    #9
  10. Neo Geshel

    Jim Ford Guest

    Jukka K. Korpela wrote:

    > There are many ways to get cured from pointless curiosity. Did you try
    > getting some interesting hobby?


    > There are lots of statistics on the web, but you can generate statistics
    > of comparable quality by using your favorite random number generator.


    You're a hard man Jukka - it must be the Finnish Climate!

    ;^)

    Jim Ford
    Jim Ford, Apr 17, 2007
    #10
  11. Neo Geshel

    cwdjrxyz Guest

    On Apr 16, 8:37 pm, cwdjrxyz <> wrote:
    > On Apr 16, 5:49 pm, Neo Geshel <> wrote:
    >
    > > I am curious about the prevalence of XHTML usage among web developers,
    > > and its usage in web sites in general. Does anyone have any statistics
    > > that could show the numbers of sites created in XHTML (all flavours) in
    > > comparison to traditional HTML (including spaghetti code sites)?

    >
    > Many write code in xhtml. However, this is useless unless the page is
    > served properly as aplication/xml+xhtml, since if you just serve as
    > the usual text/html, the xhtml code gets treated as ordinary html and
    > not xhtml. The IE browsers can not handle true xhtml served properly,
    > and if a page claiming to be xhtml can be viewed on an IE browser, it
    > is not - just mis-served xhtml being treated as html. You have to
    > convert an xhtml page to html for it to be seen on IE. This can
    > involve separate xhtml and html pages with some mechanism to detect if
    > the browser will accept xhtml at all, sometimes done with header
    > exchange info, or if xhtml support is not detected, php or some other
    > server side script is used to convert a single xhtml page to a html
    > 4.01 strict page for IE and other browsers that do not handle xhtml. I
    > would guess that at least 95% of pages claiming to be xhtml are mis-
    > served as only html. Since most servers already associate .html with
    > the mime type for text/html, you must then use some other extension
    > such as .xhtml or .xml and associate it with the mime type application/
    > xml+xhtml for a true xhtml page.


    I have 4 simple example pages served as html 4.01 strict using the
    usual .html extension, xhtml 1.1 served with the mime type application/
    xhtml+xml associated with the extension .xhtml, xhtml 1.1 served with
    the mime type application/xml associated with the extension .xml, and
    a php page that rewrites a xhtml 1.1 page as html 4.01 strict if
    header exchange can not establish or can not detect that the page can
    handle the mime types for true xhtml .

    http://www.cwdjr.info/extensions/auto.php

    http://www.cwdjr.info/extensions/xhtml11.xhtml

    http://www.cwdjr.info/extensions/xhtml11.xml

    http://www.cwdjr.info/extensions/html401strict.html

    Text on the pages tells more.
    cwdjrxyz, Apr 17, 2007
    #11
  12. Jukka K. Korpela wrote:

    > Scripsit Benjamin Niemann:
    >
    >> <http://triin.net/2006/06/12/HTML#document-types> might be what you
    >> are looking for. The author analyzed ~1.2 million documents.
    >> Unfortunately Googles Web Authoring Statistics
    >> <http://code.google.com/webstats/>, which analyzed a much larger
    >> number of documents, did not look at the DOCTYPE declaration...

    >
    > What makes you think the DOCTYPE declaration determines whether a document
    > is in fact an XHTML document? In principle, it simply specifies the DTD
    > that the document purports to comply with. It cannot actually _make_ a
    > document an XHTML document, any more than a boilerplate text "This message
    > is certified virus free" makes anything virus free. In practice, there is
    > a huge number of pages that are a horrendous mix of HTML and XHTML with
    > lots of syntax errors, using an XHTML DOCTYPE.


    You're certainly right that the usage of a XHTML DOCTYPE does not imply that
    the document is actually XHTML. But it does say something about the
    intentions of the document author. Unless the OP gives us a detailed and
    unambiguous definition of "XHTML usage", I would say that a document which
    the author wants to be XHTML (but often fails to implemented even remotely
    correct) is XHTMLish enough to fit the (guessed) definition. Mostly because
    your strict (and formally correct) definition is (sadly) of little use in
    the real world.

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://pink.odahoda.de/
    Benjamin Niemann, Apr 17, 2007
    #12
  13. Neo Geshel

    Neredbojias Guest

    On Tue, 17 Apr 2007 16:09:44 GMT Jim Ford scribed:

    > Jukka K. Korpela wrote:
    >
    >> There are many ways to get cured from pointless curiosity. Did you
    >> try getting some interesting hobby?

    >
    >> There are lots of statistics on the web, but you can generate
    >> statistics of comparable quality by using your favorite random number
    >> generator.

    >
    > You're a hard man Jukka - it must be the Finnish Climate!


    No, it's just that "jukka" means "joke" in the land of the Finn and the
    poor man is just awfully sick of being seriously juked.

    --
    Neredbojias
    He who laughs last sounds like an idiot.
    Neredbojias, Apr 17, 2007
    #13
  14. Neo Geshel

    Neo Geshel Guest

    Jukka K. Korpela wrote:
    > Scripsit Neo Geshel:
    >
    >> I am curious about the prevalence of XHTML usage among web developers,

    >
    > There are many ways to get cured from pointless curiosity. Did you try
    > getting some interesting hobby?


    This may be pointless to you, but I am genuinely curious about this
    prevalence. After all, I would like to know if I am at the crest of a
    newly forming movement, or simply tilting at windmills like some digital
    Don Quixote.

    >> Does anyone have any statistics
    >> that could show the numbers of sites created in XHTML (all flavours)
    >> in comparison to traditional HTML (including spaghetti code sites)?

    >
    > There are lots of statistics on the web, but you can generate statistics
    > of comparable quality by using your favorite random number generator.


    True, but I am looking for statistics with more than just a mere whiff
    of reality and reliability. While the line, “lies, damn lies and
    statistics†is often quite true, statistics (when used correctly,
    logically and skeptically) can be a powerful compass; providing *some*
    consistency and direction in cases where nothing else will.

    > But as a reliable piece of information, I can tell you that the
    > percentage of web sites using genuine XHTML, declared as XHTML in HTTP
    > headings, is zero (0), with a sufficient accuracy.


    Really? Taking into account that “hacking†IE to accept application/xml
    as something other than a dowloadable file causes an unacceptable 15 -
    20 second “parsing wait†due to the xslt transformation, check out the
    following site in any non-IE browser: http://www.renogoldcorp.com/

    • Validates as XHTML 1.1
    • Validates on all interior pages
    • UTF-8 Character Encoding throughout
    • application/xhtml+xml mime type for *all* *non*-IE web clients
    • *Great* print preview (has nothing it shouldn’t) via CSS
    • Accessible to thin client devices like Blackberry’s and PDA’s

    >> *********************************************************************
    >> My return e-mail address is an automatically monitored spam honeypot.
    >> Do not send e-mail there unless you wish to be reported as a spammer.
    >> Please send all e-mail to my first name at my last name dot org, with
    >> a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
    >> *********************************************************************

    >
    > If that's your attitude, please report me as a spammer. Oh, and please
    > keep that attitude visible in your sig as long as your message contents
    > are not worth reading.
    >


    I made a strong sig because some people need a cudgel over the head to
    impart some common sense on the Internet. Sigs worded more softly rarely
    worked, and plenty of people got caught by my automated spam honeypot.

    BTW, what is with *your* attitude? I would have expected more maturity
    and restraint from someone of your online stature. How did I get around
    to pissing in *your* teapot today?

    Oh, well.
    ...Geshel
    --
    *********************************************************************
    My return e-mail address is an automatically monitored spam honeypot.
    Do not send e-mail there unless you wish to be reported as a spammer.
    Please send all e-mail to my first name at my last name dot org, with
    a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
    *********************************************************************
    Neo Geshel, Apr 17, 2007
    #14
  15. Neo Geshel

    Bergamot Guest

    Bergamot, Apr 17, 2007
    #15
  16. Neo Geshel

    Neo Geshel Guest

    Neo Geshel wrote:
    > • Validates as XHTML 1.1
    > • Validates on all interior pages


    Hmmm... it seems that having <xhtmlConformance mode="Strict" /> in the
    web.config fails to throw ASP.NET 2.0 into standards compliance mode for
    the W3C Validator. As such, when the Validator grabs the page, ASP.NET
    2.0 will litter forms with name attributes and unencapsulated input
    elements (check the source under Firefox... no name attributes or
    unwrapped input elements!!). Great, just what I wanted. NOT.

    So the W3C validator *will* complain on any page that has a form, but
    Firefox gets kosher XHTML and so therefore will not throw a parser
    error. Thank heavens for small miracles.

    I will have to ask a MCSE MVP about this one. It’s clearly an ASP.NET
    2.0 issue and how the script handles different clients. Problem is, this
    host doesn’t allow me to access and recompile .browser files, so I can’t
    exactly fix the problem by changing the server’s recognition of the W3C
    Validator.

    ...Geshel
    --
    *********************************************************************
    My return e-mail address is an automatically monitored spam honeypot.
    Do not send e-mail there unless you wish to be reported as a spammer.
    Please send all e-mail to my first name at my last name dot org, with
    a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
    *********************************************************************
    Neo Geshel, Apr 17, 2007
    #16
  17. Neo Geshel

    Neo Geshel Guest

    Neo Geshel wrote:
    > Neo Geshel wrote:
    >> • Validates as XHTML 1.1
    >> • Validates on all interior pages

    >
    > Hmmm... it seems that having <xhtmlConformance mode="Strict" /> in the
    > web.config fails to throw ASP.NET 2.0 into standards compliance mode for
    > the W3C Validator. As such, when the Validator grabs the page, ASP.NET
    > 2.0 will litter forms with name attributes and unencapsulated input
    > elements (check the source under Firefox... no name attributes or
    > unwrapped input elements!!). Great, just what I wanted. NOT.
    >
    > So the W3C validator *will* complain on any page that has a form, but
    > Firefox gets kosher XHTML and so therefore will not throw a parser
    > error. Thank heavens for small miracles.
    >
    > I will have to ask a MCSE MVP about this one. It’s clearly an ASP.NET
    > 2.0 issue and how the script handles different clients. Problem is, this
    > host doesn’t allow me to access and recompile .browser files, so I can’t
    > exactly fix the problem by changing the server’s recognition of the W3C
    > Validator.
    >
    > ...Geshel


    And I think I have solved the problem:

    http://idunno.org/archive/2005/01/01/216.aspx

    and for good measure (even though it’s not related):

    http://www.kowitz.net/2006/12/11/ASPNET 20 Mozilla Browser Detection Hole.aspx

    Now the W3C Validator gets kosher markup from ASP.NET 2.0, and everyone
    can be happy with this fully XHTML 1.1 site.

    ...Geshel
    --
    *********************************************************************
    My return e-mail address is an automatically monitored spam honeypot.
    Do not send e-mail there unless you wish to be reported as a spammer.
    Please send all e-mail to my first name at my last name dot org, with
    a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
    *********************************************************************
    Neo Geshel, Apr 17, 2007
    #17
  18. Scripsit Benjamin Niemann:

    > You're certainly right that the usage of a XHTML DOCTYPE does not
    > imply that the document is actually XHTML. But it does say something
    > about the intentions of the document author.


    Does it? It might be simply copied from somewhere. It probably is. Whether
    the author has an idea of what it means remains to be seen.

    Besides, intentions as such don't mean much.

    > Unless the OP gives us a
    > detailed and unambiguous definition of "XHTML usage", I would say
    > that a document which the author wants to be XHTML (but often fails
    > to implemented even remotely correct) is XHTMLish enough to fit the
    > (guessed) definition.


    I don't try to make such guesses, and the OP apparently has a vague idea
    that is assumed to relate to whether XHTML is fashionable or not.

    If a document has an XHTML DOCTYPE and it is in fact not syntactically
    XHTML, then it's not XHTML at all for any reasonable purpose. The very point
    of X in XHTML is to play by XML rules, and they include the principle (to
    put it somewhat roughly) that a document shall not be displayed - instead,
    _an_ error message is to be shown - if there is the slightest deviation from
    general XML rules ("well-formedness" rules). Along the same lines, a
    document purported to be XHTML should be treated in a similar manner if it
    violates any of the syntax rules in the DTD.

    What might possibly be the reason for and benefit from using XHTML syntax,
    as opposite to HTML 4.01 syntax, if XHTML syntax is not used? Using a little
    bit of XHTML syntax here and there might be common, but this doesn't make it
    any less foolish.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Apr 18, 2007
    #18
  19. Neo Geshel

    Greg N. Guest

    Jukka K. Korpela wrote:

    > What might possibly be the reason for and benefit from using XHTML
    > syntax, as opposite to HTML 4.01 syntax, if XHTML syntax is not used?


    Using XHTML syntax if XHTML syntax is not used? Please explain, I don't
    get it.

    > Using a little bit of XHTML syntax here and there might be common, but
    > this doesn't make it any less foolish.


    I recently started using Google maps, see
    http://hothaus.de/greg-tour-2006/route.htm

    I could only get it to work on IE by obeying Googles suggestion to make
    the doctype XHTML with some special xmlns incantation:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:v="urn:schemas-microsoft-com:vml">

    I then made it XHTML as good as I could by just fixing whatever the
    validator told me to fix.

    Could I have gotten away without XHTML? Is there a working, but less
    foolish approach?

    --
    Gregor mit dem Motorrad auf Reisen
    http://hothaus.de/greg-tour/
    Greg N., Apr 18, 2007
    #19
  20. Neo Geshel

    Andy Dingley Guest

    On 17 Apr, 23:55, Neo Geshel <> wrote:

    > Now the W3C Validator gets kosher markup from ASP.NET 2.0, and everyone
    > can be happy with this fully XHTML 1.1 site.


    It's invalid under IE7 as you appear to be applying XHTML 1.0 Appendix
    C to XHTML 1.1

    If you're going to do this (pointless, but not harmful if done
    carefully), at least stick with XHTML 1.0 Strict
    Andy Dingley, Apr 18, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    852
  2. chronos3d
    Replies:
    9
    Views:
    750
    Andy Dingley
    Dec 5, 2006
  3. Christopher Benson-Manica

    Relative prevalence of "good" C++

    Christopher Benson-Manica, Jan 18, 2006, in forum: C++
    Replies:
    9
    Views:
    378
    Christopher Benson-Manica
    Jan 21, 2006
  4. Frederick Gotham

    Worrying Prevalence of K++ Compilers

    Frederick Gotham, Nov 8, 2006, in forum: C++
    Replies:
    9
    Views:
    345
    werasm
    Nov 9, 2006
  5. Dawid Michalczyk

    prevalence of different JVM versions

    Dawid Michalczyk, Jul 27, 2007, in forum: Java
    Replies:
    14
    Views:
    651
    John W. Kennedy
    Aug 1, 2007
Loading...

Share This Page