태그에 CSS를 적용하려면 style 이라는 속성을 사용
<div style="...">
...
</div>
<div style="color: #272928">
...
</div>
여러 개의 CSS 속성 사용하기
여러 개의 CSS 속성을 사용할 때는 세미콜론(;)으로 구분
<div style="color: #272928; background-color: #eeeeee">
...
</div>
배경색
background-color: #272928
글자색
color: #ffffff
글꼴
font-family: Poppins, 'Noto Sans KR', sans-serif
우선 적용할 글꼴 이름부터 차례대로 적어 준다
글꼴 이름이 띄어쓰기가 있는 경우엔 따옴표로 감싸 준다
sans-serif 나 serif 를 사용하면 산 세리프나 세리프 타입의 글꼴을 웹 브라우저가 알아서 적용
글자 크기
font-size: 16px
글자 굵기
font-weight: 400
너비
width: 560px
높이
height: 380px
안쪽 여백
세로, 가로 10px 예시
padding: 10px
세로 10px, 가로 20px 예시
padding: 10px 20px
바깥 여백
세로, 가로 10px 예시
margin: 10px
세로 10px, 가로 20px 예시
margin: 10px 20px
세로 10px, 가로 자동(알아서 채워 넣기) 예시
margin: 10px auto
참고: auto는 바깥 여백(margin)의 가로에서만 동작