Chainsmoker's Block

[WEB - HTML CSS JAVASCRIPT][HTML 태그] - <!DOCTYPE> 본문

개인공부(WEB, Python, DB)

[WEB - HTML CSS JAVASCRIPT][HTML 태그] - <!DOCTYPE>

Chainsmokers 2022. 6. 24. 15:48

DOCTYPE 선언은 HTML 문서에서 <html> 태그를 정의하기 전에 가장 먼저 선언되어야만 합니다.

 

이러한 DOCTYPE 선언은 HTML 태그는 아니지만, 선언된 페이지의 HTML 버전이 무엇인지를 웹 브라우저에 알려주는 역할을 하는 선언문으로, 대소문자를 구분하지 않습니다.

HTML에서 DOCTYPE 선언의 예

1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
 
<body>
The content of the document......
</body>
 
</html>
 
cs

 

https://www.w3schools.com/tags/tag_doctype.asp

 

HTML doctype declaration

W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

www.w3schools.com

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_doctype 

 

W3Schools online HTML editor

The W3Schools online code editor allows you to edit code and view the result in your browser

www.w3schools.com

 

반응형