apply one rule to multiple selector - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

apply one rule to multiple selector

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.myformat h1, .myformat h2, .myformat h3, .myformat h4 {
   color:Chartreuse;
   margin-bottom:2em;
   text-size:31px;<!-- w w w  . j a  v  a  2s.c o m-->
}
</style> 
 </head> 
 <body> 
  <div class="myformat"> 
   <h1>Lorem ips</h1> 
   <h2>Lorem ips</h2> 
   <h3>Lorem ips</h3> 
   <h4>Lorem ips</h4> 
  </div>  
 </body>
</html>

Related Tutorials