How to Change the Color of a Link in CSS
Start out by placing your regular HTML codes, then add the link you wish to color., With CSS you have to write in the HEAD section of your site., You shouldn't end the code yet, however some website designers do end the code before it's finished and...
Step-by-Step Guide
-
Step 1: Start out by placing your regular HTML codes
For the sake of doing this without any errors, we'll use images from Adobe DreamWeaver.
And we'll use google for the link. -
Step 2: then add the link you wish to color.
So you should type <style type="text/css"> where it says <head>. , Links consist of 4 elements.
Link, hover, visited, and active.
Link is the primary color of your link, this is what color it will normally display.
Hover is a variable to make it change color, and stand out when your mouse goes over the link.
Visited is an after click variable, it will display this color anytime after you've clicked the link.
Active is the click on color, it will become this color the moment your mouse clicks and release it to activate the link. , You want to make 4 elements after it, with an enter separating them. a:link , a:hover , a:visited , a:active.
It's recommended you don't capitalize any of them. ,, Alternatively you can simply type {color:;} the the selection of colors is much more limited. ,, To do this in a CSS stylesheet, simply put /* */ . -
Step 3: With CSS you have to write in the HEAD section of your site.
-
Step 4: You shouldn't end the code yet
-
Step 5: however some website designers do end the code before it's finished and then work on the closed tag.
-
Step 6: Add onto the CSS stylesheet.
-
Step 7: Type the following after all of them {color:#;}
-
Step 8: You're going to need a basic understanding of hex code to get specific with your colors.
-
Step 9: When you have all of this done
-
Step 10: you should add </style> to close the tag.
-
Step 11: It is recommended
-
Step 12: however not required
-
Step 13: that you add comments so that it will be easier to edit your codes later on.
Detailed Guide
For the sake of doing this without any errors, we'll use images from Adobe DreamWeaver.
And we'll use google for the link.
So you should type <style type="text/css"> where it says <head>. , Links consist of 4 elements.
Link, hover, visited, and active.
Link is the primary color of your link, this is what color it will normally display.
Hover is a variable to make it change color, and stand out when your mouse goes over the link.
Visited is an after click variable, it will display this color anytime after you've clicked the link.
Active is the click on color, it will become this color the moment your mouse clicks and release it to activate the link. , You want to make 4 elements after it, with an enter separating them. a:link , a:hover , a:visited , a:active.
It's recommended you don't capitalize any of them. ,, Alternatively you can simply type {color:;} the the selection of colors is much more limited. ,, To do this in a CSS stylesheet, simply put /* */ .
About the Author
Joshua Vasquez
Brings years of experience writing about lifestyle and related subjects.
Rate This Guide
How helpful was this guide? Click to rate: