CSS Class

by Prasun Roy 02-Jul-16

0 697


How to create class in CSS : In the CSS an Class selector is a name always start 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

    No Comments Yet.

Leave a Reply