Horje

Text color using Hex color codes

The most common way of coloring HTML text is by using hexadecimal color codes (Hex code for short). Simply add a style attribute to the text element you want to color – a paragraph in the example below – and use the color property with your Hex code.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>
  <p style="color:#FF0000";>Red paragraph text</p>
</body>
</html>

Output should be:

Text color using Hex color codes




Type:
html
Category:
Web Tutorial
Sub Category:
HTML HEX Colors
Uploaded by:
Admin