Table of Contents

About

Text inside

<>

are called tags.

Tags nearly always come in pairs:

or are:

Tags also nest. You should close them in the right order: the most recently opened tag should be the first one closed.

When there is content between the tags, the entire structure is called an element and the text between the start-tag and end-tag is called the element's content

Property

Name

Names:

  • are case-sensitive
  • must start with a letter or underscore
  • cannot start with the letters xml(or XML, or Xml, etc)
  • can contain:
    • letters,
    • digits,
    • hyphens (-)
    • underscores (_),
    • and periods (.)
  • cannot contain spaces

Type

Start

The beginning of every non-empty XML element is marked by a start-tag.

An example of a start-tag:

<termdef id="dt-dog" term="dog">

End

The end of every element that begins with a start tag MUST be marked by an end-tag containing a name that echoes the element's type as given in the start-tag.

An example of an end-tag:

</termdef>

Empty

An Empty-element tag is also known as self-close. Note the / in the tag to close it.

It may be used to describe any element which has no content,

Examples of empty elements tag:

<IMG align="left" src="http://www.w3.org/Icons/WWW/w3c_home" />
<br/>

Documentation / Reference