html h1 color code example
Example 1: how to change h1 color in html
<h1 style="color: red;">
This is a Level1 Heading
</h1>
Example 2: how to color in html
<h1 style="color: red;">Hello</h1>
Example 3: how to add style to p tag in html
<h1 style="color:blue;">This is a Blue Heading</h1>
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a
heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Example 4: how to change font colour in html
<font color="red">
Lorem Ipsum
</font>
Example 5: how to change font color of h2 tag in html
<!doctype html>
<html>
<head>
<title>shivam the new hacker</title>
<style>
h2{font color="yellow"}
</style>
</head>
<body>
abc
</body>
<html>