πŸ“Š HTML
Q. 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) In both traditional XHTML and HTML close tag for some elements is optional
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) In traditional HTML close tag for some elements is optional but not encouraged

Explanation:

In traditional HTML, some elements like <p>, <li>, <td>, <tr>, and <option> do not necessarily require a closing tag, though it is generally recommended to include them for better readability and maintainability.

  • In XHTML, all elements must have a closing tag or be self-closing (e.g., <br />, <img />).
  • The close tag is not optional in XHTML but can be optional in HTML.

Thus, option (B) is the most accurate statement.

Explanation by: Official MCQ Buddy

In traditional HTML, some elements like <p>, <li>, <td>, <tr>, and <option> do not necessarily require a closing tag, though it is generally recommended to include them for better readability and maintainability.

  • In XHTML, all elements must have a closing tag or be self-closing (e.g., <br />, <img />).
  • The close tag is not optional in XHTML but can be optional in HTML.

Thus, option (B) is the most accurate statement.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
373
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Harikesh
Publisher
πŸ“ˆ
82%
Success Rate