CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer, see below for more

A: One way to change the colour of all links in a document is to use the DOM1 getElementsByTagName(tagName) method, which returns an array of all elements by the given name. The script below selects all anchor tags, then iterates through them to set their CSS color and background properties. It is important to change both properties together, to ensure there is a good contrast between the two colours.

… full answer hidden

Click for full answers

Premium members click below for full answer
How can I change the default link colour?

Un-social media

We love social media, but we do not expect you to create yet another public outpost on the Web.

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager