Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use css text modifier text-decoration

Shulou Source: shulou.com Published: 2022-06-03 17:40:58 10月04日 Update

This article mainly introduces how to use css text modification text-decoration, with certain reference value, interested friends can refer to, I hope you have a lot of harvest after reading this article, let Xiaobian take you to understand.

In HTML, you can use s tags, u tags to achieve the effect of text lines, but in order to ensure the principle of separation of structure and style, CSS is generally used to achieve style, improve the readability and maintainability of code;

1. Hyperlinks are underlined by default. You can use text-decoration: none to clear the underline of hyperlinks.

2. Underlines are often used for the key marks of articles. The middle line is used to cross out the original price when promoting sales. The upper line basically has no application scenario.

examples

div{ width: 200px; } .p1{ text-decoration: underline; } .p2{ text-decoration: line-through; } .p3{ text-decoration: overline; }

underlined

and dashes.

overline

Thank you for reading this article carefully. I hope that Xiaobian's "how to use css text modification text-decoration" article will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Tags: Underlines articles text tags styles links code value interest original price principles maintainability readability at the same time scenarios examples effects text articles more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Apple Shulou Tech Info macOS Microsoft