470,594 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

How to make all hyperlinks on a page go e.g. italic?

Hello!

I'm a complete Javascript newbie and my question is surely very naive, but
believe me, I've spent this whole day searching thru the net and didn't find
any solution to my little problem.

So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page. I know how to get one like this, but I mean all of
them by default, I mean I downloaded a Javascript script from the net, a
simple search engine, and I want it to have all hyperlinks it returns in a
certain style. I know the command to set all of them to a color
(document.linkColor=), but I couldn't find it about their style, though I
have been searching for the solution on the net for the whole day like a
jerk. Please help me!

Greetings,
Aasp
Jul 23 '05 #1
3 1365
On Sat, 22 May 2004 20:44:02 +0200, Aasp wrote:
So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page.


<style type='text/css'>
a { font-style: italic; }
</style>

(..in the <head>)

HTH

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
In article <c8**********@atlantis.news.tpi.pl>, "Aasp" <aa**@op.pl>
wrote:
So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page. I know how to get one like this, but I mean all of
them by default, I mean I downloaded a Javascript script from the net, a
simple search engine, and I want it to have all hyperlinks it returns in a
certain style. I know the command to set all of them to a color
(document.linkColor=), but I couldn't find it about their style, though I
have been searching for the solution on the net for the whole day like a
jerk. Please help me!


You need to exercise some caution here.

Remember your user. You user has to navigate your page. It will be
easier on your user, if your page is consistent with other pages on the
web. A user may expect links to be underlined. This is dependent on the
layout of your page. I'd assume a user can figure out a bolded or italic
text that is underlined is a link. Removing the underline may make it
harder for your user to figure out what is the link on your page.

The layout of the page may make it obvious what is a link. Such as a
list on the left hand side of the page. I'd try to mimic the style of
Ebay, Amazon, and Yahoo.

Robert
Jul 23 '05 #3
"Aasp" <aa**@op.pl> wrote in message news:<c8**********@atlantis.news.tpi.pl>...
Hello!

I'm a complete Javascript newbie and my question is surely very naive, but
believe me, I've spent this whole day searching thru the net and didn't find
any solution to my little problem.

So it goes: I don't know how to set the style (bold, italic, underlined) to
all hyperlinks on a page. I know how to get one like this, but I mean all of
them by default, I mean I downloaded a Javascript script from the net, a
simple search engine, and I want it to have all hyperlinks it returns in a
certain style. I know the command to set all of them to a color
(document.linkColor=), but I couldn't find it about their style, though I
have been searching for the solution on the net for the whole day like a
jerk. Please help me!


Put this CSS in the <head> section of your HTML document:
<STYLE>
A {
font-style:italic;
text-decoration:underline;
}
</STYLE>
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Imaya Kumar | last post: by
6 posts views Thread by Patrick Olurotimi Ige | last post: by
2 posts views Thread by =?Utf-8?B?S3VtYXIuQS5QLlA=?= | last post: by
1 post views Thread by =?Utf-8?B?Um9nZXI=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.