Next / Previous / Contents / TCC Help System / NM Tech homepage

10. Inline content: Inline.model

In our content models, the abbrevation Inline.model refers to any content that can be placed inside a block. Here is its content model:

Inline.model = { text | Inline.class }*
Inline.class =
{ a | abbr | acronym | cite | code | del | dfn | em | img | ins |
  kbd | object | q | samp | span | strong | sub | sup | var
}

That is, inline content may be ordinary text (not enclosed in any element), or one of the inline elements such as code and em, or any mixture of text and inline elements in any order.

Note

Except where otherwise indicated, the content model of each inline element is:

{ Common.attrib,
  Inline.model
}

That is, they can bear any of the attributes listed in Section 15.3, “The common attributes: Common.attrib, and they can contain any mixture of text and other inline elements.

10.1. a: Hyperlink

The a element is the workhorse of the Internet: it allows you to link to another document. For example, if you want to link to the New Mexico Tech web page, and use the text “NMIMT” as the link text, encode it like this:

  <a href="http://www.nmt.edu/">NMIMT</a>

Here is the full content model:

element a
{ attribute href { xsd:anyURI }?,
  attribute charset { text }?,
  attribute type { text }?,
  attribute hreflang { text }?,
  attribute rel { text }?,
  attribute rev { text }?,
  attribute tabindex { xsd:nonNegativeInteger }?,
  attribute onblur { text }?,
  attribute onfocus { text }?,
  Common.attrib,
  Inline.model
}
href

To make a hyperlink to another location, use that location's URI as the value of this attribute. Your link can point to the beginning of another document, a named location inside another document, or a named location inside the same document. For the rules governing URIs, see Section 6.4, “URIs and link targets: where hyperlinks point”.

charset

Describes the character set of the link's target. For legal values, see Section 15.2, “The charset attribute: Declaring a character set”.

type

Describes the MIME type of the document at the link's target. See Section 6.7, “MIME types: Defining a resource's format”.

hreflang

Describes the language of the document located at the target of the href attribute. For language codes, see Section 15.1, “The xml:lang attribute”.

rel

Describes the relationship of this document to the one at its target. See Section 6.5, “The link datatype”.

rev

Describes the relationship of the target document to this document—the reverse relationship to that given by the rel attribute. See Section 6.5, “The link datatype”.

tabindex

This attribute specifies how this hyperlink is traversed in the tabbing order. See Section 15.7, “The tabindex attribute: Specifying tab traversal order”.

onblur, onfocus

See Section 16, “Event attributes”.

Common.attrib

You can use any of the attributes from Section 15.3, “The common attributes: Common.attrib.

For example, of particular utility is the id attribute. You can attach an id attribute to any element in the document, and link to that element using a fragment identifier. For a discussion of fragment identifiers, see Section 6.4, “URIs and link targets: where hyperlinks point”.

Inline.model

The content of the a element can be any mixture of text and inline elements; see Section 10, “Inline content: Inline.model.

Everything inside of this element will act as a hyperlink: text, images, or whatever.