How bad is it to exclude DOCTYPE, encodings, etc.?

A simple question, just curious, because I personally find it annoying to include them on every web page.

Except for these lines:

<!DOCTYPE html>
<meta charset="utf-8">

Surely damage the web page?

+3
source share
2 answers

It depends. Omitting one or both of them may have no effect or may completely ruin the page or may change its appearance (anything from subtle to sharp), or may improve it in some browsers.

<!DOCTYPE html> Quirks, , (- ) . , , . , , Quirks.

, UTF-8, <meta charset="utf-8"> , . , HTTP ( , ) , , (.. ). UTF-8 Ascii, .

UTF-8, <meta charset="utf-8"> , . . utf-8 UTF-8.

+3

-. . , mime , , , , , .

, - - , , .

EDIT: , , HTML (.. HTML5), html-. , -, - ( , ), , doctype. , UTF-8 .

0

All Articles