[CSS, HTML] 폰트 적용하기

김정호·2021년 12월 29일
0

구글 폰트
구글 폰트에 들어가서 원하는 폰트를 고른다. 나는 'Jua' 폰트를 선택했다.
원하는 폰트에서 "+ Select this style"을 클릭한다.
link를 복사하여 head 태그 안에 넣어준다.

<link rel="preconnect" href="https://fonts.googleapis.com"> 
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 
<link href="https://fonts.googleapis.com/css2?family=Jua&display=swap" rel="stylesheet">

style 태그 안에 다음과 같은 코드를 넣어준다.

* {
	font-family: 'Jua', sans-serif;
}

그러면 페이지 전체에 원하는 폰트를 적용시킬 수 있다.

profile
개발자

0개의 댓글