HTML5 University

Color

It is possible to add color to webpage text and other elements alike.


Text Color

The following adds the color red to text:



<p style="color:red;">This is red text</p>

which would result in:

This is red text


Background Color

The following adds the color orange to the text background:



<p style="background-color:orange;">This text has an orange background</p>

which would result in:

This text has an orange background