CSS - Link

CSS -  Link

  • In CSS, Links can be styled in many ways of CSS properties like color, font-family, background-color, font-size and text-alignment.

Sample Code :

<!DOCTYPE html>

        /* unvisited link */
            color: red;
Welcome to Wikitechy website

Code Explanation :

    Here this a: link Defines the style for normal unvisited links.

    Over here the href is the attribute specifying the destination address of the URL.( Here, we are directing  to www.wikitechy.com)  

    Here the target="_blank" specifies to Open up the  new tab.


    When we click the link it will change from blue to red which is displayed in the browser window as shown below.


     On clicking this link, it will redirect us to the www.wikitechy.com website as shown below.