Examveda

Which of the following is not a difference between HTML and XHTML

A. Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”

B. None of the mentioned

C. Tags and attributes are case-insensitive in HTML but not in XHTML

D. Special characters must be escaped using character entities in XHTML unlike HTML

Answer: Option A

Solution (By Examveda Team)

Option A is the correct answer.

The question asks for the statement that is not a valid difference between HTML and XHTML. Option A is incorrect because it contains factual errors. It refers to text/html and application/xml+xhtml as character sets (charsets), whereas they are actually MIME (Content) Types. In addition, the correct MIME type for XHTML is application/xhtml+xml, not application/xml+xhtml. Since the statement itself is incorrect, it cannot be considered a valid difference between HTML and XHTML.

Why Option B is incorrect:

Option B states "None of the mentioned", which would be correct only if all the other options described valid differences. However, Option A is factually incorrect, so not all the listed statements are valid differences. Therefore, Option B cannot be the correct answer.

Why Option C is incorrect:

Option C states that tags and attributes are case-insensitive in HTML but not in XHTML. This is a genuine difference. HTML parsers generally treat tag and attribute names without regard to case, whereas XHTML follows XML rules and is case-sensitive. For example, <BODY> is accepted in HTML, but XHTML requires <body>. Since this statement correctly describes a difference, it is not the answer.

Why Option D is incorrect:

Option D states that special characters must be escaped using character entities in XHTML. XHTML is based on XML and therefore follows strict XML syntax rules. Characters such as &, <, and > must be escaped wherever required to ensure the document is well-formed. HTML is generally more forgiving and may tolerate certain unescaped characters in situations where XHTML would produce a parsing error. Therefore, this option also describes a valid difference.

Hence, Option A is the only statement that is not a valid difference because it incorrectly describes MIME types as charsets and uses an invalid MIME type for XHTML.

This Question Belongs to HTML >> Basic HTML

Join The Discussion

Comments (1)

  1. Vishakha Singh
    Vishakha Singh:
    2 months ago

    It is C

Related Questions on Basic HTML

Choose the correct statement of HTML

A. In traditional XHTML close tag for some elements is optional but not encouraged

B. In traditional HTML close tag for some elements is optional but not encouraged

C. None of the mentioned

D. In both traditional XHTML and HTML close tag for some elements is optional