How to use CSS class selector .class
Description
The .class
selector adds style for all elements with
the specified class.
Example
<!DOCTYPE html>
<html>
<head>
<style>
.grayStyle<!-- w ww . j a v a 2 s . c o m-->
{
background:#eee;
}
</style>
</head>
<body>
<p class="grayStyle">java2s.com.</p>
</body>
</html>
The code above generates the following result.