Lecture 17 (Morning)

Index.html


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/style.css">
</head>

<body>

    <!-- <span>hello world</span>

    <div>
        hello world
    </div>
    <div class="rec">
        hello world
    </div> -->

    <div class="main">
        <span>Hello world 1</span>
        <span class="no">Hello world 2</span>
        <span>Hello world 3</span>
    </div>
</body>

</html>

Style.css

/* span {
  text-align: center;
  background-color: aqua;
  display: block;
}

div {
  text-align: center;
  background-color: black;
  color: white;
  display: inline;
}

.rec {
  display: inline;
} */

.main {
  background-color: black;
  color: white;
  height: 400px;
}

span {
  height: 100px;
  width: 100px;
  background-color: red;
  display: inline-block;
  margin: 20px;
}

.no {
  display: none;
}

Comments