Search code examples
csstemplatesblogsblogger

Hyperlink text change without effect of other links like title text, popular post and etc


I want to change the text color of a hyperlink in a single post because it is similar to other text and i am using blogger with a customized theme. The issue is when I change my link text color with CSS

a { color: yellow;}

its change my whole website links color so please help me to resolve this problem. Thanks in advance My website link


Solution

  • You could use a id or class in CSS.

    An example:

    .pink-link {
      color: pink;
    }
    
    #red-link {
      color: red;
    }
    <a href="">First Link</a>
    <br/><br/>
    <a href="" class="pink-link">Coloured Link (class)</a>
    <br/><br/>
    <a href="" id="red-link">Coloured Link (id)</a>