tags:

views:

31

answers:

3

The question is to know if there is a way to build an HTML email with inline style (no CSS file, nor tags) with the href links that react with the mouse passing over them : just to be able to change the color font.

So, no JS, no script, no , just link

A: 

The normal HTML way for inline styling is:

<a href="url" style="color:#cfe7fe";">Click me!</a>

But I am not sure how reliable that is in email templates.

You could always try: (Although deprecated)

<font color="blue"> <a href="url">Click me!</a> </font>

Hope it helps.

Edit: For inline hover try using:

onmouseover="this.style.color='blue';" 
onmouseout="this.style.color='black';"

But again I am not sure on email support for this.

Kyle Sevenoaks
I meant a color change when the mouse flies over the link.
Pierre W
Updated my answer.
Kyle Sevenoaks
+1  A: 

No.

You can't apply pesudo-classes (or anything else that appears in a selector) via the style attribute.

David Dorward
+1  A: 

Some E-Mail clients support style tags, and thus the defining of pseudo-selectors. According to this list:

Guide to CSS support in E-Mail clients

:hover is supported by a good number of clients.

You should be able to slip a <style> tag into the body if necessary. That's not valid, but rich E-Mails are such a minefield that that is going to hardly matter.

:hover is your only chance I think. It's not possible to define pseudo-selectors inline, and JavaScript is out because it's going to be blocked by most (or all?) clients.

Pekka