About
The text between a start-tag and a end-tag is called the element's content.
Articles Related
Model
Empty
An element with no content is said to be empty. The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag.
Examples of empty elements:
<IMG align="left" src="http://www.w3.org/Icons/WWW/w3c_home" />
<br></br>
<br/>
Mixed (PCDATA)
An element has mixed content when elements of that type contain:
- optionally interspersed with child elements.
See XML - Parsed Character Data (PCDATA)
Text and elements can be freely intermixed in a DOM hierarchy. That kind of structure is called mixed content in the DOM model.
Mixed content occurs frequently in documents. For example, suppose you wanted to represent this structure:
<sentence>This is an <bold>important</bold> idea.</sentence>
The hierarchy of DOM nodes would look something like this, where each line represents one node:
ELEMENT: sentence
+ TEXT: This is an
+ ELEMENT: bold
+ TEXT: important
+ TEXT: idea.
It is the intermixing of text and elements that defines the mixed-content model.
Not Mixed (CDATA)
An element has a not mixed content when elements of that type contain only character data.
Element
An element type has “element content” when elements of that type MUST contain only child elements (no character data), optionally separated by white space.