X

Bootstrap Text/Typography


Bootstrap's Default Settings

Bootstrap 의 글로벌(global) 기본 font-size 는 14px 이며, line-height 는 1.428 이다.

이는 <body> 와 모든 paragraphs에 적용된다.

또한, 모든 <p> 요소는 그들의 계산된 line-height의 반을 아래쪽 여백으 로 갖는다 (10px by default).


Bootstrap vs. Browser Defaults

이번 장은, Bootstrap 에서 브라우저의 기본 값과는 약간 다르게 스타일 된 몇몇 요소를 살펴본다.


<h1> - <h6>

기본적으로 Bootstrap 은 HTML headings (<h1> to <h6>) 을 다음과 같은 형식으로 스타일 한다.:

Example

h1 Bootstrap heading (36px)

h2 Bootstrap heading (30px)

h3 Bootstrap heading (24px)

h4 Bootstrap heading (18px)

h5 Bootstrap heading (14px)
h6 Bootstrap heading (12px)
Try it Yourself »


<small>

Bootstrap 의 HTML <small> 요소는 모든 heading 에서 좀 더 밝은 보조(secondary ) 텍스트를 작성하는데 사용된다.:

Example

h1 heading secondary text

h2 heading secondary text

h3 heading secondary text

h4 heading secondary text

h5 heading secondary text
h6 heading secondary text
Try it Yourself »


<mark>

Bootstrap 은 HTML <mark> 요소를 다음과 같은 방법으로 스타일한다:

Example

Use the mark element to highlight text.

Try it Yourself »


<abbr>

Bootstrap 은 HTML <abbr> 요소를 다음과 같은 방법으로 스타일한다:

Example

The WHO was founded in 1948.

Try it Yourself »


<blockquote>

Bootstrap 은 HTML <blockquote> 요소를 다음과 같은 방법으로 스타일한다:

Example

For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.

From WWF's website
Try it Yourself »


인용을 오른쪽에서 보이게 하려면,  .blockquote-reverse class:를 사용한다.

Example

For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.

From WWF's website
Try it Yourself »


<dl>

Bootstrap 은 HTML <dl> 요소를 다음과 같은 방법으로 스타일한다:

Example

Coffee
- black hot drink
Milk
- white cold drink
Try it Yourself »


<code>

Bootstrap 은 HTML <code> 요소를 다음과 같은 방법으로 스타일한다:

Example

The following HTML elements: span, section, and div defines a section in a document.

Try it Yourself »


<kbd>

Bootstrap 은 HTML <kbd> 요소를 다음과 같은 방법으로 스타일한다:

Example

Use ctrl + p to open the Print dialog box.

Try it Yourself »


<pre>

Bootstrap 은 HTML <pre> 요소를 다음과 같은 방법으로 스타일한다:

Example

Text in a pre element
is displayed in a fixed-width
font, and it preserves
both      spaces and
line breaks.
Try it Yourself »


Contextual Colors and Backgrounds

Bootstrap 는 또한 "색을 통한 의미"를 재공하는 문맥(contextual) 클래스를 갖는다.

텍스트 컬러 클래스들:.text-muted, .text-important, .text-success, .text-info, .text-warning, and .text-danger:

Example

This text is muted.

This text is important.

This text indicates success.

This text represents some information.

This text represents a warning.

This text represents danger.

Try it Yourself »

The classes for background colors are:.bg-important, .bg-success, bg-info, bg-warning, and .bg-danger:

Example

This text is important.

This text indicates success.

This text represents some information.

This text represents a warning.

This text represents danger.

Try it Yourself »


More Typography Classes

The Bootstrap classes below can be added to style HTML elements further:

Class Description Example
.lead Makes a paragraph stand out Try it
.small Indicates smaller text (set to 85% of the size of the parent) Try it
.text-left Indicates left-aligned text Try it
.text-center Indicates center-aligned text Try it
.text-right Indicates right-aligned text Try it
.text-justify Indicates justified text Try it
.text-nowrap Indicates no wrap text Try it
.text-lowercase Indicates lowercased text Try it
.text-uppercase Indicates uppercased text Try it
.text-capitalize Indicates capitalized text Try it
.initialism Displays the text inside an <abbr> element in a slightly smaller font size Try it
.list-unstyled Removes 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-inline Places all list items on a single line Try it
.dl-horizontal Lines up the terms (<dt>) and descriptions (<dd>) in <dl> elements side-by-side. Starts off like default <dl>s, but when the browser window expands, it will line up side-by-side Try it
.pre-scrollable Makes a <pre> element scrollable Try it


Complete Bootstrap Typography Reference

For a complete reference of all typography elements/classes, go to our complete Bootstrap Typography Reference.

Also look at our Bootstrap Helper Classes Reference for more information about contextual classes.