XML is used to mark up data so it can be processed by computers, whereas HTML is used to mark up text for display to users. XML allows users to define their own tags, and elements in XML must have both a start and end tag. Well-formed XML requires proper nesting of elements and attributes enclosed in quotes.