Links can be styled in different ways.
Links can be styled with any CSS property (e.g. color, font-family, background, etc.).
Special for links are that they can be styled differently depending on what state they are in.
The four links states are:
When setting the style for several link states, there are some order rules:
In the example above the link changes color depending on what state it is in.
Lets go through some of the other common ways to style links:
The text-decoration property is mostly used to remove underlines from links:
The background-color property specifies the background color for links:
Add different
styles to hyperlinks
This example demonstrates how to add other styles to hyperlinks.
Advanced -
Create link boxes
This example demonstrates a more advanced example where we combine several CSS
properties to display links as boxes.
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.