html - What is the functionality of !DOCTYPE? -


we see <!doctype ...> follows:

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> 

what's functionality of !doctype?

the significant use of doctype switch browser between quirks mode , standards mode rendering.

this functionality came because of "broken" rendering in old versions of ie. realised if microsoft "fixed" ie rendering engine lots of existing sites not render properly. way works if put any valid doctype declaration @ in page assumption know you're doing , browser render in standards compliant way, , if don't put 1 in render in old "wrong" way.

this done in ie mac, behaviour same in versions of ie since ie5, , firefox, chrome, safari , opera.

what doctype supposed document type definition. html subset of sgml (as xml). dtd tells parser syntax using. in webpage doctype should match version of html using.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -