HTML में टेक्स्ट का रंग सेट करने के लिए color एट्रिब्यूट का उपयोग किया जाता था।
नोट: यह एट्रिब्यूट HTML5 में समर्थित नहीं है।
उदाहरण
color एट्रिब्यूट लागू करना सीखें:
<!DOCTYPE html>
<html>
<head>
<title>HTML Background Colors</title>
</head>
<body>
<table width="100%">
<tr>
<td>
<p><font color="blue">This is demo text.</font></p>
</td>
</tr>
</table>
</body>
</html>
आधुनिक तरीका: <font> टैग और color एट्रिब्यूट के बजाय CSS color प्रॉपर्टी का उपयोग करें:
<p style="color: blue;">This is demo text.</p>
<!-- या CSS फ़ाइल में -->
<style> p { color: blue; } </style>