Machine-translated by Google. Questions are authored in English.
Top

Discussion

Choose the correct statement of Hypertext Markup Language (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.

Answer: B

The correct statement is that in traditional HTML, the close tag for some elements is optional but not encouraged.

Traditional (SGML-based) HTML lets authors omit the end tags of certain elements, such as p, li, td and tr, because the parser can infer where they end. It is allowed but not good practice.

XHTML is XML, which must be well-formed: every element must be closed. So the options saying close tags are optional in XHTML are wrong, and 'None of the mentioned' is wrong because statement (b) is correct.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.