Home  >  Article  >  Web Front-end  >  How to remove font underline in html? How to remove font underline

How to remove font underline in html? How to remove font underline

云罗郡主
云罗郡主Original
2018-11-20 14:11:3429303browse

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="http://www.php.cn/">php中文网</a>! 
</body> 
</html>

The display effect is as follows:

How to remove font underline in html? How to remove font underline

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!

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