,
Share with your friends 

Giving different colors for each heading using CSS

7 ratings Views 170 
Author: Anto (Anto Y)  View Profile |  View other solutions by this author

Question / Problem


how to set different color for different heading in CSS?

Solution

solution :
coding:
<html>
<head>
<style type="text/css">
h1{color:red}
h2{color:green}
h3{color:blue}
h4{color:black}
</style>
</head>
<body>
<h1>www.ranksheet.com</h1>
<h2>gives opportunity to write</h1>
<h3>online certification</h3>
<h4>exam<h4>
</body>
</html>

0.These example copy to your notepad
1.save the file with the extension .html
2.run the file on browsers

These are the simple example to create CSS style sheet in your web Applications



Applies to

CSS

Rank It

Login to rank it

Report


Advertisement