To be valid, an XHTML tag must:

1. Begin with the less than symbol "<" and end with the greater than symbol ">".

2. Have a tag name that starts with a letter or underscore, followed by letters, digits, hyphens, or underscores.
3. Close properly with a corresponding closing tag, if it is a container tag.
4. Have all attribute names and values enclosed in double or single quotes.
5. Ensure that all attribute values are properly quoted and are separated by spaces.
6. Maintain proper nesting of tags.