1.myclass {
2 border:1px solid black;
3 background-color: #d2d2d2;
4 height:20px;
5 width:60px;
6}
7/*If you give this class to a div in html, it will get the styles you gave
8to that class. You can add multiple classes to a div, and multiple divs
9can get that class. */
10/* I hope I helped! */
1<ul class="legend">
2 <li><span class="greendot"></span>Text</li><br></br>
3 <li><span class="yellowdot"></span>Text</li><br></br>
4 <li><span class="reddot"></span>Text</li><br></br>
5 <li><span class="blackdot"></span>Text</li><br></br>
6</ul>
1<!DOCTYPE html>
2<html>
3<head>
4<style>
5.city {
6 background-color: tomato;
7 color: white;
8 border: 2px solid black;
9 margin: 20px;
10 padding: 20px;
11}
12</style>
13</head>
14<body>
15
16<div class="city">
17 <h2>London</h2>
18 <p>London is the capital of England.</p>
19</div>
20
21<div class="city">
22 <h2>Paris</h2>
23 <p>Paris is the capital of France.</p>
24</div>
25
26<div class="city">
27 <h2>Tokyo</h2>
28 <p>Tokyo is the capital of Japan.</p>
29</div>
30
31</body>
32</html>