

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#nav{
width: 800px;
border: 1px solid#dddddd;
margin: 0 auto;
}
.text1{
text-align: center;
font-size: 2em;
/* font-weight: bold; */
}
#footer{
color: blue;
text-align: center;
height: 50px;
line-height: 50px;
font-size: 1.5em;
}
.text{
padding: 10px 20px;
}
.text2{
text-align: right;
font-weight: bold;
padding: 0 20px;
}
</style>
</head>
<body>
<div id="nav">
<p class="text1"><ins>HTML5</ins>,<ins> CSS3 Document</ins></p>
<p class="text">To. all member</p>
<p class="text">````````````</p>
<p class="text2">From. SBA</p>
<hr>
<p id="footer">서울산업진흥원</p>
</div>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#nav{
width: 800px;
margin: 0 auto;
border: 1px solid #cccccc;
overflow: hidden;
}
#nav div{
width: 150px;
height: 100px;
line-height: 100px;
float: left;
font-size: 1.5em;
border-top: 1px solid #cccccc;
border-bottom: 1px solid #cccccc;
margin: 5px;
text-align: center;
}
a{
text-decoration: none;
color: #282828;
}
</style>
</head>
<body>
<div id="nav">
<div><a href="#">menu1</a></div>
<div><a href="#">menu2</a></div>
<div><a href="#">menu3</a></div>
<div><a href="#">menu4</a></div>
<div><a href="#">menu5</a></div>
</div>
</body>
</html>
border box, content box 가 있다.
margin은 외부여백이고 padding은 내부여백입니다.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#wrap{
width: 1000px;
overflow: hidden;
}
header{
text-align: center;
}
#first{
display: inline;
width: 300px;
float: left;
border: 1px solid white;
padding: 0 10px;
}
#second{
display: inline;
width: 300px;
float: left;
border: 1px solid white;
padding: 0 10px;
}
#third{
display: inline;
width: 300px;
float: left;
border: 1px solid white;
padding: 0 10px;
}
img{
margin-bottom: -20px;
}
</style>
</head>
<body>
<div id="wrap">
<header><h1>신상품 목록</h1></header>
<section>
<div id="first"><img src="KakaoTalk_20240626_160740535_01.jpg"alt="이미지없음">
<h1>상품 1</h1>
<p>상품 1 설명 텍스트</p>
<p>가격: 12,345원</p>
</div>
<div id="second"><img src="KakaoTalk_20240626_160740535_02.jpg" alt="이미지없음">
<h1>상품 2</h1>
<p>상품 2 설명 텍스트</p>
<p>가격: 12,345원</p>
</div>
<div id="third"><img src="KakaoTalk_20240626_160740535.jpg" alt="이미지없음">
<h1>상품 3</h1>
<p>상품 3 설명 텍스트</p>
<p>가격: 12,345원</p>
</div>
</section>
</div>
</body>
</html>