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

CSS Class

4056

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>



Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments