SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member pixeldezign's Avatar
    Join Date
    Aug 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Probably a stupid question but...

    I just finished with the book "HTML Utopia: Designing Without Tables Using CSS, 2nd Edition" (solid book p.s. taught me so much, highly recommend), and I'm curious as to why the author had me save my HTML file as an XHTML file with all that stuff...I didn't see any XHTML specific things during the design that was different from regular HTML..i think lol. Just confused really as to what the heck XHTML is...enlighten me please cuz its not clicking in my head

  2. #2
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    You don't need to be using xhtml or saving your files as xhtml unless they are actual xhtml files and it is very doubtful that they are. There was a lot of hype going on about xhtml several years ago and that book may have been written during that time.

    Tommy has explained it all here in these very helpful stickies that will help shed some light on the subject -

    XHTML vs HTML FAQ

    XHTML1.0 vs XHTML 1.1
    http://www.sitepoint.com/forums/show...22&postcount=3

  3. #3
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    ..and, it seems most of the SitePoint books just use HTML dressed up as XHTML. In the Build Your Own Web Site the Right Way book, Ian chose XHTML but has considered changing it over to HTML. One difference that can help newbs is, some things in HTML that the validator won't catch, like unclosed p's or li's, will be caught by the validator if you have an XHTML doctype. These are things I would accidentally omit when I was a newb as well.

    Also, at the time of many of these books first editions, XHTML was The Future and was busy paving a Brave New World. Things have changed since those first editions but there was no real good reason to switch the code over to HTML4 in later editions.

  4. #4
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Like most I imagine, when I first started to learn all this stuff, I asked myself this same question. I read everything the web has to offer on the subject (there's a lot) and I chose html and I couldn't be happier.

  5. #5
    SitePoint Member pixeldezign's Avatar
    Join Date
    Aug 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alright awesome so there really was no point in doing that it would work either way cool! just making sure cuz html does make more sense to me anyway...xhtml was just the cool kid in school at the time

  6. #6
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Cool at one time. 90% of people that currently use xhtml, are simply blindly following what they "think" is the best. So your doing good by questioning.

  7. #7
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    It isn't really feasible to even serve HTML as a text/xhtml application. IE (including 8) don't support XHTML.

    It is fake XHTML if you don't serve it as XHTML.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  8. #8
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Well, now, it's feasible if you can do like what Jamesicus does. Server sends XHTML to browsers who can handle it and HTML to IE. Though as felgall pointed out, you would need two different js files for each MIMEtype depending on how the scripts are written. That can get a little stupid, but there might be an easy way around that too.

    But why bother if you're not using the XHTML's XML benefits?

  9. #9
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    But then if JS is turned off, then users get no webpage (since good browsers get fed XHTML)

    You would have to reverse the logic.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work


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
  •