monetizer expertmobi
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

    16
    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. monetizer
  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

    178
    17
    0
    Both are important for search engine look up and human look up of your website
     
  5. Davidwatson

    Davidwatson Affiliate affiliate

    16
    2
    0
    Thanks for describing it,
     
  6. ushaa4n

    ushaa4n Affiliate affiliate

    73
    17
    0
    thanks for sharing this..
     
  7. johnbrent

    johnbrent Affiliate affiliate

    209
    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 Service Manager Service Manager affiliate

    178
    70
    28
    @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.
     

Featured Resources (View All)

MI