Introduction to CSS Universal Selector
Introduction to css
universal selector
- CSS universal selector is a represented by asterisk symbol (*) .
- CSS Universal selector use to select all html element on web page and apply the same css rules to them.
- CSS universal selector defined (*)
- Every element in the document regardless of type.
- Universal selector use global style.
- Universal reset default browser style.
Introduction to CSS Universal Selector
Syntax :
*{
property: value;
}
Introduction to CSS Universal Selector
Example
<!DOCTYPE html>
<html>
<head>
<style>
p{ text-align:center;
color:rgb(19, 47, 253);
}
div *{
background-color: yellow;
}
</style>
</head>
<body>
<div class ="pro">
<h2> CSS Universal Selector (*)</h2>
<p>Hello every one</p>
<p>learn to programming language</p>
</div>
<p>HTML,CSS,PHP</p>
<p>https:
//webdesigningtheory.blogspot.com/</p>
</body>
</html>
Introduction to CSS Universal Selector
Explain Program
Step 1]
<!DOCTYPE html>
- This declare the document type.
- browser that the document is written in html
