Multiple choice technology

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. <xml version=1.0 />

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

The XML declaration must start with . It uses question marks on both sides, not a slash like other XML tags. Options B, C, and D are incorrect because they either use the wrong closing syntax or don't start with the proper XML declaration marker.