How to add an underscore in css
This article is about how to add underlined content in css. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
In css, you can use the "text-decoration:line-through" style to add a dash to a text element, and the "text-decoration" attribute is used to specify the decoration added to the text, and when the attribute value is set to "line-through", it is used to define the dash that passes through the text.
The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.
What is the style of dash added in css
The text-decoration attribute specifies the embellishments added to the text, such as underlining, overlining, deleting lines, and so on.
When the property value is set to line-through, the definition passes through a line under the text. That is, the middle line.
The syntax is:
Text-decoration:line-through
Examples are as follows:
123 h2 {text-decoration:overline;} h3 {text-decoration:line-through;} h4 {text-decoration:underline;} This is heading 1This is heading 2This is heading 3
Output result:
Thank you for reading! This is the end of the article on "how to add an underline in css". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!