HTML
x
1
2
<html>
3
<head>
4
<style>
5
.city {
6
background-color: tomato;
7
color: white;
8
margin: 20px;
9
padding: 20px;
10
}
11
</style>
12
</head>
13
<body>
14
15
<div>
16
<h2>London</h2>
17
<p>London is the capital of England.</p>
18
</div>
19
20
<div class="city">
21
<h2>Paris</h2>
22
<p>Paris is the capital of France.</p>
23
</div>
24
25
<div class="city">
26
<h2>Tokyo</h2>
27
<p>Tokyo is the capital of Japan.</p>
28
</div>
29
30
</body>
31
</html>
CSS
1
1
JavaScript
1
1
Output: