Draft

1.2 (2019-02-09)

Emphasis

This is a draft specification. It is likely that changes will still be made before the final specification.

Use the em element to emphasize text. You may use em to stress certain words in a sentence. Do not use em to effect a particular typographic style, since it may be rendered differently by different display tools.

Notes

  • The em element can contain a mixture of text and any general inline elements.

  • The em element can occur in any general inline context, including inside most inline elements, some basic block elements, and certain informational elements.

  • The em element can link to other pages or documents. See Ubiquitous Linking for more information.

  • The style attribute takes a space-separated list of style hints. Processing tools should adjust their behavior according to those style hints they understand.

  • The em element can have attributes from external namespaces. See External Namespaces for more information on external-namespace attributes.

Examples

Use em to stress a word in a sentence:

You should <em>never</em> run a graphical application as root.

You should never run a graphical application as root.

Use em to mark the first occurrence of a term:

Note that <em>accelerators</em> are different from <em>mnemonics</em>.

Note that accelerators are different from mnemonics.

Processing Expectations

Emphasized text is traditionally presented in an italic or oblique font. Italic and oblique fonts stress a portion of text without making it stand out. By contrast, bold text tends to draw the eye, which can be distracting when reading long passages of text. In scripts without a distinction between roman and italic type styles, it may still be possible to use an oblique font or some other font variation. Bold text may be used if necessary.

Underlining should be avoided completely, since it hurts the legibility of the text. This problem is especially pronounced in scripts which place diacritical marks below the text. In these scripts, underlining can render the text completely illegible.

Comparison to Other Formats

The em element is similar to the emphasis element in DocBook.

The em element may be used in place of the i, b, or u elements in DITA. Mallard does not have a normative way of specifying the typographic presentation of emphasized text, though processing tools may allow style hints to control this.

Schema

The formal definition of the Mallard language is maintained in RELAX NG Compact Syntax in code blocks within this specification. This is the formal definition for the em element. The namespace declarations for this definition are on the page Pages.

mal_inline_em = element em {
  mal_inline_em_attr,
  mal_inline_em_inline
}
mal_inline_em_attr = (
  mal_attr_link *,
  attribute style { xsd:NMTOKENS } ?,
  mal_inline_attr,
  mal_attr_external *
)
mal_inline_em_inline = mal_inline
© 2008-2011 Shaun McCance
cc-by-sa 3.0 (us)

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

As a special exception, the copyright holders give you permission to copy, modify, and distribute the example code contained in this document under the terms of your choosing, without restriction.

Powered by
Mallard