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>
<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>
#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...
Paragraph content...
0 Response to "universal Selector"
Post a Comment