assigning css style to all html objects

In CSS, wild card * can also be used to apply the property of class to all the objects in the document.

In the following example, the properties defined in * are applied to all the objects

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<style>
*
{
  color:#00F;
}
</style>


</head>
<body>

<h1> This is heading 1 </h1>
<h2> this is heading 2 </h2>
<h3> This is heading 3 </h3>

<p>
This is web engineering course, and we have started cascaded style sheets
</p>


<p>
This is second P tag. This is web engineering course, and we have started cascaded style sheets
</p>

</body>
</html>

 

Add a Comment

Your email address will not be published. Required fields are marked *