font-size : 20px
font-style : normal
font-style : italic
font-weight : normal // 보통 폰트 가중치. 400과 같다.
font-weight : bold // 굵은 폰트 가중치. 700과 같다.
font-family : 'Noto-Sans', 'Gill Sans', sans-serif, cursive
line-height : 1.2
line-height : 1.6
line-height : 3em
line-height : 150%
line-height : 32px
총 6가지 속성을 단축해서 사용할 수 있다.
font 단축속성에는 아래와 같은 규칙이 있다.
1) 공식구문 :
font-style font-variant font-weight font-stretch font-size weight size/line-height family2) 필수 입력: font-size, font-family
3) 선택 입력: font-style, font-variant, font-weight, line-height
4) font-style과 font-weight는 size앞에 있어야 한다.
font: small-caps bold 24px/1 sans-serif;
letter-spacing: 5px // normal값에 5px을 더한다는 뜻.
word-spacing : 5px // normal값에 5px을 더한다는 뜻. word-spacing은 %도 가능하다.
<div style="width:100px;">
<span>inline요소인 span태그</span>
</div>
text-align : center // 중앙정렬
text-align : right // 오른쪽 정렬
text-align : left // 왼쪽 정렬
text-indent : 0;
text-indent : 30%;
text-indent : -3em;
공식구문 : text-decoration-line text-decoration-style text-decoration-color
1) text-decoration-line : 사용되는 장식의 종류를 설정한다.
2) text-decoration-style : 장식에 사용되는 선의 스타일을 설정한다.
3) text-decoration-color : 장식의 색상을 설정한다.
text-decoration : underline dotted red;
text-decoration : underline overline #FF3028
word-break : break-all // overflow 됐을 시 줄바꿈이 되게.
word-break : keep-all // overflow가 됐을 시 줄바꿈이 되지 않고 width를 뚫고 쭉 연결된다.
text-transform : capitalize // 문장들의 단어들 앞글자가 대문자로 변경된다.
text-transform : uppercase // 문장들의 단어들을 대문자로 변경한다.
text-transform : lowercase // 문장들의 단어들을 소문자로 변경한다.