Development

[CSS, HTML] 폰트 적용하기

개발자 강정 2021. 12. 28. 19:10

https://fonts.google.com/?subset=korean

 

Google Fonts

Making the web more beautiful, fast, and open through great typography

fonts.google.com

구글 폰트에 들어가서 원하는 폰트를 고른다. 나는 '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;
}

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