1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

thinking about converting html to xhtml

Discussion in 'HTML & Website Design' started by glasshoper, Jan 24, 2008.

  1. #1
    is html here to stay forever or should i start converting my sites to xhtml?
    is there any software or somethiign that i can use to do so.
    sorry, i don't know any difference between html, xhtml, dhtml, etc at all and the benefits of one over another.

    how important is it for the site to be in xhtml format?
    SEMrush
     
    glasshoper, Jan 24, 2008 IP
    SEMrush
  2. Fedorpheux

    Fedorpheux Active Member

    Messages:
    710
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    80
    #2
    I wouldn't worry about html 'going anywhere' persay. If you're thinking of embarking on a new web programming language, something like Perl or PHP will be more worth your time, in my opinion.
     
    Fedorpheux, Jan 24, 2008 IP
    glasshoper likes this.
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Don't waste your time. For every nutcase who claims HTML is dead, there's .25 sensible people who know that it's not only not dead, but apparently being "revitalised" via HTML5 (which won't be ready for like 10 years).

    XHTML is html with XML abilities-- except Internet Exploder does not understand HTML served as XML (IE 8 won't either, according to M$). So even pages called "XHTML" (and most of my sites are XHTML 1.0 strict), they are served as text/html, NOT application/xhtml+xml or whatever it is.

    There are differences in code structure, which are minor but important. XML is more demanding as far as how good the code is, so many people prefer to write to the XHTML standard simply to have a harsher validator look at their code.

    HTML4.01 strict is what you should be aiming for. If you want to write it as XHTML 1.0Strict that's fine and dandy, but it's still HTML because of the aformentioned IE issue.

    XML stuff like RSS works just fine with HTML4. There is no reason to change your pages from HTML to XHTML unless it's simply personal preference. The only reason I code XHTML is personal preference, but I often go from one to the other on a whim, to be honest.

    If you didn't care about IE at all, and wanted to eventually in the future make your website actually an XML document (I can't think of any benefit to this really), you'd have to really watch out for emtpy tags like <img> (in XHTML it's <img src="..." alt="..." /> instead of alt="">) and character codes. I've switched to UNIcode for everything except the 4 XHTML character entities allowed (HTML allows like a gazillion, and actually there are 5 for XHTML but one doesn't work with HTML so nobody uses it). That means no &nb sp; or &copy; etc.

    Hope this helps... there's also a great sticky on SitePoint HTML forums outlining all the specific differences between the two and why you should or should not use them... uh... here: http://www.sitepoint.com/forums/showthread.php?t=393445
     
    Stomme poes, Jan 24, 2008 IP
    glasshoper likes this.
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    105
    #4
    1. Changing your markup to XHTML wouldn't provide much benefit, because you'll most likely still be sending it via MIME type text/html
    2. XHTML is HTML in XML format and is sent using Content-Type: application/xhtml+xml (or other xml content type)
    3. DHTML is the oldschool buzzword for combining CSS and JS. I suggest you forget about it.
    4. It isn't important, at all.
     
    soulscratch, Jan 24, 2008 IP
    glasshoper likes this.
  5. ChaosFoo

    ChaosFoo Peon

    Messages:
    232
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Are you suggesting that he forget about using JavaScript to modify CSS, or forget about using the DHTML buzzword?

    I use JavaScript to modify CSS quite frequently, and I find it quite useful for tab-switching and getting more use out of available screen real estate.

    EDIT: I write most of my pages using XHTML 1.0 strict as my doctype, but it is not true XHTML because I serve them up as text/html. I just really like that it basically forces me and those that I work with to follow good coding practices like closing all open tags, case sensitivity, etc.
     
    ChaosFoo, Jan 24, 2008 IP
    glasshoper likes this.
  6. glasshoper

    glasshoper Peon

    Messages:
    373
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thanks all. rep added
     
    glasshoper, Jan 24, 2008 IP
  7. NoobieDoobieDo

    NoobieDoobieDo Peon

    Messages:
    1,456
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I agree with the above people. As a coder I see zero reason for you to go through all the trouble of switching a working html site to xhtml.

    Absolutely no reason at all.

    XHTML to some people almost seems like a gimmick or some kind of new fangled 'cure all' that will *somehow* make your site better.
     
    NoobieDoobieDo, Jan 24, 2008 IP
  8. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Some further information on the subject: serving XHTML

    James
     
    jamesicus, Jan 24, 2008 IP
  9. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    105
    #9
    The buzzword of course. Could you clarify what you mean by tab-switching?
     
    soulscratch, Jan 24, 2008 IP
  10. glasshoper

    glasshoper Peon

    Messages:
    373
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thank you. I am gonna keep what I have as an html.
     
    glasshoper, Jan 24, 2008 IP
  11. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #11
    HTML4.01 is an absolutely clean HTML version lasting years of decades at least ( its publishing date is Christmas eve 24. dec 1999 - may be that means something to a few ).

    if you have NO precise XML or XHTML feature you really NEED in your publishing, then there is NO need at all to waste your time for conversion.

    in my 10+ yrs web publishing - all my handcrafted xxxx pages of content are valid html401. html if valid and clean code is absolutely perfect for all SE and perfect SEO as well as all modern features such as RSS feeds etc!

    only a few dynamic pages are xhtml and they give more problems than solutions.
     
    hans, Jan 24, 2008 IP
  12. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #12
    This should maybe be emphasised. Too many people go around saying XHTML is needed to have "Web 2.0" (which often has dynamic content and uses XML documents for various things such as stats-uploading and RSS feeds/podcasting). This is not so. As Hans said, all those goodies work with HTML4 as well.

    I will say, though, glasshopper, it's not necessarily a bad idea to get familiar with XHTML just to see some of the common differences (you'll surely run across it).
     
    Stomme poes, Jan 25, 2008 IP
  13. ChaosFoo

    ChaosFoo Peon

    Messages:
    232
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #13
    This is what I mean by tab switching. It is not something new, but there may be a different name for it.

    www pool-zone com/test/prod-page.htm

    Look at the tabs at the bottom of the page.
     
    ChaosFoo, Jan 25, 2008 IP
  14. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    105
    #14
    Oh. I call them sliding tabs.
     
    soulscratch, Jan 25, 2008 IP
  15. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #15
    BTW, "real" XHTML served as content (MIME) type application/xhtml+xml will display in MSIE 6.0 release 2900 and 7.0 but they will not render xml content. However, MSIE 6.0 release 2800 and earlier displays a download screen -- selecting OPEN presents a plain, text only, rendered page -- sans style sheet.

    Here is an XHTML page served as content (MIME) type application/xhtml+xml for testing by those interested.

    James
     
    jamesicus, Jan 25, 2008 IP