SitePoint Sponsor

User Tag List

Results 1 to 20 of 20
  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    CA Baby!
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What Version Of XHTML Should I Use?

    What version of XHTML should I use, and what are the main difference between the different versions? (Versions 1.0, 1.1, 2.0)

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Maybe this will help:

    W3Schools

    Hope this helps

    Later
    Johnny

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2003
    Location
    Tampa, FL
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In a perfect world everyone would be using XHTML 1.1, but if you can achieve either XHTML 1.0 Transitional or XHTML 1.0 Strict and it validates, then I think you are good to go.

  4. #4
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Well, you cannot use 2.0 because it doesn't have a DTD yet, there's not much real benefit of using XHTML 1.0 Strict over XHTML 1.0 Transitional and XHTML 1.1 really should be served as an application of XML like I do myself with XHTML Basic 1.0, etc.

    So the answer is probably Transitional if you only serve it as text/html to all user-agents.

  5. #5
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For now I would say don't use XHTML at all. There are no real benefits. Well, not on a majority of websites that use it, anyway. However, whether you use HTML 4.01 or XHTML 1.0, use Strict. You'll end up with a much easier to manage website.
    Off Topic:

    Uh oh, a lack of sleep is making me start to rant. Good thing my blog is down. :/
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor

  6. #6
    SitePoint Zealot Octal's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I disagree, the benefits of using xhtml might not be great for a website but it will greatly benefit the developer.

    It will bring you more up to date with latest advancements in web standards.
    It may open your work to more devices
    It will help make you a better coder
    It gives a good grounding for similar languages such as XML/XSL

    As for the original question I would agree with xhtmlcoder and go transitional. Only go for strict if you are aware of all the possible pitfalls such as no target attribute for the anchor tag.
    Octal - All your base-8 belong to us
    "Knowing is not enough, we must apply.
    Willing is not enough, we must do." - Bruce Lee

  7. #7
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    If you don't need to open links in targets go with Strict, if you want to open links in targets go with Transitional, if you use frames go with Frameset.

    I'm sure there are other implications, that I have not included, but that is the pattern I follow.

    As far as not learning XHTML, whynot? It is the standard. May as well go ahead and get used to typing it now. My opinion is once you figure out the difference between HTML and XHTML you will never go back to HTML.

    That's my 2 cents.

    Later
    Johnny

  8. #8
    SitePoint Zealot Octal's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as not learning XHTML, whynot? It is the standard. May as well go ahead and get used to typing it now. My opinion is once you figure out the difference between HTML and XHTML you will never go back to HTML.
    I second that opinion
    Octal - All your base-8 belong to us
    "Knowing is not enough, we must apply.
    Willing is not enough, we must do." - Bruce Lee

  9. #9
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Johnny Gulag
    As far as not learning XHTML, whynot? It is the standard. May as well go ahead and get used to typing it now. My opinion is once you figure out the difference between HTML and XHTML you will never go back to HTML.
    XHTML has 3 big benefits going for it:
    1. Less forgiving than HTML/Stricter syntax
    2. Leads to other XML-based languages
    3. Can be used as input to transform your content into other formats with XSLT

    However, if you don't use (or don't want to use) those features, then what's wrong with a valid HTML 4.01 site? Just because it's not the latest standard doesn't mean it's a horrible thing.

  10. #10
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    However, if you don't use (or don't want to use) those features, then what's wrong with a valid HTML 4.01 site? Just because it's not the latest standard doesn't mean it's a horrible thing.
    Oh I have no problem with HTML 4.01. I have just been on an XHTML kick latley.

    Though I will say that since someday everyone will have to comply with XHTML. I guess? Why not go ahead and start typing it out now. I am definetly no expert, but it seems to me that XHTML may actually be easier.

    I mean:
    HTML 4.01
    Code:
    <br></br>
    vs:
    XHTML 1.0
    Code:
    <br />
    Bad example I know, but still less markup.

    Later
    Johnny

  11. #11
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    More like:

    HTML 4.01:
    HTML Code:
    <br>
    XHTML 1.0:
    HTML Code:
    <br />
    HTML 4.01 has less markup in this case, but that's besides the point. I code in XHTML most of the time too, but there's nothing wrong with HTML 4.01 either; just wanted to make it clear .

  12. #12
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    I stand corrected. You can do

    Code:
    <br></br>
    instead of

    Code:
    <b  />
    To achieve XHTML 1.0. My mistake. It is early. I need more coffee. I said it was a bad example!!!

    Though I agree there is no problem with HTML 4.01

    Later
    Johnny

  13. #13
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Actually there maybe few benefits when served as text/html though I send XHTML as an Application of XML and created XHTML 1.0 Embed which also puts eXtensibility to good use.

    It's still good to try writing XHTML since within HTML the start and end tags for the HTML, HEAD and BODY elements are optional, etc.

  14. #14
    SitePoint Enthusiast DiDoKa's Avatar
    Join Date
    Oct 2003
    Location
    MA
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Johnny Gulag
    Hello

    If you don't need to open links in targets go with Strict, if you want to open links in targets go with Transitional, if you use frames go with Frameset.

    I'm sure there are other implications, that I have not included, but that is the pattern I follow.

    As far as not learning XHTML, whynot? It is the standard. May as well go ahead and get used to typing it now. My opinion is once you figure out the difference between HTML and XHTML you will never go back to HTML.

    That's my 2 cents.

    Later
    Johnny

    Actually there is one point everyone should just scratch from the "to do" list and that's Frameset. Frames are bad, frames are nonsense, so why use them. I haven't used a frame (not even a little innocent inline frame) for the past 3 1/2 years and I sure don't miss them, not in the least bit.

  15. #15
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Standard frames aren't bad at all and surprisingly can help accessibility in some circumstances. Then there is XFrames in general Frames should be avoided but they have their uses.

    For example I was once asked by an IBM Lexmark technical employee to look at his frames for a Lexmark Print Server maintenance and configuration control panel, which was being used to configure Print Servers via an intranet web interface used by Lexmark itself - thus a frameset was more useful than a standard page.

  16. #16
    SitePoint Zealot Koobi's Avatar
    Join Date
    Nov 2003
    Location
    Sri Lanka
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have heard that search engines find XHTML easier to crawl through. Is this corect or am I wrong?
    If it is true, then I think it's a pretty good reason to be as strict as possible with your XHTML

  17. #17
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    They find semantic code easier to trawl through and an XML Processor renders XHTML when served with the correct MIME, generally XML Processors are faster rendering engines because they hate invalid markup.

  18. #18
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Koobi
    I have heard that search engines find XHTML easier to crawl through. Is this corect or am I wrong?
    If it is true, then I think it's a pretty good reason to be as strict as possible with your XHTML
    Being as strict as possible helps, especially in the sense of moving your presentation to CSS, because all that's left afterwards is content on the page. This lowers the signal to noise ratio that search engines will see. However, whether or not you use XHTML to do this is irrelevant to search engines. A DOCTYPE doesn't get you higher PageRank; better and more focused content does.

  19. #19
    SitePoint Zealot Koobi's Avatar
    Join Date
    Nov 2003
    Location
    Sri Lanka
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the clear explanations
    Makes more sense now.

  20. #20
    SitePoint Addict m2k's Avatar
    Join Date
    Oct 2003
    Location
    Philadelphia
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Johnny Gulag
    Maybe this will help:

    W3Schools
    Just thought I'd add my $.02. Until this morning, I had never really looked into XHTML. I read the above XHTML tutorial, followed the "How this Web Site was converted to XHTML" section, and mostly via a few global search and replaces I converted and validated a small, 6-page site to XHTML in about an hour and a half.

    I like it, but I don't know if the fact that (for better or worse) I've always coded everything by hand has anything to do with it.


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
  •