␡
- Rule 1: All XML Must Have a Root Element
- Rule 2: All Tags Must Be Closed
- Rule 3: All Tags Must Be Properly Nested
- Rule 4: Tag Names Have Strict Limits
- Rule 5: Tag Names Are Case Sensitive
- Rule 6: Tag Names Cannot Contain Spaces
- Rule 7: Attribute Values Must Appear Within Quotes
- Rule 8: White Space Is Preserved
- Rule 9: Avoid HTML Tags (Optional)
Like this article? We recommend
Rule 7: Attribute Values Must Appear Within Quotes
Attribute values modify a tag or help identify the type of information being tagged. If you’re a web designer, you may be used to the flexibility of HTML, in which some attributes don’t require quotes. In XML, all attribute values must appear within quotes. For example:
<chapter number="1"> <artist title="author" nationality="USA">