Colors are used in websites to make it feelable and good looking. We can apply colors on tags, id, and class. For setting color in background we can use "background-color" and for changing color of text we can use "color".
Example
<!Doctype Html>
<Html>
<Head>
<Title>HTML Colors</Title>
</Head>
<Body>
<h2 style="color:Red;">First Paragraph</h2>
<p style="color:Green;">This is First Paragraph. </p>
<h3 style="color:blue;">Second Paragraph</h3>
<p style="color:black;">This is Second paragraph. </p>
</Body>
</Html>
Output
This is First Paragraph.
This is Second paragraph.
Copyright ©2022 coderraj.com. All Rights Reserved.