css element selector
CSS Selector
1] css selector are used to select the content to style.
2] Selector are the part of css rule set.
3] css selector is a pattern used to select and style elements on webpage.
Four type of css selectors
1] CSS Element Selector
2] CSS ID Selector
3] CSS Class Selector
4] CSS Universal Selector
1] CSS Element Selector :-
1] Selects HTML elements based on their tag names
eg. ' h3 ' selects all ' <h3> ' elements.
CSS Element Selector :-
Program:-
<!DOCTYPE html>
<html>
<head>
<title>css selector</title>
<style>
h3
{
text-align : center;
color:blueviolet;
}
</style>
</head>
<body>
<h3>heading will be affected by style</h3>
<p>css selector </p>
<p>css element element</p>
</body>
</html>
Post a Comment