
<style> </style> : 사이에 CSS코드 적용<head>태그 안에 div{width: 200px; height: 50px;}
.box2{background-color: powderblue;}
#box1{background-color: tomato;}
💡 예시
<!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>
<style>
div{width: 200px; height: 50px;}
#box1{background-color: tomato;}
.box2{background-color: powderblue;}
</style>
</head>
<body>
<div id="box1">빨강 박스</div>
<div class="box2">박스2</div>
</body>
</html>
🕜 결과

<link rel="stylesheet" href="style.css">
<style>
@import url("style.css")
</style>
- import는 중첩으로 가능 style.css안에 임포트로 style2.css 가능
💡 예시
<!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="style.css"/>
<style>
@import url("style22.css");
</style>
</head>
<body>
<h1>page1</h1>
</body>
</html>
-> style.css
@charset "UTF-8";
h1{
color: powderblue;
}
-> style22.css
h1{
background-color: tomato;
}
🕜 결과

<head></head>사이에 다음 링크 연결<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
출처 : https://getbootstrap.kr/
</body>직전에 다음 링크 연결<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
출처 : https://getbootstrap.kr/