Home  >  Article  >  Web Front-end  >  How to add underline under text

How to add underline under text

清浅
清浅Original
2019-04-03 17:03:2540965browse

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.

How to add underline under text

Methods to add underline under text in HTML pages

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 tutorialCSS 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:

How to add underline under text

##CSS style to implement underline style

The underline effect can be achieved through the

text-decoration:underline attribute in the CSS style

<body>
	<p>无下划线:PHP中文网</p>
	<p style="text-decoration: underline;">有下划线:PHP中文网</p>
</body>

Rendering:

How to add underline under text

How to add underline under text in word document

Method 1:

①We still create a text through word2013 A document with text, as shown in the figure.

How to add underline under text

② 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

How to add underline under text

③ Then click the underline icon under the font, and then we see that there is an underline under all the text

How to add underline under text

How to add underline under text

Method 2: Use shortcut keys to add underline

How to add underline under text

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 everyone

The 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn