The comment in an XML document is given by:

2013

The comment in an XML document is given by:

  1. A.

    </---->

  2. B.

    <?---->

  3. C.

    <!-- ---- -->

  4. D.

    <!----!>

Attempted by 565 students.

Show answer & explanation

Correct answer: C

Correct syntax: <!-- ---- --> Explanation (English): XML comments are similar to HTML comments. They are used to add notes or explanations inside the XML document for better understanding. Comments are present only in the source and are ignored by the XML parser. XML comment syntax: <!-- This is a comment --> </----> is a closing-tag-like form, not a comment. Closing tags use </tagname>.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs