![]() |
VOOZH | about |
Bootstrap 5 Text decoration classes are used to decorate the text components, like underlining, strike, etc. These classes can be used in many cases like on anchor tag sometime we do not want any underline.
Text Decoration Classes:
| Class Name | Description |
|---|---|
| text-decoration-underline | Used to put an underline on the text. |
| text-decoration-line-through | Used to put a line through the text. |
| text-decoration-none | Used to remove all decorations from the text. |
Syntax:
<tag class="text-decoration-*">...</tag>Example 1: Below example illustrate the Text decoration in Bootstrap 5. In this example, we will use an underlined class on a single text.
Output:
Example 2: In this example we use Bootstrap's "text-decoration-none" class removes underlines from the hyperlink. Another class, "text-decoration-line-through", strikes through text, applied to the paragraph element.
Output: