3. What’s in the head? Metadata in HTML


"The head's job is to contain metadata about the document"


Metadata: the <meta> element
Metadata is data that describes data


Specifying your document's character encoding
<meta charset="utf-8">
여기에 명시한 character set을 사용할 수 있게 된다
utf-8 is a universal character set


Adding an author and description
<meta> elements include name and content attributes
- name specifies the type of meta element it is
- content specifies the actual meta content.

<meta name="author" content="Chris Mills">
<meta name="description" content="The MDN Web Docs Learning Area aims to provide
started with developing web sites and applications.">

검색엔진에 연관 검색어로 검색되는 빈도수를 늘리기 위해서는 title, description등을 반드시 써야한다 이러한 행위를 Search Engine Optimization(SEO)라고 함


// 구글 웹마스터 툴을 사용하면 구글 검색으로 연관된 서브페이지가 메인 페이지에 딸려 나오도록 설정이 가능


Adding custom icons to your site
favicon: short for "favorites icon"
브라우저 탭이나 북마크 리스트에 사용되는 아이콘

favicon 넣는 방법
index 페이지와 같은 폴더에 .ico 포맷으로 저장한다
대부분의 브라우저는 .gif나 .png와 같은 형식도 지원하지만 .ico는 IE6까지 적용이 된다

예시
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">


Applying CSS and JavaScript to HTML
생략


Setting the primary language of the document
유저가 설정한 언어의 검색결과를 우선해서 띄우기 때문에 document의 기본 언어를 설정하는 것은 중요하다
스크린 리더를 사용하는 시각장애인을 위해서도 필요하다 예를 들어 six는 French와 English 각각 서로 다르게 발음이 된다

문서 전체
<html lang="ko">

일부분만 다른 언어로 인식되도록 설정 가능

...span lang="ja">ご飯が熱い。