SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: xhtml vs html

Hybrid View

  1. #1
    [Call me Bram] iBram007's Avatar
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    xhtml vs html

    A search for xhtml vs html returned 0 results, so...

    I'm planning to rewrite my dutch portal. I don't know anything about xhtml, but I was wondering if I should rewrite it in html or xhtml and if it's worth to take a closer look to xhtml.

  2. #2
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My take:

    HTML 4.01 is the last HTML

    XHTML 1.0 is HTML rewritten in XML. It appears in three flavours, transitional, frameset and strict. XHTML 1.1 is XHTML 1.0 Strict modularised. XHTML 2.0 is under discussion.

    However HTML 4.01 will be around for some time, but IMHO the way for the future is to use the latest version avaiulble and get round any problems that crop up. If you can't do something, find a way round it or find an alternative, therefore XHTML is my choice, and preferably XHTML 1.1.

    And from a standards viewpoint, which also becomes an accessibility viewpoint as sites compliant with standards are in the main compliant with accessibility standards, XHTML forces you to comply with standards and hence is 'better'.

    You don't have to take a much closer look at XHTML if you know correct programming practices in HTML - there are a few more strict rules, but nothing insurmountable with a little bit of application. People round here must be gettingfed up with me saying that I've riun an XHTML 1.1/CSS course for first year undergraduates - and it's been largely successful. If students follow the rules then they succeed, and I imagine it's no different from people in the general population of web developers.

    So if you want to be with the future, XHTML - if you want to delay your development , HTML. But in all cases declare a !DOCTYPE and validate your (X)HTML and CSS code because this is the only way that you can be sure to give yourself least problems.
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.

  3. #3
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Without bringing in wierd topics like XML, I can tell you that XHTML ...

    Is the version following HTML4. HTML4 will not be developed further.

    There are two major things that differ XHTML from HTML4:

    You have to close all you tags in XHTML. i.e. <li>List item</li>

    You have to do your layout via CSS in XHTML, i.e. no <font> tags anymore, for instance.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by M. Johansson
    You have to do your layout via CSS in XHTML, i.e. no <font> tags anymore, for instance.
    While mostly true, you can still get away with some presentational HTML in XHTML Transitional, as a few deprecated attributes are allowed (i.e. <body bgcolor="blah">). It's not the "best practice" approach and I recommend it be avoided if you plan on using XHTML, but still somewhat allowed.
    Last edited by vgarcia; Dec 26, 2003 at 07:47.

  5. #5
    SitePoint Evangelist goughb's Avatar
    Join Date
    Sep 2000
    Location
    Chicago
    Posts
    526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should help you out:

    zvon xhtml basic reference:
    http://www.zvon.org/xxl/xhtmlBasicRe...put/index.html
    zvon xhtml 1.0 reference:
    http://zvon.org/xxl/xhtmlReference/Output/index.html
    zvon css reference:
    http://www.zvon.org/xxl/css1Reference/Output/index.html

    It isn't hard to learn, except with learning how to do layout with div tags instead of tables. That will be your biggest challenge. I still don't have it mastered yet. but, the basics are easy.

  6. #6
    SitePoint Evangelist goughb's Avatar
    Join Date
    Sep 2000
    Location
    Chicago
    Posts
    526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is an example of what xhtml and css can do to a site that was once layed out in tables:

    http://www.alistapart.com/articles/slashdot/

    A friend of mine at my university redesigned slashdot, as such based on an estimated # of pages served it would save slashdot $3,650 USD / year.

    14 GB of bandwidth savings per day.

    Lots of benefits.

  7. #7
    [Call me Bram] iBram007's Avatar
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No tables anymore?
    That'll be my biggest challenge indeed.
    Thanks for help guys!

  8. #8
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by iBram007
    A search for xhtml vs html returned 0 results, so...

    I'm planning to rewrite my dutch portal. I don't know anything about xhtml, but I was wondering if I should rewrite it in html or xhtml and if it's worth to take a closer look to xhtml.
    You needn't have any other special knownledge to use XHTML, all you need is to mind that if a tags has a closing tag you simply oughtn't to omit it, then if a tag doesn't have a closing tag you should use this form:
    HTML Code:
    <img src = "SomeImage.jpg [b]/>[/b]
    And you should put quotes around your attributes.

    And yes, as Mattias said 'font' tags aren't welcomed anymore.

  9. #9
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Keep in mind that it's absolutely no hurry to jump to a non-table based layout, as the support among mainstream browsers is still lacking. I'm personally planning to move to XHTML/CSS layouts one year after Longhorns release.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com


Bookmarks

Posting Permissions

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