473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How can I use an inline style for an Anchor Tag?

I code HTML email delivery messages. The content must always include inline HTML style elements. Is there a way to code for the anchor tags <a> for the pseudo classes visited, hover, link and active using inline styles?

Let's say I always want anchor tags to be underlined.

would this work?
Expand|Select|Wrap|Line Numbers
  1. <a href="http://bytes.com/xyx.com" style="text-decoration:underline;">some text</a>
Dec 11 '12 #1
1 11300
Atli
5,058 Expert 4TB
The pseudo classes inherit from the normal style of the link, so unless the pseudo classes specifically change the text-decoration, the underline should cover them all.

And no, you can't define the pseudo class inline. They are part of the CSS selector syntax, which won't work in inline style attributes. The closest thing you will find without using a CSS block is the Javascript mouse events, which are hardly a great solution.
Dec 11 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: geotso | last post by:
Hi I'm trying to hide from printing a specific element of a page but I don't know how (and if) I could. Here is an example of what I'm trying to do: <h1>Hidden in print mode</h1> <p>Also...
1
by: paul haine | last post by:
Hi, Let's say I have a paragraph that's using inline styles, like this: <p style="float: left; width: 50%;"> blah blah blah </p> Does anybody know how (or even if it's possible) to use...
4
by: Schraalhans Keukenmeester | last post by:
I recently discovered the value of tidy for my html adventures. Nice little app. Only one thing is becoming a bit of a drag. If I use tidy to clean up my code, it inserts the following in every...
3
by: MIS Director | last post by:
Is there any tool out there that will analyze an entire website and produce a report of inline style usages by both total count and detail occurrances. This would produce a list of possible...
3
by: pankajit09 | last post by:
Hello, The HTML code is like this --> <a href="#searchanchor">Go to Top</a> I want to position the "Go to Top" in the center . One way is like this -->
0
by: Evan M. | last post by:
Hello, What's the simplest way to remove the inline style's that get added to a Menu control's items when it is rendered? More specifically, I want to remove the "cursor:text" element that's...
0
by: Mike | last post by:
Hi, I have a strange problem: I wrote a reverse proxy that redirects pages to a local or remote server. Everything seems to work fine, but I have a strange problem with inline styles. In my...
4
by: yawnmoth | last post by:
Say I wanted to make a link change colors when someone was hovering over it. Ordinarily, I could do that by doing something like... <style> a { color: whatever; } a:hover { color:whatever;
1
by: rbaulbin | last post by:
Hello - Does anyone know if of a utility that can traverse an HTML file for all inline CSS style tag occurrences and generate an external style sheet from them, and then create (intelligent?)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.