Change link color in CSS
Change link color in CSS
i have many link in my content
how can found and change color all link in div tag when show content to user ?
like that :
pleas visit my own site's : telegram.org , www.google.com , www.wikipedia.com , ...
and send mail to : mymail@gmail.com
2 Answers
2
if you want to change the color of links in all pages or app then do this in css..
a
color: red;/*color name, color code or rbg*/
if you want to change the specific link color ....
a.highlight
color: red;
if you want to change the all links color in specific div .....
.content a
color:red;
If you want to style a link you should use css to do this:
.new_link
background-color: black;
color: white;
<div>
<a class="new_link" href="#link2" id="link1">Go to next link</a>
<br>
<a class="new_link" href="#link1" id="link2">Go to link1</a>
Some other text that will not be styled
</div>
Here i added a class in the link elements (<a>
element).
<a>
By adding a class they get the css styling.
The styling i choose here where:
Background-color
color (text-color)
You can make create css rules (like above) for all <a>
elements on your page.
An other possibility is to add a class to the <div>
element and select all links inside this div. All of this is possible with css.
<a>
<div>
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.