VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-text-line-height/

⇱ Bootstrap 5 Text Line height - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Text Line height

Last Updated : 8 Apr, 2024

Text Line height classes are used to set the gap between the two lines. there are several classes to set the line height. The default line height of the class is lh-base.

Bootstrap 5 Text Line height Classes:

ClassDescription
lh-1Set line height to 1
lh-smSet line height to small
lh-baseSet line height to default
lh-lgSet line height to large

Syntax:

<tag class="Text Line height Class">...</tag>

Examples of Bootstrap 5 Text Line height

Example 1: In this example we are using Bootstrap 5's line-height classes (lh-1 and lh-base) to adjust the line height of paragraphs containing text

Output:

👁 lineHeight
Bootstrap 5 Text Line height Example Output


Example 2: In this example we are using Bootstrap 5's line-height classes (lh-1, lh-base, lh-sm, lh-lg) to adjust text line height in paragraphs.

Output:

👁 lineHeight2
Bootstrap 5 Text Line height Example Output
Comment
Article Tags:

Explore