Home > Article > Web Front-end > How to add underline under text
How to underline a word: First use word software to open a document with text; then select the text that needs to be underlined; finally click the [u] icon in the top menu bar or use the shortcut key [ ctrl u] to add an underline.
The methods to underline text are: use directly The tag in the html tag can achieve the underline effect, and you can also use the underline in the text-decoration attribute in the CSS style to achieve the effect
[Recommended course: HTML tutorial、CSS tutorial】
Use html underline tag
Add to the text that needs to be underlined in the html tag to achieve the underline style
Example:
<body> <p>无下划线:PHP中文网</p> <p>有下划线:<u>PHP中文网</u></p> </body>
Rendering:
##CSS style to implement underline style
The underline effect can be achieved through thetext-decoration:underline attribute in the CSS style
<body> <p>无下划线:PHP中文网</p> <p style="text-decoration: underline;">有下划线:PHP中文网</p> </body>
Rendering:
Method 1:
①We still create a text through word2013 A document with text, as shown in the figure. ② Then select the text content we intend to add underline, and then click "Font" - "Underline" in the format bar. Let's take the entire document as an example, as shown below. We select all the text content ③ Then click the underline icon under the font, and then we see that there is an underline under all the text
Method 2: Use shortcut keys to add underline
This method It is only suitable for adding in the blank space of the document. Position the cursor at the position where you want to add an underline, and then press and hold the "SHIFT" and "-" keys at the same time to underline. We can press it as long as we need. We are currently testing it. It can be applied to any input method...Summary: The above is the entire content of this article, I hope it will be helpful to everyoneThe above is the detailed content of How to add underline under text. For more information, please follow other related articles on the PHP Chinese website!