Movatterモバイル変換


[0]ホーム

URL:


Menu
×
See More 
Sign In
+1 Get Certified Upgrade For Teachers Spaces Get Certified Upgrade For Teachers Spaces
   ❮     
     ❯   

BootstrapCSS Typography Reference


Bootstrap's Default Settings

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, all <p> elements have a bottom margin that equals half their computed line-height (10px by default).


Typography

The elements below are HTML elements that will be styled a little bit differently by Bootstrap than browser defaults. Look at the "Try it" examples to see the result/differences.

The classes below is used to style the elements further.

Element/ClassDescriptionExample
<h1> - <h6>
or
.h1 - .h6
h1 - h6 headingsTry it
<small>Creates a lighter, secondary text in any heading

Heading(secondary text)

Try it
.smallIndicates smaller text (set to 85% of the size of the parent):Smaller textTry it
.leadMakes a text stand out:Stand out textTry it
<mark>
or
.mark
Highlights text:Highlighted textTry it
<del>Indicates deleted text:Deleted textTry it
<s>Indicates no longer relevant text:No longer relevant textTry it
<ins>Indicates inserted text:Inserted textTry it
<u>Indicates underlined text:Underlined textTry it
<strong>Indicates bold text:Bold textTry it
<em>Indicates italic text:Italic textTry it
.text-leftIndicates left-aligned textTry it
.text-centerIndicates center-aligned textTry it
.text-rightIndicates right-aligned textTry it
.text-justifyIndicates justified textTry it
.text-nowrapIndicates no wrap textTry it
.text-lowercaseIndicates lowercased text:LOWERCASED TEXTTry it
.text-uppercaseIndicates uppercased text:uppercased textTry it
.text-capitalizeIndicates capitalized text:capitalized textTry it
<abbr>The <abbr> element indicates an abbreviation or acronym. Abbreviations with a title attribute have a dotted bottom border and a help cursor on hover, providing additional context on hover.Try it
.initialismDisplays the text inside the <abbr> element in a slightly smaller font sizeTry it
<address>Presents contact informationTry it
<blockquote>Indicates blocks of content from another sourceTry it
.blockquote-reverseIndicates a blockquote with right-aligned contentTry it
<ul>Indicates an unordered listTry it
<ol>Indicates an ordered listTry it
.list-unstyledRemoves the default list-style and left margin on list items (works on both <ul> and <ol>). This class only applies to immediate children list items (to remove the default list-style from any nested lists, apply this class to any nested lists as well)Try it
.list-inlinePlaces all list items on a single lineTry it
<dl>Indicates a description listTry it
.dl-horizontalLines up the terms and descriptions in the <dl> element side-by-side. Starts off like default <dl>s, but when the browser window expands, it will line up side-by-sideTry it

Code

Element/ClassDescriptionExample
<var>Indicates variables:x =ab +yTry it
<kbd>Indicates input that is typically entered via the keyboard:CTRL + PTry it
<pre>Indicates multiple lines of codeTry it
<pre class="pre-scrollable">Indicates multiple lines of code with scrollbarTry it
<samp>Indicates sample output from a computer program:Sample outputTry it
<code>Indicates inline snippets of code:span,divTry it


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted ourterms of use,cookies andprivacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved.W3Schools is Powered by W3.CSS.


[8]ページ先頭

©2009-2025 Movatter.jp