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<!DOCTYPE html>
2<html>
3<head>
4<style>
5.classname {
6 background-color: green;
7 color: white;
8}
9#idname {
10 background-color: pink;
11 color: white;
12}
13</style>
14</head>
15<body>
16<div class="classname">I am green colour<div>
17<div id="idname">I am pink colour</div>
18</body>
19</html>