Multiple choice general knowledge science & technology

Which statement is true?

  1. All the statements are true

  2. All XML elements must have a closing tag

  3. All XML elements must be lower case

  4. All XML documents must have a DTD

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The claimed answer B (All XML elements must have a closing tag) is correct. XML requires every opening tag to have a corresponding closing tag (or be self-closed with />). Option C is incorrect because XML is case-sensitive but doesn't require lowercase. Option D is incorrect because DTD is optional in XML.

AI explanation

A core rule of well-formed XML is that every element must have a matching closing tag (or be self-closing), unlike HTML where some tags like <br> or <img> can be left unclosed. XML doesn't require lowercase tag names (though it is case-sensitive) and doesn't mandate a DTD, since XML documents can be well-formed without being validated against one.