Page 128 - iPro_trackGPT_V5_Class7
P. 128

You can also use various CSS properties to change the color of hyperlinks in different states.
                  There are mainly four states of hyperlinks, which are link, visited link, hover, and active. 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 for a link that the user has visited.
                     a:hover: It is used to set the style for a link when the mouse pointer moves over it.
                     a:active: It is used to set the style for 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;
                                                                                                          Output
                    FONT-WEIGHT: BOLD;
                  }

                  </STYLE>
                  </HEAD>

                  <BODY>
                  <A HREF="Home.html">Link</A>

                  </BODY>
                  </HTML>
                  Links as Buttons

                  CSS properties allows us to display links as buttons. HTML codes that display links as buttons:

                  <!DOCTYPE HTML>
                  <HTML>


                   126    TrackGPT iPRO (V5.0)-VII
   123   124   125   126   127   128   129   130   131   132   133