Another example of class Attribute
Using tree div elements that point to the same class
name.
<!DOCTYPE
html>
<html>
<head>
<style>
.cities
{
background-color:
black;
color:
white;
margin:20px;
padding:20px;
}
</style>
</head>
<body>
<div
class="cities">
<h2>Delhi</h2>
<p>
Delhi is the captical of India</p>
</div>
<div
class="cities">
<h2>Kathmandu</h2>
<p>
Kathmandu is the captical of Nepal</p>
</div>
<div
class="cities">
<h2>Dhaka</h2>
<p>
Dhaka is the captical of Bangladesh</p>
</div>
</body>
</html>
|
EmoticonEmoticon