Put identity and metadata in attributes when values are short and apply to the whole element. Put content in child elements when it may grow or contain markup.
Rule of thumb: if it might contain nested structure, use an element — not an attribute.
Challenge
Catalog snippet
- Add a root
<catalog>with two<book id="...">children. - Each book needs
<title>and<price>.
Done when: validator shows well-formed XML and tree preview lists books.