Tumblr Tutorials


Changing the Color of Links - Solution

Remember, the code to create a link is

 <a href="[URL HERE]"/> 
Thus, you're looking in the CSS for the a, a:hover, and a:visited selectors. These are between lines 40 and 52 in the Tumblr html.

Code


     <style>
      body { 
        margin: 0; 
        padding: 20px;
        background-color: green; 
        font-family: arial;
        font-size: 0.75em;
        color: blue;
      }
      a {  //link as you see it on the page
          color: black;
              text-decoration: underline;
          }
        
        a:hover {   //link when the mouse is hovering over it
              color: white;
              background: red;
          }
            
          a:visited{    //link after it is visited
            color:blue;
          }
 <style>
          

You want to change the code in the bold section. You can use the color selector to refer to the text color, see here and here for more information on CSS font attributes.

Here's what your Tumblr code and page will look like before and after your modifications:

Before:

Link as is:

Link when it's hovered over:

After:

Link as is:

Link when it's hovered over: