Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
<?xml version="1.0" encoding="UTF-8"?> <!-- XML Syntax Rules --> <!-- 1. Must have a root element --> <root> <!-- 2. Tags are case-sensitive: <Name> != <name> --> <Name>Alice</Name> <name>Bob</name> <!-- 3. All tags must be closed --> <self-closing-tag /> <!-- self-closing --> <normal>content</normal> <!-- 4. Attributes must be quoted --> <item id="1" color="red">Value</item> <!-- 5. Proper nesting required --> <!-- WRONG: <a><b></a></b> --> <!-- RIGHT: --> <a><b></b></a> <!-- 6. Special characters must be escaped --> <comparison>5 < 10 && 10 > 5</comparison> <!-- < = < > = > & = & " = " ' = ' --> <!-- 7. Comments --> <!-- This is a comment --> </root>
Result
Open