Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to set an inline style on an href link on "a:hover" in a html email?

Tags:

html

css

email

The question is to know if there is a way to build an HTML email with inline style (no CSS file, nor <style> 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 <style>, just <a href="http://www.dot.com style="....">link</a>

like image 641
Pierre Watelet Avatar asked May 26 '10 08:05

Pierre Watelet


People also ask

Can you do inline hover CSS?

Short answer: you can't. Long answer: you shouldn't. Give it a class name or an id and use stylesheets to apply the style. :hover is a pseudo-selector and, for CSS, only has meaning within the style sheet.

How do you hover inside style tag?

The :hover selector is used to select elements when you mouse over them. Tip: The :hover selector can be used on all elements, not only on links. Tip: Use the :link selector to style links to unvisited pages, the :visited selector to style links to visited pages, and the :active selector to style the active link.

How do I link an inline CSS in HTML?

CSS can be added to HTML documents in 3 ways: Inline - by using the style attribute inside HTML elements. Internal - by using a <style> element in the <head> section. External - by using a <link> element to link to an external CSS file.

How do I change the hover effect in HTML?

Answer: Use the CSS background-image property You can simply use the CSS background-image property in combination with the :hover pseudo-class to replace or change the image on mouseover.


1 Answers

No.

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

like image 164
Quentin Avatar answered Sep 24 '22 07:09

Quentin