Superscript

A superscript is text that is printed above the line. It is frequently used in chemical and mathematical formulas.

Syntax

XDITA

<sup>

HDITA

<sup>

MDITA (extended profile)

There is no specific support in the MDITA core profile. If needed, use an HDITA snippet.

Rendering expectations

The superscript component is typically rendered higher in relationship to the surrounding text and in a smaller font.

Attributes

The available attributes vary based on the authoring format:

XDITA and HDITA
The following attributes are available on this element: localization attributes, universal attributes, and @keyref.
MDITA
For the MDITA core profile, the equivalent of the XDITA @keyref attribute is supported. For the MDITA extended profile, attributes can be specified by using the HDITA representation.

Examples

This section is non-normative.

Example 1. XDITA example

The following example demonstrates the use of superscript in an XDITA topic.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Topic//EN" "lw-topic.dtd">
<topic id="requirements">
  <title>Franchise Requirements</title>
  <body>
    <p>Franchised restaurants should be located in areas of at least 200 ft<sup>2</sup>.</p>
  </body>
</topic>
Example 2. HDITA example

The following example demonstrates the use of superscript in an HDITA topic.

  <!DOCTYPE html>
  <html>
  <head>
  <title>Franchise Requirements</title>
  </head>
  <body>
   <article id="requirements">
    <h1>Franchise Requirements</h1>
    <p>Franchised restaurants should be located in areas of at least 200 ft<sup>2</sup>.</p>
  </body>
  </html>