Modify hyperlink color underline through CSS style

HTML file:

<style type="text/css">
a:link {color:#000000;} /* link not visited*/
a:visited {color:#00FF00;} /* Visited link*/
a:hover {color:#FF00FF;} /* Mouse over the link*/
a:active {color:#0000FF;} /* when the mouse is clicked*/
</style>

CSS file:

a:link{color:#000000;} /* link not visited*/
a:visited {color:#00FF00;} /* Visited link*/
a:hover {color:#FF00FF;} /* Mouse over the link*/
a:active {color:#0000FF;} /* when the mouse is clicked*/

Removing the underline can change the text-decoration attribute of the a tag to none!

text-decoration:none;

Example:

<html>  
  
<head>  
  
<style type="text/css">
a:link {color:#000000;} /* link not visited*/
a:visited {color:#00FF00;} /* Visited link*/
a:hover {color:#FF00FF;} /* Mouse over the link*/
a:active {color:#0000FF;} /* when the mouse is clicked*/
</style>
<title>test css</title>  
  
</head>  
  
<body>  
  
<a>this a label</a>
  
</body>  
  
</html>  

by loading CSS files

<html>  
  
<head>  
  
<link rel="stylesheet" href="wcss.css" type="text/css" />  
  
<title>test css</title>  
  
</head>  
  
<body>
<a>this a label</a>  
</body>
</html>

very simple!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325784366&siteId=291194637