How to remove font underline? What are some ways to remove underline from fonts? For many novices who have just started, they are not sure how to remove font underline in HTML? Let’s summarize it below.
1: Remove font underline from hyperlink
Many front-end editors, when adding a link to text, an underline will appear on the hyperlink, and the system will automatically Add an underline style. Many people want to remove the underline and don't know how to deal with it. In fact, we can use css style to remove the underline.
css style code:
a{text-decoration:none}
The code is as follows:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>取消去掉下划线</title> <style> a{ text-decoration:none} </style> </head> <body> 欢迎来到<a href="//m.sbmmt.com/">php中文网</a>! </body> </html>
The display effect is as follows:
The above css style is Remove the underline from all hyperlinks on the web page. If we want to remove a certain underline, we set the style for one of the links.
Two: Remove the font underline
In HTML, use the u tag to underline the font. If you want to remove the underline, you must use css style, code As follows:
u{text-decoration:none}
The above is how to remove font underline from html? A complete introduction to the method of removing font underlines. If you want to know more about CSS3 tutorial, please pay attention to the php Chinese website.
The above is the detailed content of How to remove font underline in html? How to remove font underline. For more information, please follow other related articles on the PHP Chinese website!