What makes the XHTML Mobile Profile well-formed?
XHTML MP strictly enforces the rules for well-formed, valid XML (Extensible Markup Language). A well-formed XML document conforms to all the rules for XML syntax. Main rules are:
- Every document must have an identifying XML header that is written properly
- Tag and attribute names must be written in lower case
- Elements must nest, no overlapping (one defined first, closed first)
- Non-empty elements must be closed (e.g. <p> tag to separate paragraphs)
- Empty elements must be terminated (tags without a closing tag, e.g. <br />
- Attribute values must be quoted (""
- Attribute value pairs can not be minimized (stand-alone attributes must be expanded, e.g. <ul compact="compact">![]()