www.webdeveloper.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 42

Thread: Benefits of XHTML 1.x vs 4.01 Strict

  1. #1
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,773

    Question Benefits of XHTML 1.x vs 4.01 Strict

    Here's a question for the standards compliance gurus out there.

    What are the real-world benefits of using XHTML vs HTML 4.01:

    1. At present

    2. and in the future

    I know that XHTML will work on any browser. It's the accompanying CSS that chokes things up. So what else can you do with XHTML that you can't with 4.01?

    For example, is it easier to include RSS feeds on a Web site if the site is coded in XHTML?

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    1) XHTML will not work on every browser, not unless you follow the "HTML Compatibility Guidelines" given in Appendix C of the XHTML 1.0 Specification.

    2) The CSS doesn't choke anything up. By properly using HTML 4.01 Strict and CSS you end up with a page that works on all browsers.

    3) XHTML 1.0 is simply an XML version of HTML 4.01.

    4) XHTML 1.1 is simply XHTML 1.0 Strict.

    5) XHTML 2.0 isn't out yet.

    6) XHTML documents are simply more accessible to non human users. I frequently use XHTML 1.1 documents, add a few things to the DTD and then process them with an XSLT processor to generate an HTML 4.01 version of some document and use XSL-FO to generate a PDF version.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,773
    By CSS choking things up, I should have wrote that browser support for CSS chokes things up.

    I'll have to look into XSLT and XSL-FO more on w3.org. One follow up question: since MS IE came out a couple years ago, which I assume was before XHTML 1.1 was finalized, does IE go into quirks mode because it doesn't recognize the 1.1 doctype? I personally have never done any experimenting in this matter. Same question for NS 6 and 7, and Mozilla 1.0.

  4. #4
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123

    Re: Benefits of XHTML 1.x vs 4.01 Strict

    Originally posted by toicontien
    ......For example, is it easier to include RSS feeds on a Web site if the site is coded in XHTML?
    As of today I don't see anything in XHTML that will do that,you have to keep in mind that html/XHTML itself does not do any processing,hence limiting its ability to directly figure out that you are loading a RSS file.
    You will always have to use some kind of processing utility to process the RSS(XML) feed to create a humanly readable data to put on your HTML pages.

    I am planning to write an applet for my site ( link below) to display news from InfoWorld and Yahoo! news RSS feeds,Check back their in couple of weeks to see that its accomplshed(provided my wife allows me to spend some time on this project.. )
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  5. #5
    Join Date
    Sep 2003
    Posts
    187
    2) The CSS doesn't choke anything up. By properly using HTML 4.01 Strict and CSS you end up with a page that works on all browsers.
    That is not necessarily true. I can make a page using CSS 1 only, that looks great and works in Netscape 7/Mozilla and it will not work cross browser without applying "hacks".

    If you really want a site to be compatible with 3x or 4x browsers the best you can do is to use a 4.01 transitional doctype and use depricated tags that are allowed only in that doctype.

    I would be interested in seeing a site with one stylesheet, no browser sniffer or redirection to alternate pages that works in all browsers, that is not extremely simple layout. Like maybe one div......LOL

    For my business site, I still have people using 3x browsers to visit and I cannot afford to have them get a "text-only" version of the site because somebodies standards are saying HTML is out.

    Until there is a mass exodus away from IE 6, 5.5, 5.0 imho there is no need to use CSS unless you want to write multiple style sheets, use a javascript browser sniffer and redirect by browser and OS versions. It really is not practical.

    My personal site is coded to xhtml 1.0 strict and has a CSS 2 menu on it that only work in Netscape and Mozilla because I do not have javascript "powering" the menu for the rest of the browsers that cannot handle the CSS 2 selectors.

    You need to know more "hacks" than actual CSS to get a page cross browser cross platform using CSS without javascript or serverside intervention.

    MNS

  6. #6
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,773
    MotherNatrsSon,

    I designed my college's newspaper's web site using XHTML 1 Transitional with a CSS layout. It works on all browsers, though I've had to hide the layout from older browsers with the @import "" method. That really isn't a "hack."

    http://www.cm-life.com/

    Also, see:

    http://www.cm-life.com/pages/newdesign/ (note: there are some issues with IE5/Mac that I haven't had the time to look into).

    Visit both sites with older browsers. I'm confident your won't have any problems with 4.x and newer browsers. I don't have access to 3.x browsers to test the design on, so any info on how those browsers react would be appreciated.

    But the only thing that might cause display problems is the CSS. And since 3.0 browsers hardly support CSS1, they shouldn't have a problem at all with either design. It just won't look pretty that's all.

    BUT

    If a good portion of a web site's visitors use 3.x and 4.x browsers, there's nothing wrong with cartering to your customers and using tables and deprecated tags. After all, they are the customers and you are getting paid to produce a product that they want.
    Last edited by toicontien; 11-03-2003 at 07:19 PM.

  7. #7
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    toicontien wrote
    ... does IE go into quirks mode because it doesn't recognize the 1.1 doctype?
    No, it goes into quirks mode if you include the xml decaration:
    <?xml version="1.0" standalone="yes"?>
    Use a valid DTD (except HTML 3.2 and 2) to keep IE in standards mode.

  8. #8
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    And you can get around it by specifying a Content-type instead:

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    That will allow you to use a XHTML DTD and not throw IE into quirks mode.

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  9. #9
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    But ... the charset should be utf-8 not iso-8859-1

  10. #10
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Yes, it looks like you are correct. My bad...

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  11. #11
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,773

  12. #12
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    From what I can tell, I wouldn't say there are any major benefits (over HTML 4.01 Strict). I personally like it, because it take out some of the slop in HTML, such as some tags needing to be closed, while other didn't, and having unquoted attributes, etc... It's much more balanced. Even when using HTML 4.01, I use a lot of XHTML techniques/requirements. One possible real world benefit would be forward compatability, though I don't see HTML 4.01 disappearing for quite some time.

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  13. #13
    Join Date
    Sep 2003
    Posts
    187
    Originally posted by toicontien
    MotherNatrsSon,

    I designed my college's newspaper's web site using XHTML 1 Transitional with a CSS layout. It works on all browsers, though I've had to hide the layout from older browsers with the @import "" method. That really isn't a "hack."

    http://www.cm-life.com/
    Yoou have multiple style sheets and a javascript to direct peopleto the right stylesheet as well. I wonder what it looks like to people with javascript off? Can't and won't use javascript browser detection on my business site because you can't use it as a crutch, because not all people use javascript.

    MNS

  14. #14
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    1) If all you are doing in the "real world" is publishing a web site then HTML 4.01 Strict is just fine, though spiders and other non-human users are going to find it easier to understand XHTML.

    2) You don't need JavaScript and browser sniffing or any hacks to make a page work with a CSS layout. You only need the @import rule to hide a few things from CSS1 browsers. You can also, if you want to get fancy, easily use a server side script to serve browser specific style sheets.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  15. #15
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    Additional benefits of module based XHTML 1.1 are when both Opera 7.20 and Mozilla 1.x actually understand how to accept it with the relevant MIME type "application/xhtml+xml" which reduces rendering times obviously once again Micro$oft drags its heels...

    I have over 190 XHTML Basic 1.0 documents online severed as 'application/xhtml+xml' to conforming user-agents I just haven't published them in the public domain yet.
    Last edited by Robert Wellock; 10-01-2003 at 09:47 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles