XHTML questions

Discussion in 'HTML & Website Design' started by slaydragon, Mar 27, 2007.

Thread Status:
Not open for further replies.
  1. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #21
    You use image/jpeg for jpegs.. image/png for pngs.. why would you use text/html for XHTML ? It's the WRONG MIME TYPE. Who cares if its still rendered as HTML, the fact is if you're coding XHTML and not using application/xhtml+xml you're using the wrong MIME type.

    The only advantage XHTML (strict) has against HTML (such as HTML 4.01 strict) is that it forces you to have clean markup, that is if you validate your web pages often and make them 100% valid.

    You have to close your self closing elements with the '/>', use CDATA around <script> and <style> elements, which I find pointless because it's not really being checked thoroughly by the browser if its being fed as text/html. If almost all the pages that are currently XHTML and send as text/html changed their MIME types to the real actual MIME type, then almost all of them would fail, because XHTML is super strict.. your web page wouldn't even load if you had one tiny error made by some user in the comment section.

    I myself use HTML 4.01 Strict... but at the end of the day regardless of which DOCTYPE, the only thing that matters is if you have clean, semantic markup which a lot of the beginner-intermediates who use XHTML don't have.
     
    soulscratch, Oct 30, 2007 IP
Thread Status:
Not open for further replies.