Bootstrap typography, including global settings, headings, body text, lists.
Bootstrap Typography Global settings
Use a native font stack that selects the best font-family for each OS and device.
For a more inclusive and accessible type scale, we use the browser’s default root font-size (typically 16px) so visitors can customize their browser defaults as needed.
Use the $font-family-base, $font-size-base, and $line-height-base attributes as our typographic base applied to the <body>.
Set the global link color via $link-color.
Use $body-bg to set a background-color on the <body> (#fff by default).
Bootstrap Headings
All HTML headings, <h1> through <h6>, are available.
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><pclass="lead">
This is a lead paragraph. It stands out from regular paragraphs.
</p></body></html>
Output
This is a lead paragraph. It stands out from regular paragraphs.
Stylized implementation of HTML’s <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations have a default underline and gain a help cursor to provide additional context on hover and to users of assistive technologies.
Add .initialism to an abbreviation for a slightly smaller font-size.
For quoting blocks of content from another source within your document. Wrap <blockquote class="blockquote"> around any HTML as the quote.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><blockquoteclass="blockquote"><p>A well-known quote, contained in a blockquote element.</p></blockquote></body></html>
Output
A well-known quote, contained in a blockquote element.
Bootstrap blockquote Naming a source
The HTML spec requires that blockquote attribution be placed outside the <blockquote>. When providing attribution, wrap your <blockquote> in a <figure> and use a <figcaption> or a block level element (e.g., <p>) with the .blockquote-footer class.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><figure><blockquoteclass="blockquote"><p>A well-known quote, contained in a blockquote element.</p></blockquote><figcaptionclass="blockquote-footer">
Someone famous in <citetitle="Source Title">Source Title</cite></figcaption></figure></body></html>
Output
Bootstrap blockquote Alignment
Use text utilities as needed to change the alignment of your blockquote.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><figureclass="text-center"><blockquoteclass="blockquote"><p>A well-known quote, contained in a blockquote element.</p></blockquote><figcaptionclass="blockquote-footer">
Someone famous in <citetitle="Source Title">Source Title</cite></figcaption></figure></body></html>
Output
Bootstrap Description list alignment
Align terms and descriptions horizontally by using our grid system’s predefined classes (or semantic mixins). For longer terms, you can optionally add a .text-truncate class to truncate the text with an ellipsis.
Sample Code
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1"><linkhref="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"rel="stylesheet"><linkhref="https://getbootstrap.com/docs/5.2/assets/css/docs.css"rel="stylesheet"><title>Bootstrap Example</title><scriptsrc="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script></head><bodyclass="p-3 m-0 border-0 bd-example"><dlclass="row"><dtclass="col-sm-3">Description lists</dt><ddclass="col-sm-9">A description list is perfect for defining terms.</dd><dtclass="col-sm-3">Term</dt><ddclass="col-sm-9"><p>Definition for the term.</p><p>And some more placeholder definition text.</p></dd><dtclass="col-sm-3">Another term</dt><ddclass="col-sm-9">This definition is short, so no extra paragraphs or anything.</dd><dtclass="col-sm-3 text-truncate">Truncated term is truncated</dt><ddclass="col-sm-9">This can be useful when space is tight. Adds an ellipsis at the end.</dd><dtclass="col-sm-3">Nesting</dt><ddclass="col-sm-9"><dlclass="row"><dtclass="col-sm-4">Nested definition list</dt><ddclass="col-sm-8">I heard you like definition lists. Let me put a definition list inside your definition list.</dd></dl></dd></dl></body></html>
Related Searches to Bootstrap Typography - Typography in Bootstrap
bootstrap font size smaller bootstrap font family font size bootstrap 4 bootstrap font size bootstrap font weight bootstrap font family list bootstrap font size responsive bootstrap 5 font size bootstrap font-family bootstrap font-family list bootstrap heading bootstrap font-weight bootstrap 5 font-family bootstrap typography bootstrap typography handson