CSS Class Tutorial | CSS Multiple Class | CSS for Beginners
×

CSS Class

0 2136

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:


Discount Coupons



Leave a Reply


Comments
    Waiting for your comments