CSS Colors in HTML
The color property that is allows you to define the colora of text inside an elementa and background. You can define the colors in CSS in one of three types:
<!DOCTYPE html>
<html>
<body>
<h1 style="background-color:red;">code family</h1>
<h1 style="background-color:yellow;">we are code family
</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h1 style="color:red;">Hello World</h1>
<h1 style="color:blue;">code family</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<h1 style="border: 3px solid Tomato;">code family</h1>
<h1 style="border: 3px solid DodgerBlue;">code family</h1>
<h1 style="border: 3px solid Violet;">code family</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<style>
body {
background-color:rgb(200,200,200);
}
h1 {
background-color:DarkCyan;
}
h2 {
background-color:#ee3e80;
}
p {
background-color:white;
}
</style>
<body>
<h1 style="border: 3px solid Tomato;">code family</h1>
<p style="border: 3px solid DodgerBlue;">code family</hp>
<h2 style="border: 3px solid Violet;">code family</h2>
</body>
</html>