[html] What's default HTML/CSS link color?

I need its code representation, like #FFFFFF.

This question is related to html css

The answer is


In CSS you can use the color string currentColor inside a link to eg make the border the same color as your default link color:

.example {
    border: 1px solid currentColor;
}

I am used to Chrome's color so the blue color in Chrome for link is #007bff


Entirely depends on the website you are visiting, and in absence of an overwrite on the website, on the browser. There is no standard for that.


The best way to get a browser's default styling on something is to not style the element at all in the first place.


For me, on Chrome (updated June 2018) the color for an unvisited link is #2779F6. You can always get this by zooming in really close, taking a screenshot, and visiting a website like html-color-codes.info that will convert a screenshot to a color code.


According to the official default HTML stylesheet, there is no defined default link color. However, you can find out the default your browser uses by either taking a screenshot and using the pipette tool in any decent graphic editor or using the developer tools of your browser (select an a element, look for computed values>color).


  • standard link - #0000FF //blue
  • visited link - #800080 //purple
  • active link - #FF0000 //red

that was a standard but heavily differs per browser now. (since Nielsen gave it up ;)


Default html color code like this:

Red      #FF0000  rgb(255, 0, 0)
Maroon   #800000  rgb(128, 0, 0)
Yellow   #FFFF00  rgb(255, 255, 0)
Olive    #808000  rgb(128, 128, 0)
Blue     #0000FF  rgb(0, 0, 255)
Navy     #000080  rgb(0, 0, 128)
Fuchsia  #FF00FF  rgb(255, 0, 255)
Purple   #800080  rgb(128, 0, 128)

The default colours in Gecko, assuming the user hasn't changed their preferences, are:

  • standard link: #0000EE (blue)
  • visited link: #551A8B (purple)
  • active link: #EE0000 (red)

Source

Gecko also provides names for the user's colours; they are -moz-hyperlinktext -moz-visitedhyperlinktext and -moz-activehyperlinktext and they also provide -moz-nativehyperlinktext which is the system link colour.