Difference between HTML and XHTML

Discussion in 'HTML & Website Design' started by bhadriram, Aug 30, 2012.

  1. #1
    What is difference between HTML and XHTML.
    who is best for site and SEO scenario...
     
    bhadriram, Aug 30, 2012 IP
  2. innovativ

    innovativ Greenhorn

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #2
    Shortly put, XHTML is combination of HTML4 and XML. At the moment HTML5 is way to go.
     
    innovativ, Aug 31, 2012 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    If you're a total re-re who failed to bother implementing semantic markup and separation of presentation from content -- I swear HTML 5 seems to have been crafted for and by the people who over the past 14 years have been sleazing out HTML 3.2 and just slapped 4 tranny on it. It sure as shine-ola isn't for anyone who grasps the point of HTML, the point of CSS, and the entire reason for STRICT -- what with the nonsensically pointless, redundant and allegedly semantic "structural" tags, redundant and pointless media (AUDIO and VIDEO) tags that have only further fractured media distribution and done little more than advocate vendor lock-in, and in general undoing all progress in clean site coding of the past decade or more! (you know, the types of {string of expletives omitted} who see nothing wrong with Wordpress or Joomla's markup)

    Which is why I suspect all the cool stuff (new scripting and CSS3) have been thrown under HTML 5's banner when they have (and should have!) little if anything to do with markup... The separation exists for a reason, but no let's throw that out too and let the scripttards and people who fail to grasp the point of CSS keep sleazing out their broken useless bloated rubbish.

    To be brutally frank, I'm shocked anyone is DUMB ENOUGH to see merit in HTML 5... Seems to me to be crafted to let authors sell more books, let professional lecturers (there's a bunch of criminals) fill more seats, and in general prey on the ignorance of people who to be frank, don't know enough about building websites in the first place to be aware just how far down the garden path they are being led!

    ----------------------

    As to the OP's question, XHTML 1.0 (the most recent and only one you should use, 1.1 was stillborn, 2.0 was never finished) is simply a reformulation of HTML in a XML namespace, with the idea being to bring XML's cleaner/clearer structural rules to HTML. The result is a stricter set of more consistent formatting, that IMHO can help prevent you from making stupid mistakes due to ambiguous code. Normal HTML lets you omit certain bits of code, and this can often lead to confusion or outright messes when trying to apply style or debug errors - one of the worst of which being able to omit closing tags on several block level elements like P and LI.

    XHTML results in cleaner, clearer code, which is why I advocate the use of "XHTML 1.0 Strict" for just about everything.

    Honestly, the "strict" part is more important than XHTML 1.0 vs. HTML 4.01 -- since then you're using the REAL HTML 4, instead of the idiotic 'pretend' HTML 4 of 'transitional' -- since the word says it all... Tranny means that your code is in "transition" from 1997 to 1998 coding practices... which of course is a hefty part of what's wrong with HTML 5's over the top permissive rules of mix and match any old way -- It's the same idiocy as tranny, you just get to wrap some stupid versionless lip-service around it instead.
     
    deathshadow, Sep 1, 2012 IP
  4. wilsonn

    wilsonn Peon

    Messages:
    120
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    HTML is a Hypertext Markup Language.
    XHTML is an Extensible Hypertext Markup Language.

    HTML is a static web page.
    XHTML is an advanced version of it.we can make the web pages to be displayed dynamically.XHTML is a combination of XML and HTML.

     
    wilsonn, Sep 3, 2012 IP
  5. msherry

    msherry Peon

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #5
    HTML:-XHTML
    Hypertext Markup Language.
    The most important difference between the two markup languages is that Hypertext Markup Language, or HTML, is an application of SGML (Standard Generalized Markup Language) and allows an author to omit certain tags and use attribute minimization. The Extensible Hypertext Markup Language, or XHTML, is an application of XML (Extensible Markup Language).It doesn’t permit the omission of any tags or the use of attribute minimization. However, it provides a shorthand notation for empty elements. A conforming XML document must be well formed, which, among other things, means that there must be an end tag for every start tag, and that nested tags must be closed in the right order. When an XML parser encounters an error relating to the document’s well form e dens it must abort, whereas an HTML parser is expected to attempt to recover and continue.
    The most important difference between the two markup languages is that Hypertext Markup Language, or HTML, is an application of SGML (Standard Generalized Markup Language) and allows an author to omit certain tags and use attribute minimization. The Extensible Hypertext Markup Language, or XHTML, is an application of XML (Extensible Markup Language).It doesn’t permit the omission of any tags or the use of attribute minimization. However, it provides a shorthand notation for empty elements. A conforming XML document must be well formed, which, among other things, means that there must be an end tag for every start tag, and that nested tags must be closed in the right order. When an XML parser encounters an error relating to the document’s well form e dens it must abort, whereas an HTML parser is expected to attempt to recover and continue.
    The most important difference between the two markup languages is that Hypertext Markup Language, or HTML, is an application of SGML (Standard Generalized Markup Language) and allows an author to omit certain tags and use attribute minimization. The Extensible Hypertext Markup Language, or XHTML, is an application of XML (Extensible Markup Language).It doesn’t permit the omission of any tags or the use of attribute minimization. However, it provides a shorthand notation for empty elements. A conforming XML document must be well formed, which, among other things, means that there must be an end tag for every start tag, and that nested tags must be closed in the right order. When an XML parser encounters an error relating to the document’s well form e dens it must abort, whereas an HTML parser is expected to attempt to recover and continue.

     
    msherry, Sep 5, 2012 IP
  6. henrywinsett

    henrywinsett Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    There is a fundamental difference between HTML and XHTML. Both are markup Languages, HTML is HyperText Markup Language where XHTML is Extensible Markup Language. HTML file serves as a text or as a html format, on the other hand XHTML file serves as XML or MIME formats. HTML is good for a static web page where we can create dynamic displays in the XHTML version. XHTML is an upgraded version of XML and HTML. HTML tags are case insensitive where XHTML tags should be in a lower case.
     
    henrywinsett, Sep 5, 2012 IP