The general syntax for formatting the hypertext links style:
where styles is a list of any CSS attributes.
Example:
HTML tags | Result |
---|---|
<style type="text/css"> a {font-size:1.5em; color:red} a {text-decoration: none} </style> | test link test link |
Hypertext also has an additional attribute that normal text does not have: the condition of the hypertext link, which can be in one of the four following states:
Hypertext links states |
---|
a:visited {styles for previously visited targets} a:link {styles for targets that have never been visited} a:active {styles for links that are currently being clicked} a:hover {styles when the mouse cursor is hovering over the link} |
Examples:
Style | Result |
---|---|
a:visited {color:green} a:hover {color:red; text-transform:uppercase} |
try this link try this link |
Note that Netscape version 4.7 or earlier does not support the hover attribute.