“mobile”/ banners
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

XHTML vs HTML ?

Discussion in 'Programming and Scripts' started by Davidwatson, Jun 22, 2016.

  1. Davidwatson

    Davidwatson Affiliate affiliate

    15
    2
    0
    Hey guys,

    Simple question for you tag geniuses, what's the real difference between XHTML and HTML (apart from the X of course). I need to get this right so anyone with links or info explaining this would be awesome!
     
  2. newbidder
  3. Brianvoges

    Brianvoges Affiliate affiliate

    21
    10
    3
    XML syntax rules are far more rigorous than HTML. As a result, XHTML makes authors work more precisely, having to address issues such as:

    • all elements and attribute names must appear in lower case
    • all attribute values must be quoted
    • non-Empty Elements require a closing tag
    • empty elements are terminated using a space and a trailing slash
    • no attribute minimization is allowed
    • in strict XHTML, all inline elements must be contained in a block element
     
  4. designpluz

    designpluz Affiliate affiliate

    181
    19
    18
    Both are important for search engine look up and human look up of your website
     
  5. Davidwatson

    Davidwatson Affiliate affiliate

    15
    2
    0
    Thanks for describing it,
     
  6. ushaa4n

    ushaa4n Affiliate affiliate

    72
    18
    0
    thanks for sharing this..
     
  7. johnbrent

    johnbrent Affiliate affiliate

    208
    38
    28
    - XHTML is more choosy than HTML—there are some elements that absolutely must appear in the XHTML markup, but which may be omitted if you’re using HTML 4 and earlier versions. These elements include the html, head, and body elements (although why you’d want to omit any of them is a mystery to me). In addition, every element you use in XHTML must have both an opening and closing tag (for example, you’d write <p>This is a paragraph</p> in XHTML, but <p>This is all you need in HTML, as no end tag is required).

    - XHTML allows us to indicate any element as being empty—for example, an empty paragraph can be expressed as <p/>—but this isn’t valid when the page is served as text/html. To that end, you should restrict your use of this syntax to elements that are defined to be empty in the HTML specifications.

    - In XHTML, all tags must be written in lowercase. In HTML, you can use capital letters for elements, lowercase letters for attributes, etc.

    - In XHTML, all attributes must be expressed in attribute-name and attribute-value parings with quote marks surrounding the attribute value part, like so: class="fuzzy".
     
  8. Ajax Hill

    Ajax Hill Affiliate affiliate

    17
    2
    0
    I'll recommend XHTML, because it is easy to learn, because it is blinded in the limitations of rules and practicing XHTML will make you also very expert while you'll use xml.
     
  9. Steve Solanki

    Steve Solanki Affiliate affiliate

    54
    4
    0
  10. VirtualGlobalPhone

    VirtualGlobalPhone Moderator moderator Service Manager affiliate

    766
    449
    63
    @intuitionsoftech

    Consider this as Waring do not put copyrighted material as your answer. Please read the rules of the forum. You have simply copied from XHTML - Wikipedia, the free encyclopedia and pasted here.

    If found again we may have to audit all your post and may take strict action.
     
  11. Jack Ramon

    Jack Ramon Affiliate affiliate

    31
    3
    8
    HTML, is an application of SGML (Standard Generalized Markup Language) and allows an author to omit certain tags and use attribute minimization.

    XHTML, is an application of XML (Extensible Markup Language) that doesn’t permit the omission of any tags or the use of attribute minimization. However, it provides a shorthand notation for empty elements—for example, we could use <br/> instead of <br></br>—which HTML does not.
     
  12. James Orji

    James Orji Affiliate affiliate

    12
    8
    3
    XHTMl is an advanced version of HTML and it will do you a lot of good to use it as opposed to plain HTML.
     
  13. drappiro

    drappiro Affiliate affiliate

    10
    3
    3
  14. martinsmith

    martinsmith Affiliate affiliate

    58
    7
    8
    Thanks for sharing nice info...
     

Top Resources

MI