> For the complete documentation index, see [llms.txt](https://shhn0509.gitbook.io/html-and-css/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shhn0509.gitbook.io/html-and-css/html/head/undefined.md).

# 표준 호환모드

## 표준 호환모드

* HTML 요소 간 관계(부모, 자식, 형제)가 있다.
* HTML element 는 root element로 모든 요소의 조상이 될 수 있다.
* HTML element
  * `head` : first child
  * `body` : last child

### DOCTYPE (Document Type Definition)

* `<html>`,`<head>`,`<body>`요소 사이에는 어떠한 것도 들어 올 수 없다.
* `<head>`,`<body>`요소는 각각 다른 성질의 자식들을 가질 수 있다
* 표준모드와 비 표준모드를 설정
* 웹 표준 문서, 모든 웹브라우저에서 호환되는 문서가 된다.(표준모드)
* 만약 `DOCTYPE` 코드가 없다면 해당 문서는 비 표준 문서가 된다.
* 페이지의 가장 상위에 존재해야 한다.
* 소문자, 대문자 구분 X
* 대부분의 웹브라우저에서 표준모드를 사용하기 때문에 `DOCTYPE`을 사용해서 페이지를 작성하는 것이 좋다.
