Multiple choice technology web technology

XML elements cannot be empty

  1. True

  2. False

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

XML elements CAN be empty - they can be written as or self-closing . This is valid XML syntax and commonly used for elements that don't need content. The statement incorrectly claims empty elements are impossible.

AI explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) True - This option is incorrect because XML elements can indeed be empty. In XML, an element can be represented as an empty element by using a self-closing tag, such as ``. This indicates that the element has no content and does not require a closing tag.

Option B) False - This option is correct because XML elements can be empty. As mentioned earlier, an element can be represented as an empty element using a self-closing tag in XML.

The correct answer is B. XML elements can be empty.