Learn CSS with πŸŽ“ online interactive courses,πŸ“Ί educational videos, and πŸ§‘πŸ»β€πŸ’»project-building tutorials.
Download

Sponsor

Route Planner and Route Optimizer

Title and Subtitle


Simple headings to add depth to your page

There are 2 types of heading:

  • title
  • subtitle

Title

Subtitle

<h1 class="title">Title</h1>
<h2 class="subtitle">Subtitle</h2>

Sizes #

There are 6 sizes available:

Title 1

Title 2

Title 3 (default size)

Title 4

Title 5

Title 6

<h1 class="title is-1">Title 1</h1>
<h2 class="title is-2">Title 2</h2>
<h3 class="title is-3">Title 3</h3>
<h4 class="title is-4">Title 4</h4>
<h5 class="title is-5">Title 5</h5>
<h6 class="title is-6">Title 6</h6>

Subtitle 1

Subtitle 2

Subtitle 3

Subtitle 4

Subtitle 5 (default size)

Subtitle 6

<h1 class="subtitle is-1">Subtitle 1</h1>
<h2 class="subtitle is-2">Subtitle 2</h2>
<h3 class="subtitle is-3">Subtitle 3</h3>
<h4 class="subtitle is-4">Subtitle 4</h4>
<h5 class="subtitle is-5">Subtitle 5</h5>
<h6 class="subtitle is-6">Subtitle 6</h6>

When you combine a title and a subtitle, they move closer together.

As a rule of thumb, it is recommended to use a size difference of two. So if you use a title is-1, combine it with a subtitle is-3.

Title 1

Subtitle 3

Title 2

Subtitle 4

Title 3

Subtitle 5

<p class="title is-1">Title 1</p>
<p class="subtitle is-3">Subtitle 3</p>

<p class="title is-2">Title 2</p>
<p class="subtitle is-4">Subtitle 4</p>

<p class="title is-3">Title 3</p>
<p class="subtitle is-5">Subtitle 5</p>

You can maintain the normal spacing between titles and subtitles if you use the is-spaced modifier on the first element.

Title 1

Subtitle 3

Title 2

Subtitle 4

Title 3

Subtitle 5

<p class="title is-1 is-spaced">Title 1</p>
<p class="subtitle is-3">Subtitle 3</p>

<p class="title is-2 is-spaced">Title 2</p>
<p class="subtitle is-4">Subtitle 4</p>

<p class="title is-3 is-spaced">Title 3</p>
<p class="subtitle is-5">Subtitle 5</p>

Sass and CSS variables #

Sass Variable
CSS Variable
Value
$title-color
var(--bulma-title-color)
var(--bulma-text-strong)
$title-family
var(--bulma-title-family)
false
$title-size
var(--bulma-title-size)
var(--bulma-size-3)
$title-weight
var(--bulma-title-weight)
var(--bulma-weight-extrabold)
$title-line-height
var(--bulma-title-line-height)
1.125
$title-strong-color
var(--bulma-title-strong-color)
inherit
$title-strong-weight
var(--bulma-title-strong-weight)
inherit
$title-sub-size
var(--bulma-title-sub-size)
0.75em
$title-sup-size
var(--bulma-title-sup-size)
0.75em
$subtitle-color
var(--bulma-subtitle-color)
var(--bulma-text)
$subtitle-family
var(--bulma-subtitle-family)
false
$subtitle-size
var(--bulma-subtitle-size)
var(--bulma-size-5)
$subtitle-weight
var(--bulma-subtitle-weight)
var(--bulma-weight-normal)
$subtitle-line-height
var(--bulma-subtitle-line-height)
1.25
$subtitle-strong-color
var(--bulma-subtitle-strong-color)
var(--bulma-text-strong)
$subtitle-strong-weight
var(--bulma-subtitle-strong-weight)
var(--bulma-weight-semibold)

How to support Bulma

#native_company# #native_desc#
#native_cta#
Get started for Free
Get started for Free