KokoaTalk Clone Coding: CSS margin
block have three visuals: margin, padding, border
margin is the spaces from the border of the box to the outside.
<html>
<head>
<style>
html {
background-color: gray;
}
div {
height: 200px;
width: 200px;
background-color: thistle;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
<html>
<head>
<style>
html {
background-color: gray;
}
body {
background-color: steelblue;
div {
height: 200px;
width: 200px;
background-color: thistle;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
<html>
<head>
<style>
html {
background-color: gray;
}
body {
background-color: steelblue;
margin: 0;
div {
height: 200px;
width: 200px;
background-color: thistle;
}
</style>
</head>
<body>
<div></div>
</body>
</html>