All HTML headings, <h1> through <h6> are available.
h1. Heading 1
h2. Heading 2
h3. Heading 3
h4. Heading 4
h5. Heading 5
h6. Heading 6
Built with Less
The typographic scale is based on two LESS variables in variables.less: @baseFontSize and @baseLineHeight. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.
Body copy
Bootstrap's global default font-size is 14px, with a line-height of 1.7em. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (9px by default).
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.
<p>...</p>
Lead body copy
Make a paragraph stand out by adding .lead.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
<pclass="lead">...</p>
Emphasis
Make use of HTML's default emphasis tags with lightweight styles.
<em>
For emphasizing a snippet of text with stress
The following snippet of text is rendered as italicized text.
<em>rendered as italicized text</em>
<strong>
For emphasizing a snippet of text with important
The following snippet of text is rendered as bold text.
<strong>rendered as bold text</strong>
<small>
For de-emphasizing inline or blocks of text, use the small tag.
This line of text is meant to be treated as fine print.
<p><small>This line of text is meant to be treated as fine print.</small></p>
Note: Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.
Notice Styles
Use the <p> tag with .success, .warning, .info or .error classes.
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
<pclass="success">...</p>
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
<pclass="info">...</p>
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
<pclass="warning">...</p>
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
<pclass="error">...</p>
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.
<abbr>
For expanded text on long hover of an abbreviation, include the title attribute.
An abbreviation of the word attribute is attr.
<abbrtitle="attribute">attr</abbr>
<abbr class="initialism">
Add .initialism to an abbreviation for a slightly smaller font-size.
Stylized implementation of HTML's element to present contact information for the nearest ancestor or the entire body of work.
<address>
Preserve formatting by ending all lines with <br>.
Twitter, Inc. 795 Folsom Ave, Suite 600 San Francisco, CA 94107 P: (123) 456-7890Full Name Этот адрес электронной почты защищен от спам-ботов. У вас должен быть включен JavaScript для просмотра.This email address is being protected from spambots. You need JavaScript enabled to view it.
<address>
<strong>Twitter, Inc.</strong><br>
795 Folsom Ave, Suite 600<br>
San Francisco, CA 94107<br>
<abbrtitle="Phone">P:</abbr> (123) 456-7890
</address>
<address>
<strong>Full Name</strong><br>
<ahref="mailto:#">Этот адрес электронной почты защищен от спам-ботов. У вас должен быть включен JavaScript для просмотра.</a>
</address>
Blockquotes
For quoting blocks of content from another source within your document.
Default blockqoute
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>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
</blockquote>
Blockquote options
Style and content changes for simple variations on a standard blockquote.
Naming a source
Add <small> tag 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
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<small>Someone famous <citetitle="Source Title">Source Title</cite></small>
</blockquote>
Alternate displays
Use .pull-right for a floated, right-aligned blockquote.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Someone famous in Source Title
<blockquoteclass="pull-right">
...
</blockquote>
Lists
Unordered
A list of items in which the order does not explicitly matter.
Lorem ipsum dolor sit amet
Nulla volutpat aliquam velit
Phasellus iaculis neque
Purus sodales ultricies
Vestibulum laoreet porttitor sem
Ac tristique libero volutpat at
Faucibus porta lacus fringilla vel
Eget porttitor lorem
<ul>
<li>...</li>
</ul>
Ordered
A list of items in which the order does explicitly matter (numbered list).
Lorem ipsum dolor sit amet
Consectetur adipiscing elit
Integer molestie lorem at massa
Facilisis in pretium nisl aliquet
Nulla volutpat aliquam velit
Faucibus porta lacus fringilla vel
Aenean sit amet erat nunc
Eget porttitor lorem
<ol>
<li>...</li>
</ol>
Unstyled
A list of items with no list-style or additional left padding.
Lorem ipsum dolor sit amet
Nulla volutpat aliquam velit
Phasellus iaculis neque
Purus sodales ultricies
Vestibulum laoreet porttitor sem
Ac tristique libero volutpat at
Faucibus porta lacus fringilla vel
Eget porttitor lorem
<ulclass="unstyled">
<li>...</li>
</ul>
Description
A list of terms with their associated descriptions.
Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
<dl>
<dt>...</dt>
<dd>...</dd>
</dl>
Note: Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow. In narrower viewports, they will change to the default stacked layout.
Horizontal description
Make terms and descriptions in <dl> line up side-by-side.
Description lists
A description list is perfect for defining terms.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
Felis euismod semper eget lacinia
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
<dlclass="dl-horizontal">
<dt>...</dt>
<dd>...</dd>
</dl>
Code
Inline
Wrap inline snippets of code with <code>.
For example, <section> should be wrapped as inline.
For example,<code><section></code> should be wrapped asinline.
Note: Be sure to keep code within <pre> tags as close to the left as possible; it will render all tabs.
You may optionally add the .pre-scrollable class which will set a max-height of 350px and provide a y-axis scrollbar.
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>
<pre>
<p>Sample text here...</p>
</pre>
Tables
Default styles
For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>.
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry
the Bird
@twitter
<tableclass="table">
…
</table>
Optional classes
Add any of the follow classes to the .table base class.
.table-striped
Adds zebra-striping to any table row within the <tbody> via the :nth-child CSS selector (not available in IE7-IE8).
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry
the Bird
@twitter
<tableclass="table table-striped">
…
</table>
.table-hover
Enable a hover state on table rows within a <tbody>.
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-hover">
…
</table>
.table-bordered
Add borders and rounded corners to the table.
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
Mark
Otto
@TwBootstrap
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-bordered">
…
</table>
.table-condensed
Makes tables more compact by cutting cell padding in half.
#
First Name
Last Name
Username
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry the Bird
@twitter
<tableclass="table table-condensed">
…
</table>
Optional row classes
Use contextual classes to color table rows.
Class
Description
.success
Indicates a successful or positive action.
.error
Indicates a dangerous or potentially negative action.
.info
Used as an alternative to the default styles.
#
Product
Payment Taken
Status
1
TB - Monthly
01/04/2012
Approved
2
TB - Monthly
02/04/2012
Declined
3
TB - Monthly
03/04/2012
Pending
4
TB - Monthly
04/04/2012
Call in to confirm
...
<tr class="success">
<td>1</td>
<td>TB - Monthly</td>
<td>01/04/2012</td>
<td>Approved</td>
</tr>
...
Forms
Default styles
Individual form controls receive styling, but without any required base class on the <form> or large changes in markup. Results in stacked, left-aligned labels on top of form controls.
<form>
<legend>Legend</legend>
<label>Label name</label>
<inputtype="text"placeholder="Type something…">
<spanclass="help-block">Example block-level help text here.</span>
<labelclass="checkbox">
<inputtype="checkbox"> Check me out
</label>
<buttontype="submit"class="btn">Submit</button>
</form>
Optional layouts
Included with Bootstrap are three optional form layouts for common use cases.
Search form
Add .form-search to the form and .search-query to the <input> for an extra-rounded text input.
Examples of standard form controls supported in an example form layout.
Inputs
Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.
Requires the use of a specified type at all times.
<inputtype="text"placeholder="Text input">
Textarea
Form control which supports multiple lines of text. Change row attribute as necessary.
<textarearows="3"></textarea>
Checkboxes and radios
Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.
Default (stacked)
<labelclass="checkbox">
<inputtype="checkbox"value="">
Option one is this and that—be sure to include why it's great
Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements for the best rendering.
Button
class=""
Description
btn
Standard gray button with gradient
btn btn-primary
Provides extra visual weight and identifies the primary action in a set of buttons
btn btn-info
Used as an alternative to the default styles
btn btn-success
Indicates a successful or positive action
btn btn-warning
Indicates caution should be taken with this action
btn btn-danger
Indicates a dangerous or potentially negative action
btn btn-inverse
Alternate dark gray button, not tied to a semantic action or use
btn btn-link
Deemphasize a button by making it look like a link while maintaining button behavior
Cross browser compatibility
IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.
Button sizes
Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for additional sizes.
Use the .btn class on an <a>, <button>, or <input> element.
<aclass="btn"href="">Link</a>
<buttonclass="btn"type="submit">Button</button>
<inputclass="btn"type="button"value="Input">
<inputclass="btn"type="submit"value="Submit">
As a best practice, try to match the element for your context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.
Icons
Font Awesome
Font Awesome is a pictographic language of web-related actions which delivers 249 icons. The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0 and you can find the full examples of usage at Font Awesome - http://fortawesome.github.com/Font-Awesome
Add .fa fa-CLASS_NAME to any element, best used with a <span>.
11 New Icons in 4.0
fa-rub
fa-ruble (alias)
fa-rouble (alias)
fa-pagelines
fa-stack-exchange
fa-arrow-circle-o-right
fa-arrow-circle-o-left
fa-caret-square-o-left
fa-toggle-left (alias)
fa-dot-circle-o
fa-wheelchair
fa-vimeo-square
fa-try
fa-turkish-lira (alias)
fa-plus-square-o
Web Application Icons
fa-adjust
fa-anchor
fa-archive
fa-arrows
fa-arrows-h
fa-arrows-v
fa-asterisk
fa-ban
fa-bar-chart-o
fa-barcode
fa-bars
fa-beer
fa-bell
fa-bell-o
fa-bolt
fa-book
fa-bookmark
fa-bookmark-o
fa-briefcase
fa-bug
fa-building-o
fa-bullhorn
fa-bullseye
fa-calendar
fa-calendar-o
fa-camera
fa-camera-retro
fa-caret-square-o-down
fa-caret-square-o-left
fa-caret-square-o-right
fa-caret-square-o-up
fa-certificate
fa-check
fa-check-circle
fa-check-circle-o
fa-check-square
fa-check-square-o
fa-circle
fa-circle-o
fa-clock-o
fa-cloud
fa-cloud-download
fa-cloud-upload
fa-code
fa-code-fork
fa-coffee
fa-cog
fa-cogs
fa-comment
fa-comment-o
fa-comments
fa-comments-o
fa-compass
fa-credit-card
fa-crop
fa-crosshairs
fa-cutlery
fa-dashboard (alias)
fa-desktop
fa-dot-circle-o
fa-download
fa-edit (alias)
fa-ellipsis-h
fa-ellipsis-v
fa-envelope
fa-envelope-o
fa-eraser
fa-exchange
fa-exclamation
fa-exclamation-circle
fa-exclamation-triangle
fa-external-link
fa-external-link-square
fa-eye
fa-eye-slash
fa-female
fa-fighter-jet
fa-film
fa-filter
fa-fire
fa-fire-extinguisher
fa-flag
fa-flag-checkered
fa-flag-o
fa-flash (alias)
fa-flask
fa-folder
fa-folder-o
fa-folder-open
fa-folder-open-o
fa-frown-o
fa-gamepad
fa-gavel
fa-gear (alias)
fa-gears (alias)
fa-gift
fa-glass
fa-globe
fa-group (alias)
fa-hdd-o
fa-headphones
fa-heart
fa-heart-o
fa-home
fa-inbox
fa-info
fa-info-circle
fa-key
fa-keyboard-o
fa-laptop
fa-leaf
fa-legal (alias)
fa-lemon-o
fa-level-down
fa-level-up
fa-lightbulb-o
fa-location-arrow
fa-lock
fa-magic
fa-magnet
fa-mail-forward (alias)
fa-mail-reply (alias)
fa-mail-reply-all
fa-male
fa-map-marker
fa-meh-o
fa-microphone
fa-microphone-slash
fa-minus
fa-minus-circle
fa-minus-square
fa-minus-square-o
fa-mobile
fa-mobile-phone (alias)
fa-money
fa-moon-o
fa-music
fa-pencil
fa-pencil-square
fa-pencil-square-o
fa-phone
fa-phone-square
fa-picture-o
fa-plane
fa-plus
fa-plus-circle
fa-plus-square
fa-plus-square-o
fa-power-off
fa-print
fa-puzzle-piece
fa-qrcode
fa-question
fa-question-circle
fa-quote-left
fa-quote-right
fa-random
fa-refresh
fa-reply
fa-reply-all
fa-retweet
fa-road
fa-rocket
fa-rss
fa-rss-square
fa-search
fa-search-minus
fa-search-plus
fa-share
fa-share-square
fa-share-square-o
fa-shield
fa-shopping-cart
fa-sign-in
fa-sign-out
fa-signal
fa-sitemap
fa-smile-o
fa-sort
fa-sort-alpha-asc
fa-sort-alpha-desc
fa-sort-amount-asc
fa-sort-amount-desc
fa-sort-asc
fa-sort-desc
fa-sort-down (alias)
fa-sort-numeric-asc
fa-sort-numeric-desc
fa-sort-up (alias)
fa-spinner
fa-square
fa-square-o
fa-star
fa-star-half
fa-star-half-empty (alias)
fa-star-half-full (alias)
fa-star-half-o
fa-star-o
fa-subscript
fa-suitcase
fa-sun-o
fa-superscript
fa-tablet
fa-tachometer
fa-tag
fa-tags
fa-tasks
fa-terminal
fa-thumb-tack
fa-thumbs-down
fa-thumbs-o-down
fa-thumbs-o-up
fa-thumbs-up
fa-ticket
fa-times
fa-times-circle
fa-times-circle-o
fa-tint
fa-toggle-down (alias)
fa-toggle-left (alias)
fa-toggle-right (alias)
fa-toggle-up (alias)
fa-trash-o
fa-trophy
fa-truck
fa-umbrella
fa-unlock
fa-unlock-alt
fa-unsorted (alias)
fa-upload
fa-user
fa-users
fa-video-camera
fa-volume-down
fa-volume-off
fa-volume-up
fa-warning (alias)
fa-wheelchair
fa-wrench
Form Control Icons
fa-check-square
fa-check-square-o
fa-circle
fa-circle-o
fa-dot-circle-o
fa-minus-square
fa-minus-square-o
fa-plus-square
fa-plus-square-o
fa-square
fa-square-o
Currency Icons
fa-bitcoin (alias)
fa-btc
fa-cny (alias)
fa-dollar (alias)
fa-eur
fa-euro (alias)
fa-gbp
< fa-inr
fa-jpy
fa-krw
fa-money
fa-rmb (alias)
fa-rouble (alias)
fa-rub
fa-ruble (alias)
fa-rupee (alias)
fa-try
fa-turkish-lira (alias)
fa-usd
fa-won (alias)
fa-yen (alias)
Text Editor Icons
fa-align-center
fa-align-justify
fa-align-left
fa-align-right
fa-bold
fa-chain (alias)
fa-chain-broken
fa-clipboard
fa-columns
fa-copy (alias)
fa-cut (alias)
fa-dedent (alias)
fa-eraser
fa-file
fa-file-o
fa-file-text
fa-file-text-o
fa-files-o
fa-floppy-o
fa-font
fa-indent
fa-italic
fa-link
fa-list
fa-list-alt
fa-list-ol
fa-list-ul
fa-outdent
fa-paperclip
fa-paste (alias)
fa-repeat
fa-rotate-left (alias)
fa-rotate-right (alias)
fa-save (alias)
fa-scissors
fa-strikethrough
fa-table
fa-text-height
fa-text-width
fa-th
fa-th-large
fa-th-list
fa-underline
fa-undo
fa-unlink (alias)
Directional Icons
fa-angle-double-down
fa-angle-double-left
fa-angle-double-right
fa-angle-double-up
fa-angle-down
fa-angle-left
fa-angle-right
fa-angle-up
fa-arrow-circle-down
fa-arrow-circle-left
fa-arrow-circle-o-down
fa-arrow-circle-o-left
fa-arrow-circle-o-right
fa-arrow-circle-o-up
fa-arrow-circle-right
fa-arrow-circle-up
fa-arrow-down
fa-arrow-left
fa-arrow-right
fa-arrow-up
fa-arrows
fa-arrows-alt
fa-arrows-h
fa-arrows-v
fa-caret-down
fa-caret-left
fa-caret-right
fa-caret-square-o-down
fa-caret-square-o-left
fa-caret-square-o-right
fa-caret-square-o-up
fa-caret-up
fa-chevron-circle-down
fa-chevron-circle-left
fa-chevron-circle-right
fa-chevron-circle-up
fa-chevron-down
fa-chevron-left
fa-chevron-right
fa-chevron-up
fa-hand-o-down
fa-hand-o-left
fa-hand-o-right
fa-hand-o-up
fa-long-arrow-down
fa-long-arrow-left
fa-long-arrow-right
fa-long-arrow-up
fa-toggle-down (alias)
fa-toggle-left (alias)
fa-toggle-right (alias)
fa-toggle-up (alias)
Video Player Icons
fa-arrows-alt
fa-backward
fa-compress
fa-eject
fa-expand
fa-fast-backward
fa-fast-forward
fa-forward
fa-pause
fa-play
fa-play-circle
fa-play-circle-o
fa-step-backward
fa-step-forward
fa-stop
fa-youtube-play
Brand Icons
All brand icons are trademarks of their respective owners.
The use of these trademarks does not indicate endorsement of the trademark holder by Font Awesome, nor vice versa.