
You couldn't shorten for example, fe0f00 because the red and green values are made up of different numbers ( fe and 0f respectively). You can do this because in the shorthand version, each digit represents two digits. For example 990000 can be shortened to 900. You can only do this if the six digit value is made up of three doubles (each double representing red, green, or blue). You can use the full hexadecimal value to change the text color: Source Codeĭepending on the full hexadecimal value, you can shorten it from six digits to three digits. You can specify text color by using the hexadecimal value. or you can change the text color of one word or even a single l etter. or you can change the text color of one word or even a single letter. You can change the text color of a whole sentence or paragraph.

You can use the color name to change the text color: Source Code In HTML, you can specify color using the color name, hexadecimal value (also known as the "hex value" or " hex color codes"), or the RGB value. You can change the text color using inline style sheets, embedded style sheets, or external style sheets.įor the purposes of these examples, we'll use inline style sheets, however, I encourage you to use external style sheets whereever possible.

In HTML, you can change the text color using Cascading Style Sheets (CSS).
