Multiple choice technology programming languages

What is the correct syntax of the declaration which defines the XML version?:

  1. <xml version="1.0" />

  2. <?xml version="1.0"?>

  3. <?xml version="1.0" />

  4. None of the above

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

XML declaration uses Processing Instruction syntax: . Option A is wrong - needs not <. Option B is technically correct but marked false. Option C adds a space before ?> which is also valid XML 1.0 syntax. The ?> PI syntax is the key.