Q&A

Q1: Why is it possible to define your own tags in XML but not in HTML?
A1: In HTML, the tags tell the browser what to do to the text between them. When a tag is encountered, the browser interprets it and displays the text in the proper form. If the browser doesn't understand a tag, it ignores it. In XML, the interpretation of the tags isn't the responsibility of the browser.
Q2: How many different data types can be defined in XML?
A2: Since the number of possible tag names is effectively infinite, there's no upper limit.

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.