A tag is text contained within angle brackets (<...>).
The following
table lists the rules that must be followed when creating tags in an XML document.
Rule |
Description |
Tags must exist in pairs. |
A start tag must have an end tag. A tag is considered an end tag if it contains a forward slash (/) between the left angle bracket and the tag name. For example, if <a> is the start tag, then </a> is the end tag. |
Tag names must be identical. |
The start tag name and the end tag
name must be identical.
For example,
if <a> is the start tag, then </a> must be the end tag name. </A> cannot be the end tag name. |
Tags should not overlap. |
Tags can be nested. For example:
<a>
<b>content</b>
</a>
However, tags cannot overlap. For example, the following is not
permitted:
<a>
<b>content</a>
</b>
|
|