Text
Bootstrap5 Text defines how to change the alignment, weight, line height, wrapping, font size of the text, and more with the help of Bootstrap 5 utilities.
Utilities |
Descriptions |
---|---|
Text alignment | We can use text alignment classes to align the text in different positions in different viewports. |
Text wrapping and overflow | To wrap a text we need to use the .text-wrap class and to prevent a text from wrapping we need to use the .text-nowrap class. |
Word break | The word break utilities are used to avoid breaking components due to long strings of text. |
Text transform | It is used to convert a given text into lower case or upper case. It can also transform the first letter of every word into an uppercase which is called capitalized text. |
Font size | To change the size of the font instead of using heading classes(e.g., .h1-.h6) we can use .fs classes to change the size of the font. |
Font weight and italics | These utilities are used to change the weight and style of the text abbreviated as .fw-* and to change the style of the text we can use utilities that are abbreviated as .fst-* |
Line height | To change the height of the line we can use utilities that are abbreviated as .lh-*. |
Monospace | Use utility .font-monospace to modify the selection to the monospace. |
Reset color | It is used the utility text-reset to reset the color of link or the text |
Text decoration | These classes can be used to decorate the text in different ways. eg. underline. |
Sass | This involves the Sass map and spacing utilities that are declared in Utility API. |
Bootstrap 5 Utility Reference
Bootstrap 5 Utility facilitates various types of utilities to make a stylish, mobile-friendly, and responsive front-end website. The utility layout is used for showing, hiding, aligning, and spacing content.
The complete list of Utilities is listed below with their brief description:
Contact Us