Consider this code snippet:
<p class="intro">Hello World! I am <em>Andrew</em></p>
There are two elements (a p-type and em-type), one attribute (class="intro"), and four tags (<p class="intro">, <em>, </em>, </p>).
In XML, the tags are the things delimited by `<' and `>', the attributes are the name-value pairs inside the opening tags, and the element is the whole thing - running from the start of the opening tag right the way through to the end of the closing tag.
Published September 25, 2004