Typography

Headings, paragraphs and text styling.

Official bootstrap documentation

Headings

All HTML headings, <h1> through <h6>, are available. .h1 through .h6 classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.

h1. Bootstrap heading

h2. Bootstrap heading

h3. Bootstrap heading

h4. Bootstrap heading

h5. Bootstrap heading
h6. Bootstrap heading

Body and Lead body

Bootstrap's global default font-size is 14px, with a line-height of 1.428. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero.

Suspendisse nec quam luctus, placerat orci eu, varius mauris. Aenean venenatis sollicitudin lacinia. Integer dignissim mattis eros. Mauris non velit at libero semper aliquam. Maecenas laoreet leo eu tortor laoreet, non ultricies ligula suscipit. Cras non fringilla leo. Ut viverra sem diam, at tempor ex imperdiet nec.

Inline text elements

Marked text

For highlighting a run of text due to its relevance in another context, use the <mark> tag.

You can use the mark tag to highlight text.


Deleted text

For indicating blocks of text that have been deleted use the <del> tag.

This line of text is meant to be treated as deleted text.


Strikethrough text

For indicating blocks of text that are no longer relevant use the <s> tag.

This line of text is meant to be treated as no longer accurate.


Inserted text

For indicating additions to the document use the <ins> tag.

This line of text is meant to be treated as an addition to the document.


Italics

For emphasizing a snippet of text with italics use the <em> tag

rendered as italicized text


Bold

For emphasizing a snippet of text with a heavier font-weight use the <strong> tag

rendered as bold text


Small text

For de-emphasizing inline or blocks of text, use the <small> tag to set text at 85% the size of the parent. Heading elements receive their own font-size for nested <small> elements.

You may alternatively use an inline element with .small in place of any <small>.

This line of text is meant to be treated as fine print.


Underlined text

To underline text use the <u> tag.

This line of text will render as underlined

Abbreviations

Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover and to users of assistive technologies.


Basic abbreviation

An abbreviation of the word attribute is attr.


Initialism

Add .initialism to an abbreviation for a slightly smaller font-size.

HTML is the best thing since sliced bread.

Blockquotes

For quoting blocks of content from another source within your document.

Wrap <blockquote> around any HTML as the quote. For straight quotes, we recommend a <p>.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Blockquote options

Add a <footer> for identifying the source. Wrap the name of the source work in <cite>.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

Alternate displays

Add .blockquote-reverse for a blockquote with right-aligned content.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Headings with secondary text

Create lighter, secondary text in any heading with a generic <small> tag or the .small class.

h1. Bootstrap heading Secondary text

h2. Bootstrap heading Secondary text

h3. Bootstrap heading Secondary text

h4. Bootstrap heading Secondary text

h5. Bootstrap heading Secondary text
h6. Bootstrap heading Secondary text

Lead

Make a paragraph stand out by adding .lead.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero.

Alignment classes

Easily realign text to components with text alignment classes.

.text-left

Left aligned text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero. Suspendisse nec quam luctus, placerat orci eu, varius mauris.

.text-center

Center aligned text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero. Suspendisse nec quam luctus, placerat orci eu, varius mauris.

.text-right

Right aligned text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero. Suspendisse nec quam luctus, placerat orci eu, varius mauris.

.text-justify

Justified text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero. Suspendisse nec quam luctus, placerat orci eu, varius mauris.

.text-nowrap

No wrap text. Lorem ipsum dolor sit amet.

Transformation classes

Transform text in components with text capitalization classes.

.text-lowercase

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero. Suspendisse nec quam luctus, placerat orci eu, varius mauris. Maecenas sed orci dui. Nulla mattis semper hendrerit. Suspendisse sagittis aliquet enim, nec posuere lectus pharetra et. Ut non elit vel risus imperdiet ornare.

.text-uppercase

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero. Suspendisse nec quam luctus, placerat orci eu, varius mauris. Maecenas sed orci dui. Nulla mattis semper hendrerit. Suspendisse sagittis aliquet enim, nec posuere lectus pharetra et. Ut non elit vel risus imperdiet ornare.

.text-capitalize

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse et sapien quis urna pharetra posuere vitae dapibus arcu. Curabitur posuere, est nec dictum finibus, tellus justo vehicula enim, a ornare quam urna in libero. Suspendisse nec quam luctus, placerat orci eu, varius mauris. Maecenas sed orci dui. Nulla mattis semper hendrerit. Suspendisse sagittis aliquet enim, nec posuere lectus pharetra et. Ut non elit vel risus imperdiet ornare.

Code - Inline

Wrap inline snippets of code with <code>.

For example, <section> should be wrapped as inline.

User input

Use the <kbd> to indicate input that is typically entered via keyboard.

To switch directories, type cd followed by the name of the directory.
To edit settings, press ctrl + ,

Basic block

Use <pre> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.

<p>Sample text here...</p>

You may optionally add the .pre-scrollable class, which will set a max-height of 350px and provide a y-axis scrollbar.

Variables

For indicating variables use the <var> tag.

y = mx + b

Sample output

For indicating blocks sample output from a program use the <samp> tag.

This text is meant to be treated as sample output from a computer program.

Contextual colors

Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

Nullam id dolor id nibh ultricies vehicula ut id elit.

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

Maecenas sed diam eget risus varius blandit sit amet non magna.

Etiam porta sem malesuada magna mollis euismod.

Donec ullamcorper nulla non metus auctor fringilla.