CSS Class
0 4071
How to create a class in CSS: In the CSS a Class selector is a name that always starts with a dot character (".").
Class can be used to identify more than one element
Example:
<!DOCTYPE html>
<html>
<head>
<style>
.test {
background-color:#FF0000;
}
</style>
</head>
<body>
<div class="test">
<p> Hello World </p>
<p> Welcome to CSS </p>
</div>
<p> My best friend is Vihaan. </p>
</body>
</html>
Share:
Comments
Waiting for your comments