Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Typography Utilities | Core Concepts and Basic Styling
Tailwind CSS: Styling for Modern Web Development
course content

Conteúdo do Curso

Tailwind CSS: Styling for Modern Web Development

Tailwind CSS: Styling for Modern Web Development

1. Introduction and Setup
2. Core Concepts and Basic Styling
3. Building Basic Components
4. Layout Basics
5. Responsiveness and Customization

Typography Utilities

Tailwind CSS provides a robust set of utilities for managing typography, allowing you to easily control font sizes, font weights, and line heights. These utilities help ensure your text is styled consistently and easily readable across different devices and screen sizes.

Font Size

Font size utilities in Tailwind CSS allow you to adjust the size of your text. These utilities follow a naming convention that makes it easy to understand and apply different sizes.

Font SizeDescription
text-xsExtra small text.
text-smSmall text.
text-baseBase text (default size).
text-lgLarge text.
text-xlExtra large text.
text-2xl, text-3xl, text-4xl, text-5xl, text-6xlIncreasingly larger text sizes.
html

index

css

index

js

index

Font Weight

Font weight utilities control the thickness or boldness of the text. Tailwind CSS provides several utilities to cover a wide range of font weights, from thin to black.

Font WeightDescription
font-thinThin font weight.
font-lightLight font weight.
font-normalNormal font weight.
font-mediumMedium font weight.
font-semiboldSemi-bold font weight.
font-boldBold font weight.
font-extraboldExtra bold font weight.
font-blackBlack font weight.
html

index

css

index

js

index

Line Height

Line height utilities control the vertical spacing between lines of text. Proper line height can improve readability and the overall visual appearance of text blocks.

Line HeightDescription
leading-noneNo line height.
leading-tightTight line height.
leading-snugSnug line height.
leading-normalNormal line height.
leading-relaxedRelaxed line height.
leading-looseLoose line height.
leading-3, leading-4, leading-5, etc.Specific numeric line height.
html

index

css

index

js

index

Note

If you need specific information about font size, font weight, or line height, please click on the following links:

1. Which class would you use to set the font size to extra large?
2. What utility class would you use to make text bold?
3. Which class sets the line height to be relaxed?

Which class would you use to set the font size to extra large?

Selecione a resposta correta

What utility class would you use to make text bold?

Selecione a resposta correta

Which class sets the line height to be relaxed?

Selecione a resposta correta

Tudo estava claro?

Seção 2. Capítulo 7
We're sorry to hear that something went wrong. What happened?
some-alt