welcome to tutorialfamily

css color

css color used for applying color to text, background and border.

css color are apply with hex value, rgb value and color name.


css text color

here we show you one way to apply color to text.


css text color


						        
<!DOCTYPE html>
<html>
<head>
   <title>css tutorial</title>
<style>
h1{
   color: red;
}
h2{
   color: #ff0000;
}
h3{
   color: rgb(255, 0, 0);
}
</style>
</head>
<body>
   <h1>my car</h1>
   <h2>my car</h2>
   <h3>my car</h3>
</body>
</html>


Run

css background color

we can apply background color to element, box, content area.


css background color


						        
<!DOCTYPE html>
<html>
<head>
   <title>css tutorial</title>
<style>
h1{
   color: #fff;
   padding: 20px;
   background: #ff0000;
}
.box{
   height: 100px;
   width: 100px;
   background: yellow;
}
</style>
</head>
<body>
   <h1>my car</h1>
   <div class="box"></div>
</body>
</html>


Run

Our Content