caiocpricci2
caiocpricci2

Reputation: 7788

Can i change the text color of a tag without css?

I'm writing a template for an e-mail, and I can't use css. I need to change the color of the links, by default they get blue and underline. I want to keep the underline but change the color to black. Is that even possible without css?

My exact line is:

<tr><td><a href="#"> Link 3 </a></td></tr>

EDIT

I found this answer but it adds an attribute to the body section. That's also something I can't have. Any other solutions?

<body link="XXX" alink="YYY" vlink="ZZZ">

EDIT

This link is great if like me you have to write html for an email. I'm copying it here for posterity. Thanks @Andy.

Upvotes: 6

Views: 57048

Answers (3)

Advik
Advik

Reputation: 41

The only way to do this in PURE HTML is to use link and vlink attributes.

<body link='black' vlink='black'>
        <a href='#'>Click Me</a>
</body>

Here, link is a unvisited hyperlink and vlink is a visited hyperlink.

To change color on hover use alink (active link) attribute of the body tag :

<body link='black' vlink='black' alink='green'>
    <a href='#'>Click Me</a>
</body>

In the above code the color of the link changes to green whenever you hover the link.

HOPE This Helped You!

Upvotes: 3

jangxx
jangxx

Reputation: 1019

What you could do is use the old and deprecated font tag. So it would be:

<tr><td><a href="#"><font color="black"> Link 3 </font></a></td></tr>

Upvotes: 17

pkachhia
pkachhia

Reputation: 1932

Use below code:

<tr><td><a href="#" style="color:black;"> Link 3 </a></td></tr>

it is an inline CSS and as per your requirement you can use it into your email.

Upvotes: 9

Related Questions