Magento Expert Forum - Improve your Magento experience

Results 1 to 5 of 5

How is XHTML better than HTML?

  1. #1

  2. #2
    Junior Member
    Join Date
    Mar 2017
    Location
    Delhi
    Posts
    244
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by kajal View Post
    How is XHTML better than HTML?
    Well, it is always a confusing term, now take a look, what is the difference between both of them?
    The simple answer is to your question is XHTML is come to resolve the issue exists in HTML.

    Ok, let's see what the version exactly meant to be
    HTML- This stands for "Hyper Text Markup Language". And it was the first Internet based Language. The things displayed in web browsers organised via HTML. HTML is static structure as you know about the earlier websites, they just have the text documents and HTML tags are used to bold, italic or underlined that text.
    And for the dynamic aspects of the website used to embedded in the created document file via JavaScript etc.

    XHTM- This stands for "X-tensible Hyper Text Markup Language". It consists the XML elements that extend the HTML capabilities and it is identical to the HTML4 but with XML elements as I mentioned in the definition of the XHTML. It is written in the same format like an XML Application. This helps to solve the some Cross-Browser compatibilty issues. This is more stricter than HTML and provide the Standard and Specification how Website's data is transmitted but it can be tougher to debug.

    Which one is better HTML or XHTML?
    XHTML was designed to fix the problems that existed in HTML. And some will say HTML and some will say XHTML and some will say it depends.
    But my vote is for the HTML5.
    HTML5 is the latest and greatest version of HTML and solve all the problems and has lots of new features. It solved the problem for that the XHTML was designed for. HTML5 also has the new API's.

  3. #3
    Junior Member
    Join Date
    Oct 2016
    Posts
    984
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default

    The difference is that XHTML is based on XML while HTML is based on SGML. XHTML is based on XML and thus requires the source to be well-formed. Since XHTML is more strict than HTML, less pre-processing is needed by the rendering engine.

    XHTML should be served as application/xhtml+xml for you to take advantage of the benefits, otherwise, XHTML will be treated as ordinary HTML.
    You should use XHTML if you need the syntax checking and the strict structure that XML impose.

  4. #4
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    228
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    The main "XHTML 1.0 is a reformulation of HTML 4.01 in XML, and joins the quality of HTML 4 with the intensity of XML." This implies, by utilizing XHTML, you are including the capability of the intensity of XML to your Web pages. ... Fundamentally, XHTML is strict HTML.

  5. #5
    Junior Member Simi123's Avatar
    Join Date
    May 2018
    Posts
    174
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    You can refer:
    Name:  Capture.PNG
Views: 12
Size:  56.5 KB

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •