프로젝트의 시작
압축을 해제한 폴더를 VS ccde에서 열어서 프로젝트를 시작한다.
프로젝트 루트에 index.html 을 생성하여 기본 구조를 생성한다.
<html lang=”ko”>로 변경한다.
<title> 항목을 Starbucsk Coffee Korea로 변경한다.
스타벅스 클론 사이트 만들기 프로젝트 index.html 파일
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Starbucks Coffee Korea</title>
</head>
<body></body>
</html>
파비콘(favorite icon) 사용하기
<link rel="icon" href="./favicon.png" />

CSS 초기화 하기
<link rel=”stylesheet” href=”./css/main.css” /> 태그를 작성한다.
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Starbucks Coffee Korea</title>
<!-- 1. favicon 파일 명시 -->
<link rel="icon" href="./favicon.png" />
<!-- 2. CSS reset -->
<link
rel="stylesheet"
href="<https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css>"
/>
<!-- 3. main.css 연결/생성 -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
Hello world!!
</body>
</html>
body {
color: red;
}
live server 로 확인하기

깨톡에서 웹사이트 주소 전송

오픈 그래프(The Open Graph protocol)
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Starbucks" />
<meta property="og:title" content="Starbucks Coffee Korea" />
<meta property="og:description" content="스타벅스는 세계에서 가장 큰 다국적 커피 전문점으로, 64개국에서 총 23,187개의 매점을 운영하고 있습니다." />
<meta property="og:image" content="./images/starbucks_seo.jpg" />
<meta property="og:url" content="<https://starbucks.co.kr>" />
og:type: 페이지의 유형(E.g, website, video.movie)og:site_name: 속한 사이트의 이름og:title: 페이지의 이름(제목)og:description: 페이지의 간단한 설명og:image: 페이지의 대표 이미지 주소(URL)og:url: 페이지 주소(URL)트위터 카드(Twiter Cards)
웹페이지가 소셜 미디어(트위터)로 공유될 때 우선적으로 활용되는 정보를 지정합니다.
<meta property="twitter:card" content="summary" />
<meta property="twitter:site" content="Starbucks" />
<meta property="twitter:title" content="Starbucks Coffee Korea" />
<meta property="twitter:description" content="스타벅스는 세계에서 가장 큰 다국적 커피 전문점으로, 64개국에서 총 23,187개의 매점을 운영하고 있습니다." />
<meta property="twitter:image" content="./images/starbucks_seo.jpg" />
<meta property="twitter:url" content="<https://starbucks.co.kr>" />
twitter:card: 페이지(카드)의 유형(E.g. summary, player)
twitter:site: 속한 사이트의 이름
twitter:title: 페이지의 이름(제목)
twitter:description: 페이지의 간단한 설명
twitter:image: 페이지의 대표 이미지 주소(URL)
twitter:url: 페이지 주소(URL)
<aside> 💡 오픈그래프 관련 내용과 트위터카드 관련 내용을 html 문서의 <title>Starbucks Coffee Korea</title> 다음에 작성한다.
</aside>
opencard/twitter card가 적용된 코드
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Starbucks Coffee Korea</title>
<!--
오픈그래프(The Open Graph protocol)
- 웹페이지가 소셜미디어(페이스북 등)로 공유될 때
- 우선적으로 활용되는 정보를 지정합니다.
-->
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Starbucks" />
<meta property="og:title" content="Starbucks Coffee Korea" />
<meta
property="og:description"
content="스타벅스는 세계에서 가장 큰 다국적 커피 전문점으로, 64개국에서 총 23,187개의 매점을 운영하고 있습니다."
/>
<meta property="og:image" content="./images/starbucks_seo.jpg" />
<meta property="og:url" content="<https://starbucks.co.kr>" />
<!--
트위터 카드(Twitter Cards):
- 웹페이지가 소셜미디어(트위터)로 공유될 때
- 우선적으로 활용되는 정보를 지정합니다.
-->
<meta property="twitter:card" content="summary" />
<meta property="twitter:site" content="Starbucks" />
<meta property="twitter:title" content="Starbucks Coffee Korea" />
<meta
property="twitter:description"
content="스타벅스는 세계에서 가장 큰 다국적 커피 전문점으로, 64개국에서 총 23,187개의 매점을 운영하고 있습니다."
/>
<meta property="twitter:image" content="./images/starbucks_seo.jpg" />
<meta property="twitter:url" content="<https://starbucks.co.kr>" />
<!-- 1. favicon 파일 명시 -->
<link rel="icon" href="./favicon.png" />
<!-- 2. CSS reset -->
<link
rel="stylesheet"
href="<https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css>"
/>
<!-- 3. main.css 연결/생성 -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
Hello world!!
</body>
</html>
index.html 파일을 live server로 구동하여 크롬에서 확인한다.

크롬에서 확인한 결과

사파리에서 확인한 결과
모든 브라우저에서 동일한 결과(크로스 브라우징)를 나타내기 위해 폰트를 설정한다.
브라우저에서 google fonts를 검색하여
Google Fonts(https://fonts.google.com/) 사이트로 이동한다.
Search fonts 검색창에서 “nanum”을 검색하여 나눔고딕(Nanum Gothic)을 선택한다.

Get font 버튼을 클릭한다.

Get embed code 버튼을 클릭한다.

Regular 400 버튼 외에 추가로 Bold 700 버튼을 활성화 한다

하단의 Embed code in the <head> of your html 항목을 복사하여 html 헤더에 붙여 넣고

<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=Nanum+Gothic:wght@400;700&display=swap>" rel="stylesheet">
body{
font-family: "Nanum Gothic", sans-serif;
font-weight: 400;
font-style: normal;
}
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Starbucks Coffee Korea</title>
<!--
오픈그래프(The Open Graph protocol)
- 웹페이지가 소셜미디어(페이스북 등)로 공유될 때
- 우선적으로 활용되는 정보를 지정합니다.
-->
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Starbucks" />
<meta property="og:title" content="Starbucks Coffee Korea" />
<meta
property="og:description"
content="스타벅스는 세계에서 가장 큰 다국적 커피 전문점으로, 64개국에서 총 23,187개의 매점을 운영하고 있습니다."
/>
<meta property="og:image" content="./images/starbucks_seo.jpg" />
<meta property="og:url" content="<https://starbucks.co.kr>" />
<!--
트위터 카드(Twitter Cards):
- 웹페이지가 소셜미디어(트위터)로 공유될 때
- 우선적으로 활용되는 정보를 지정합니다.
-->
<meta property="twitter:card" content="summary" />
<meta property="twitter:site" content="Starbucks" />
<meta property="twitter:title" content="Starbucks Coffee Korea" />
<meta
property="twitter:description"
content="스타벅스는 세계에서 가장 큰 다국적 커피 전문점으로, 64개국에서 총 23,187개의 매점을 운영하고 있습니다."
/>
<meta property="twitter:image" content="./images/starbucks_seo.jpg" />
<meta property="twitter:url" content="<https://starbucks.co.kr>" />
<!-- 1. favicon 파일 명시 -->
<link rel="icon" href="./favicon.png" />
<!-- 2. CSS reset -->
<link
rel="stylesheet"
href="<https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css>"
/>
<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=Nanum+Gothic:wght@400;700&display=swap>"
rel="stylesheet"
/>
<!-- 3. main.css 연결/생성 -->
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
Hello world!!
</body>
</html>
body {
/*Google Nanum Gothic font */
font-family: "Nanum Gothic", sans-serif;
font-weight: 400;
font-style: normal;
color: red;
font-size: 50pt;
}