CSS 18 CSS의 사용 위치

프론트엔드/CSS|2021. 4. 3. 15:31


Document 인라인스타일시트적용
내부스타일시트적용
외부스타일시트적용
p3 {
  color: green;
  background-color: yellow;
}
<!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 type="text/css" rel="stylesheet"href="01_스타일시트사용위치.css"></link>
  <style>
    p2{     /*내부스타일시트적용방법*/
    color: blue;
    }
    </style>
</head>
<body>
  <!--인라인스타일시트적용방법-->
  <p1 style="color: red;">인라인스타일시트적용</p1><br>
  <p2>내부스타일시트적용</p2><br>
  <p3>외부스타일시트적용</p3><br>
</body>
</html>

댓글()
구독