Our logo Kybercode
Home
Archive
Articles
Shared
Bits
About
Contact
Home
Archive Articles Shared Bits

About
Contact
RSS
Topics Authors Privacy Policy
Search
CSS Web Dev
Cooper Gidge on Mar 22, 2025.

Links with a different color underline are cool. I couldn't tell you why I like them. I just do.

Here is how I normally style my links for projects:

<p class="style-1">
    Here is a paragraph with <a>some great hanging underlines</a>. Here is <a>another link</a> for your linking pleasure.
</p>
<p class="style-2">
    Here is yet another paragraph with <a>some great links without hanging underlines</a>. Here is <a>another link</a> for your linking pleasure.
</p>
/* The link styles */
.style-1 a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: #FF0000;
    text-underline-position: under;
}
.style-2 a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: #FF0000;
}
/* Extra styles for the demo */
p {
    font-family: sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
}
a {
    cursor: pointer;
}
a:hover {
    color: #FF0000;
}
false
Result

Though whether to use text-underline-position: under; is always up for debate.

Comments

There are no comments yet. Be the first to post one!

Leave a Comment

Thank you for posting a comment! It will be reviewed and if it passes our checks, it'll be published.

Replying to

This will be publicly displayed with your comment.

Contribute to the conversation! Markdown supported.

Keep Reading

Previous Safari is a Difficult Browser to Work With

By Cooper Gidge on Mar 31, 2025.

Next I'm trying to avoid the word "just."

By Cooper Gidge on Mar 14, 2025.

Browse More
The AI Bubble Burst, Just Not In The Way I Was Expecting

By Cooper Gidge on Jan 28, 2025.

Why I Don't Use JavaScript Frameworks

By Cooper Gidge on Jan 19, 2025.

How To Automate Open Graph Images With Eleventy

By Cooper Gidge on Dec 5, 2024.

Featured
Logo Kybercode

All things about software and website development.

RSS
Resources
Home Archive Articles Shared Bits Topics
About
About Contact
Copyright © 2025 Kybercode
Privacy Policy
Home
Archive
Articles
Shared
Bits