HTML Basics (iv)--styling examples for setting up hyperlinks

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.