<a> tag defines a hyperlink that is used to link from one page to another. The most important attribute is the href attribute, which indicates the target of the link,
1. Click the hyperlink to display the window:
Target property: Used to specify where to open the link:
(1) target= "_blank": the browser always loads the target document in a newly opened, unnamed window. (2) target= "_self": Open on Current page (3) target= "_parent": Open in Parent space (4) target= "_top": Open in Top page (3) (4) Yes < iframe> mate <a> Use effect of tags
2. Display the following lines:
Text-decoration is a CSS property, but it is often used in <a> tags to display or remove the underline of hyperlinks. The property values are as follows:
None: Default. Defines the standard text. The parameter indicates that the hyperlink text does not appear underlined;
Underline: Defines a line below the text. The argument indicates that the text of the hyperlink is underlined;
Overline: Defines a line on the text.
Line-through: Defines a line that passes through the text.
Blink: Defines the blinking text.
Inherit: Specifies that the value of the Text-decoration property should be inherited from the parent element.
<style= "Text-decoration:none;" >
3. As a hyperlink four states:
First state: Link (default) normal state (the initial state, without the mouse to touch) The second state: hover Mouse on the time (but do not click) The third State: when the active click (the mouse has not released) the fourth state: visited click After ()
<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "> <HTMLxmlns= "http://www.w3.org/1999/xhtml"Lang= "ZH-CN"> <Head> <title>CSS pseudo-Class</title> <Metahttp-equiv= "Content-type"content= "text/html; charset= UTF8" /> <style>A:link{Color:Black; }a:visited{Color:Blue; }a:hover{Color:Orange; }a:active{Color:Pink; } </style> </Head> <Body> <ahref= "Http://www.baidu.com">Jason</a> </Body> </HTML> Note When using:
- Active generally does not have to write
- Four state controls must be written in LVHA order.
- Link can omit
4, sometimes we will encounter this form:
a:focus{ color:lime; background:red;}
Where : Focus is a CSS pseudo-class selector for selecting the element that gets focus. Common forms are as follows:
a:focus{ color:lime; background:red;} input:focus{ Color:yellow; Background:blue;}
The a tag in HTML