본문 바로가기
코딩

[개발일지] 웹개발 : 구글 웹 폰트 사용법

by 배공 2021. 12. 13.

구글 웹 폰트 사용법

 

css 폰트 적용하기

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

 

Google Fonts

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

fonts.google.com

 

1. 구글 폰트 사이트에 접속하기

 

2. 원하는 폰트 클릭하기

 

3. 우측 [+Select this style] 클릭하기

 

 

4. <link> 소스 복사해서 <head> 영역에 붙여넣기

 

5. CSS 소스 복사해서 <style> 영역에 붙여넣기

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>구글 웹폰트</title>
    <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=Black+Han+Sans&display=swap" rel="stylesheet">
    <style>
        p{font-family: 'Black Han Sans', sans-serif;}
    </style>
</head>
<body>

<p>구글 웹폰트 적용하기</p>

</body>
</html>

댓글