I am searching for a code that would make a sentence or a word have one link color seperate from another word or sentence with antoher link color. Other words, I don't want to have all of my links visible in one color.
Thanks in advance,
NADB
I am searching for a code that would make a sentence or a word have one link color seperate from another word or sentence with antoher link color. Other words, I don't want to have all of my links visible in one color.
Thanks in advance,
NADB
Just change the color of text? (Yes, within a link.)
Well... depending on your use of css (style sheet... formatting) or just a body tag with default colors OR even nothing and using the default blue, you will have some predefined color for links... probably blue.
(Note: the blue is good because beginning web users might not understand another color to be a link if it's not clear.)
so... what you need to do is override that.
the a tags (<a href=....>clickme</a>) set the color automatically to the color that is the default, as above, probably blue.
All you need to do is set the color like any other text, but INSIDE that.
<a href="link.htm"><font color="#FF0000">red link</font></a>
Note that putting the font tag outside the link will not set the color. (<font color=...><a href=...>text is the default color still</a></font>)
That should do it!
Or, if you want the whole page:
<body text="#00FF00"> would give you green.
Or, you could use css:
In the head section of your page:
<html>
<head>
<style type="text/css">
a {color:#00FF00}
</style>
</head>
<body>
....
</body>
</html>
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Urgh, yuck.<a href="link.htm"><font color="#FF0000">red link</font></a>
Never use <font> elements.
Code:<style type="text/css"> .linkone a { color: red; } .linktwo a { color: lime; } .linkthree a { color: blue; } </style> <p><span class="linkone">This bit has <a href="google.com">red links</span>; <span class="linktwo">this has <a href="fsf.org">lime</a>;</span> and</p> <p class="linkthree">... this whole paragraph will have <a href="dynamicdrive.com">blue</a> links.</p>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
This guy just wants to change font color a single link.Never use <font> elements.
Surely css isn't needed. It's more to learn and more to mess with.
<font> is plenty valid and works just fine.
css is better if you're using the same setup more than once though.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
It may "work fine," but, like table layouts, it should never have been invented. It causes the unwary developer to mix content and presentation, causing code that lacks semantics and is difficult to read and maintain.<font> is plenty valid and works just fine.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
I'm still picking out font tags from a site I inherited about three years ago. They're just about all gone now, and it is so much easier to maintain. Now, if I could just get everything to validate.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
...tables are bad too?!like table layouts
So useful.
I get that CSS is nice. But only if you need to automate all of it. for a single link/line of text, it's so easy to use that.
I agree, though, for larger automated sites, css, and external css at that, is a must. But not for one tag.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
You're telling me seriously that you've ever designed a site that uses just one fomatting tag?But not for one tag.![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Sure. One occurance of a particular color, size, etc. for a font.
ONE time on the page there should be red text. Or big text. Whatever.
css can still be used, but doesn't help/save time for that particular element... actually wastes space.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Oh, you mean something totally out-of-sync with the rest of the site's theme?Sure. One occurance of a particular color, size, etc. for a font.![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks