html
<p>hello</p> <h1>hello</h1>
결과
hello
hello
html 기본 양식
<!DOCTYPE html>
<html>
<head></head>
<body></body>
</html>
한국어를 쓰기 위해서 head안에 추가해 주어야함
<meta charset="UTF-8">
css
css파일을 html파일과 이어주기 위해서 head안에 link를 추가해 주어야함
<head>
<link rel="stylesheet" href=".css">
</head>
p테그에 css 적용 - 모든 p테그에 적용
p {
text-align: center;
color: red;
}
분리해서 적용하고 싶으면 class를 지정해준다.
html
<p class="a">1번</p>
<p class="b">2번</p>
css
p {
text-align: center;
color: red;
}
.a {
color: blue;
}
.b {
color: orange;
}
폰트 넣기 (* 전체적용)
@import url('https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700,800&display=swap');
* {
font-family: 'Montserrat';
}