본문 바로가기

HTML & CSS

font 적용하는 방법

온라인 폰트) CSS - import 설정

/*css*/
@import url('https://fonts.googleapis.com/css2?family=Macondo&display=swap');

h1:nth-of-type(4){font-family: 'Macondo',serif;}

 

온라인 폰트) html에 적용할 때

<!--HTML-->
<link href="https://fonts.googleapis.com/earlyaccess/jejugothic.css" rel="stylesheet">

 

/*css*/
#fonftext {font-family: 'Jeju Gothic', sans-serif;}

 

다운받은 font 적용할 때 ) CSS - file 설정

@font-face {
        font-family: 'hala';
        src: url(06day-main/font/Hallasan.woff) format('woff');
}

h1:nth-of-type(3){font-family: 'hala',serif;}/*보통대체글씨,sans-serif같이 써줌*/

 

 

CSS- font 한꺼번에 작성할 때

/*작성순서 weight style size family*/
p{font:italic bold 400% "휴먼옛체", serif;}