Example of styling a hyperlink
A:link The hyperlink is pre-state.
a:visited Post-click status of Hyperlinks
a:hover when hovering over a hyperlink
a:active When you click the hyperlink
When you define these states, there is a sequence L v H a
Code area:
1 <!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">2 <HTMLxmlns= "http://www.w3.org/1999/xhtml">3 <Head>4 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />5 <title>Untitled Document</title>6 <styletype= "Text/css">7 A:link8 {9 Color:#000;Ten text-decoration:None;} One a:visited A { - Color:#000; - text-decoration:None;} the a:hover - { - Color:#F00; - text-decoration:Underline;} + a:active - { + Color:#F90; A text-decoration:Underline;} at </style> - <Linkhref= "Untitled-1.css"rel= "stylesheet"type= "Text/css" /> - </Head> - - <Body> - <ahref= "http://www.baidu.com/">Baidu a bit</a> in </Body> - </HTML>
View Code
Run the display: the mouse arrow is not placed in the "Baidu a bit", its display black-when put on, its display red-click on the "Baidu" link, its display orange-click, its display black
HTML Basics (iv)--styling examples for setting up hyperlinks