CSS Hyperlink

A hyperlink is an element in a hypertext markup language (HTML) document that links to either another portion of the document or to a different document altogether.

Browsers highlight the content of this element as blue and underlined and permit users to follow the link with a click.

Hyperlink Properties

The following four style sheet entities are used to control hyperlinks in CSS.

Values Description
a:link It is used to specify the attributes of a hyperlink
a:visited It is used to specify the attributes of a hyperlinks that have been visited
a:active It is used to specify the attributes of an active hyperlink
a:hover It is used to specify the attributes of the hyperlinks on which the user is moving the mouse.

Hyperlink Example

Below examples will demonstrate the basic architecture of Hyperlink

Basic Syntax:
a:hover{ color: magenta; text-decoration: none;}


Example:
<!doctype html>  
<html>

    <head>
        <title>...</title>
        <style type="text/css"> h1:hover{ color: magenta; text-decoration: none;} </style>
    </head>
  
    <body>
       <h1 style="color: #00DDFF;">PHPDocs</h1>
    </body>

</html>