How to use styles in HTML?





<!DOCTYPE HTML>

<HTML>
<HEAD>
<style type="text/css">

h1 {color:red;}

h2 {color:blue;}
p {color:green;}
</style>
</HEAD>


<BODY>

<h1>All header 1 elements will be red</h1>
<h2>All header 2 elements will be blue</h2>
<p>All text in paragraphs will be green.</p>

</BODY>
</HTML>

 OUTPUT:

 

 

 

 

Comments

Popular posts from this blog

Use of HTML Quotation, Blockquote and Cite.

HTMLRUN TechNEWS - 003 | Chrome, Google TEZ, Airtel