universal Selector

universal Selector
CSS universal Selector reference
The CSS universal selector ( * ) is used to target all elements to apply your specified CSS properties to them.
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
* {color:#F00;}
</style>
<h2>Heading content</h2>
<p>Paragraph content...</p>
 

Heading content

Paragraph content...

CSS CODE EXAMPLE
<style type="text/css">
#div2 * {
    color:#F0F;
    font-weight:bold;
}
</style>
<div id="div1">
  <p>Paragraph content...</p>
  <p>Paragraph content...</p>
</div>
<div id="div2">
  <p>Paragraph content...</p>
  <p>Paragraph content...</p>
</div>
 
Paragraph content...
Paragraph content...
Paragraph content...
Paragraph content...

Related Posts :

  • height height CSS height Property The CSS height property is used to specify the height sett… Read More...
  • font font CSS font Property The CSS font property is CSS shorthand for specifying fon… Read More...
  • line-height line-height CSS line-height Property The CSS line-height property is used to specify … Read More...
  • font-weight font-weight CSS font-weight Property The CSS font-weight property is used to specify … Read More...
  • letter-spacing letter-spacing CSS letter-spacing Property The CSS letter-spacing property is used to… Read More...

0 Response to "universal Selector"

Post a Comment