CSS property for setting text color
You can apply a wide range of formatting properties to text with CSS. You can change text color, align its position, transform its direction, specify the line height to add more space, make it bold, italic, or underlined — you name it! In the example, to change the color of a heading, we apply the color
property using an internal stylesheet. As with the background-color
property, developers use HTML color names, HEX, RGB, or other color codes to specify a certain color.
In this example, we inserted styles with an external stylesheet method that separates CSS code from HTML, by linking the .css file inside the <link>
element.