Facebook-f X-twitter
EncodeByte
Need Help!
  • How-To
    How-ToShow More
    How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect
    By
    Franchbabu
    How to Fix the “Windows Cannot Be Installed to This Disk” Error
    By
    EncodeMore
    How to Check Your Laptop’s Battery Health: A Step-by-Step Guide
    By
    EncodeMore
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    How to Activate Windows Legally and For Free (100% Working)
    By
    EncodeMore
  • Web Development & Coding
    Web Development & CodingShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    Top In-Demand Freelancer Niches for 2025 – Fast Growth Ahead!
    By
    EncodeMore
    🚀 10 Reasons Why Hostinger Is the Best Web Hosting Platform for Speed, Security & Affordability
    By
    Franchbabu
    How to Add “Made with ❤️” to Your WordPress Footer (No Plugin Needed)
    By
    EncodeMore
    WordPress Redirect After Login: How to Set It Up
    By
    EncodeMore
  • Code Snippets & Scripts
    Code Snippets & ScriptsShow More
    How to Hide a Class in WordPress (Easy CSS & Admin Tips)
    By
    EncodeMore
  • Website Design & UX
    Website Design & UXShow More
    10 Web Design Mistakes That Are Killing Your User Experience (and How to Fix Them)
    By
    Franchbabu
  • Make Money Online
    Make Money OnlineShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    Top In-Demand Freelancer Niches for 2025 – Fast Growth Ahead!
    By
    EncodeMore
    Website related skillsets that you shoud have
    By
    EncodeMore
    Top Sites Like Fiverr: The Best Fiverr Alternatives for Freelancers
    By
    Franchbabu
    Best Telegram Channels For Free Paid Courses
    By
    Franchbabu
  • 🤩 Trending:
  • How-To Guides
  • WordPress & Website Development
  • Web Development & Coding
  • Windows & Software Fixes
  • Tech Tips, Tools & Tutorials
  • Computer Tips & Tricks
Font ResizerAa
EncodeByteEncodeByte
Search
  • How-To
  • Web Development & Coding
  • Code Snippets & Scripts
  • Website Design & UX
  • Make Money Online
Follow US
Made by ThemeRuby using the Foxiz theme. Powered by WordPress
Front-End Development

HTML Link Color

Last updated: August 1, 2025 9:35 am
By
Franchbabu
Share

Coloring HTML links is a terrific method to distinguish them from plain text or to add some flair to your website. Here’s how to color HTML links with Hex color codes, RGB and HSL values, and HTML color names.

Contents
Using Hex color codes, link colorUsing HTML color names, link colorUsing RGB color values, link colorUsing HSL color values, link color

Using Hex color codes, link color

Using a Hex color code will be our first step, as this is likely the most popular way to add color to links. Place a style attribute with the color property set to your Hex color code (in our example, #FF0000) after the href attribute in your HTML anchor tag (<a>).

<body>
  <a href="http://example.com/" style="color:##FF0000;">Red Link</a>
</body>

Using HTML color names, link color

Similar in usage, HTML color names are frequently easier to read than their Hex code equivalents. Your code will now be quite evident if you swap out the Hex color code with the HTML color name from the previous example.

<body>
  <a href="http://example.com/" style="color:red;">Red Link</a>
</body>

Using HTML color names, link color

Similar in usage, HTML color names are frequently easier to read than their Hex code equivalents. Your code will now be quite evident if you swap out the Hex color code with the HTML color name from the previous example.

Using RGB color values, link color

Using RGB values is a third style method for your website link text. When values are wrapped with rgb(), they can be utilized inside a webpage in the same way as color names or Hex codes.

<body>
  <a href="http://example.com/" style="color:rgb(255,0,0);">Red Link</a>
</body>

One other benefit of using RGB values is that it allows you to alter the color’s opacity. To specify a fourth number between 0 and 1, substitute rgba() for rgb(). (0 represents completely transparent, and 1 represents absolutely opaque).

<body>
  <a href="http://example.com/" style="color:rgba(255,0,0,0.5);">Red Link</a>
</body>

Using HSL color values, link color

The majority of contemporary browsers (IE9+) offer HSL, which stands for hue, saturation, and lightness, as an additional set of color values. Similar to RGB, you can use the HSL values on your webpage by wrapping them inside hsl(), as shown below.

<body>
  <a href="http://example.com/" style="color:hsl(0,100%,50%);">Red Link</a>
</body>

The format for HSL is the same as RGB; instead of using hsl(), use hsla(), and add a fourth value for opacity between 0 and 1. HSL also allows an alpha channel.

<body>
  <a href="http://example.com/" style="color:hsla(0,100%,50%,0.5);">Red Link</a>
</body>
Share This Article
Facebook Whatsapp Whatsapp LinkedIn
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Categories

Themes & Customization

1 Article

Troubleshooting & Fixes

1 Article

WordPress Tips & Tricks

6 Articles

WordPress Tutorials

5 Articles

Must Read

WordPress & Website DevelopmentHow-To Guides

How to Create a Private/Password Protected Post or Page in WordPress

How-To GuidesSEO Tips & StrategiesWordPress Tutorials

How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect

Computer Tips & TricksHow-To Guides

How to Repair a Bad Hard Disk (Hard Disk Low Level Format)

How-To GuidesTech Tips, Tools & Tutorials

How to Remove URLs From Google Search

  • I need help with …

Starting a Blog

WordPress SEO

WordPress Performance

WordPress Errors

WordPress Security

Got A Question?

Need Expert Help?
Let CodeXcool power up your website with
custom WordPress design, speed optimization, and SEO!
🚀 Get Started

You Might also Like

What is the difference between Frontend and Backend Development?

WordPress & Website DevelopmentFront-End Development

Elementor Water Drop Card Hover Effect – Beautiful CSS Hover UI You Can Use Today!

Front-End DevelopmentWordPress & Website Development

Elementor COOL Button Hover Effect | Gradient Button Effect

WordPress & Website DevelopmentFront-End Development

How to Create Animated Borders in Elementor (No Extra Plugins Needed!)

EncodeByte

© 2025 EncodeByte – Discover expert tech tutorials, coding guides, troubleshooting solutions, and free tools. Simplify technology, build smarter, and learn faster with us.

About Us / Privacy Policy / Contact Us

Latest News

  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon

Services

  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon

Looking for custom web development or maintenance?

Check out our parent team at [CodeXcool.com] 🚀
— Let's build together!
Request a Quote
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?