Why we are using <!DOCTYPE html> in every Html document? -


why using in every html document? . without doctype executing website , why have mention doctype.

<!doctype> - definition , usage

declaration must first thing in html document, before tag.

the declaration not html tag; instruction web browser version of html page written in.

in html 4.01, declaration refers dtd, because html 4.01 based on sgml. dtd specifies rules markup language, browsers render content correctly.

html5 not based on sgml, , therefore not require reference dtd.

tip: add declaration html documents, browser knows type of document expect.

from : w3 schools html declaration


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -