Skip to content

Instantly share code, notes, and snippets.

@kiyeon
Last active February 20, 2017 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiyeon/e02f502fb116e7a5327d6a74274d76b4 to your computer and use it in GitHub Desktop.
Save kiyeon/e02f502fb116e7a5327d6a74274d76b4 to your computer and use it in GitHub Desktop.
HTML5 Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link href="some.css" rel="stylesheet">
<script src="some.js"></script>
</head>
<body>
</body>
</html>
@kiyeon
Copy link
Author

kiyeon commented Feb 20, 2017

독타입은 브라우저에게 문서의 종류를 알려주며 브라우저는 이 정보를 토대로 화면을 렌더링 한다.
3가지 독타입이 있다.

  • 관용모드(quirks mode, 구 버전 호환을 위한 비표준 기능 허용)
  • 표준모드(standards mode, 표준을 엄격히 지킴)
  • 유사표준모드(almost standards mode, 몇 가지 호환모드 지원)

@kiyeon
Copy link
Author

kiyeon commented Feb 20, 2017

텍스트를 렌더링할때 사용되는 유니코드 문자의 범위를 지정하며 웹의 기본 값은 UTF-8 이다.

@kiyeon
Copy link
Author

kiyeon commented Feb 20, 2017

외부 자원을 호출할 때 더이상 type속성을 사용하지 않아도 된다.

@kiyeon
Copy link
Author

kiyeon commented Feb 20, 2017

코드스타일

  • 모두 소문자를 사용
  • 문자열은 'double quotation marks'
  • 들여쓰기 4 spaces
  • 각 라인은 80~120 컬럼, 각줄끝은 공백없이 Trim
  • 유닉스 개행문자(LF, LineFeed, \n) 사용
  • 인코딩 : BOM(Byte Order Mark)이 없는 UTF-8 문자셋

HTML5 Boilerplate에서 다양한 템플릿을 참조할 수 있다.

@kiyeon
Copy link
Author

kiyeon commented Feb 20, 2017

lang 속성은 기본 언어를 지정한다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment