Skip to main content
On this page

Styled inline and block text elements for body content

When to use​

  • For body paragraphs and running prose
  • For supplementary text at a smaller size, such as captions or legal disclaimers, using Small
  • For inline emphasis within a sentence using Strong (bold) or Em (italic)
  • For strikethrough text when showing a removed or superseded value using LineThrough
  • For superscript and subscript notation using Sup and Sub

When not to use​

  • For page or section headings - use Heading (Heading1 through Heading4) instead.
  • For list items - use List (Ul, Ol, Li) instead.
  • For term-definition pairs - use List (Dl, Dt, Dd) or Summary List instead.

Anatomy​

  1. Paragraph (P, the primary block-level text element)
  2. Small text (Small, reduced size, used inline or as a modifier on P)
  3. Inline emphasis (Strong, Em, LineThrough, used inside other text elements)
  4. Superscript / Subscript (Sup, Sub, used inline for notation)

Basic usage​

Loading...
Edit live code
<>
  <P>An example of body text.</P>
  <P>
    An example of <Em>emphasis</Em>
  </P>
  <P>
    An example of <Strong>strong text</Strong>.
  </P>
  <P>
    An example with <LineThrough>line through</LineThrough>.
  </P>
  <P>
    <Small>An example of small text.</Small>
  </P>
  <P>
    An example with superscript<Sup>1</Sup> and subscript<Sub>2</Sub>.
  </P>
</>

Variants and features​

Paragraph​

P is the standard body text element. It renders a p tag with responsive font size and appropriate vertical margins. Use it for any block of prose content.

Loading...
Edit live code
<>
  <P>Your direct debit is collected on the 1st of each month.</P>
  <P>If you want to change the amount, you can do this in your account settings.</P>
</>

Small text​

Small reduces the font size to the small scale from the design token system. It renders a small element and is typically used inline within a P or on its own for captions, legal text, or secondary information.

Loading...
Edit live code
<P>Your estimated bill is £142. <Small>Based on average household usage.</Small></P>

Bold and semi-bold​

Strong renders a strong element with fontWeights.bold. Use it to emphasise a word or phrase that is genuinely important within a sentence.

SemiStrong renders a strong element with fontWeights.semiBold. Use it for moderate emphasis, such as term labels within a sentence, where full bold would be visually heavy.

Note: SemiStrong is not exported from the Nebula public API. Use Strong for emphasis in application code.

Loading...
Edit live code
<P>Your next payment of <Strong>£142.00</Strong> is due on 1 February 2025.</P>

Italic​

Em renders an em element with italic styling. Use it for titles of works, technical terms introduced for the first time, or other cases where italic has semantic meaning. Do not use it for decorative effect.

Loading...
Edit live code
<P>This tariff is known as <Em>Flex 12</Em>.</P>

Strikethrough​

LineThrough renders a span with text-decoration: line-through. Use it to show that a value has been removed or replaced, such as an original price alongside a discounted price.

Loading...
Edit live code
<P><LineThrough>£180.00</LineThrough> £142.00 per year</P>

Superscript and subscript​

Sup and Sub render sup and sub elements at the small font size. Use for footnote markers, mathematical notation, or chemical formulae.

Loading...
Edit live code
<>
  <P>Your tariff includes a standing charge<Sup>1</Sup>.</P>
  <P>Emissions are measured in CO<Sub>2</Sub>e.</P>
</>