Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 72 - 2620_Birla Open Mind C-8
P. 72

    When we click on any link, we will reach to linked section as shown:

                  You can also use the different CSS properties to change the colour of hyperlinks in different states.
                  There are mainly four states of hyperlinks which are link, visited link, hover and active. By using the
                  following CSS properties, you can change the look and style of hyperlinks in different states:

                      a:link: It is used to set the style for an unvisited link.

                      a:visited: It is used to set the style on a link which the user has visited.

                      a:hover: It is used to set the style on a link when the user hovers mouse pointer over it.

                      a:active: It is used to set the style on a link when it is clicked.

                  Let us create a web page to use all these properties.

                  <!DOCTYPE html>

                  <HTML>
                  <HEAD>

                  <STYLE>
                  A:LINK, A:VISITED {
                    BACKGROUND-COLOR: PINK;

                    COLOR: RED;

                    PADDING: 20PX 22PX;
                    TEXT-ALIGN: CENTER;
                    TEXT-DECORATION: UNDERLINE;

                    DISPLAY: INLINE-BLOCK;
                  }

                  A:HOVER, A:ACTIVE {
                    BACKGROUND-COLOR: GREEN;

                    COLOR: ORANGE;
                    FONT-SIZE: 20PX;

                      70  Premium Edition-VIII

| 67 68 69 70 71 72 73 74 75 76 77 |