Code Snippets:<\/strong><\/p>\n To add background color, you can use the bgcolor attribute to display < body bgcolor=’ ‘>. It is compatible with all browsers except in HTML 5.<\/p>\n Code:<\/strong><\/p>\n Applying color to the HTML text is quite easy; we can add\/ change the color of the text by applying three ways, namely Hex color, HSL values and color names. The following are the three different techniques to apply color to the corresponding web pages.<\/p>\n This is quite simple by using English color names when the application is straight forward these color names are used. Specifying color names are direct methods, and W3C has announced 16 basic colors (Black, yellow, red, Maroon, Grey, Lime, Green, Olive, Silver, Aqua, Blue, Navy, White, Purple, Fuchsia, Teal)<\/p>\n\n\n Hue saturation and lightness color values. Hue is defined in 0 to 360-degree, saturation and lightness from 0 to 100 %.<\/p>\n To get a precise result six-digit hexadecimal number is applied. To elaborate, the first two digits denote Red, the next two denote Green, the other two denote Blue value and preceded by ‘#’.<\/p>\n The following example explains the different ways of applying colors to the documents.<\/p>\n Code:<\/strong><\/p>\n<\/p>\n
Color Name<\/h3>\n
Hexadecimal<\/h3>\n
RGB Value<\/h3><\/pre>\n
How to Apply Color to Text in HTML?<\/h3>\n
1. Color Names<\/h4>\n
2. HSL<\/h4>\n
3. Hex Color<\/h4>\n
\n