b'\n_START_ARTICLE_\nDeklarace typu dokumentu\n_START_PARAGRAPH_\nDeklarace typu dokumentu (anglicky document type declaration) neboli DOCTYPE je instrukce, kter\xc3\xa1 SGML nebo XML dokumentu (nap\xc5\x99. webov\xc3\xa9 str\xc3\xa1nce) p\xc5\x99i\xc5\x99azuje definici typu dokumentu (DTD) (nap\xc5\x99\xc3\xadklad form\xc3\xa1ln\xc3\xad definici ur\xc4\x8dit\xc3\xa9 verze HTML). V serializovan\xc3\xa9m tvaru dokumentu se vyjad\xc5\x99uje jako kr\xc3\xa1tk\xc3\xbd \xc5\x99et\xc4\x9bzec ve zna\xc4\x8dkovac\xc3\xadm jazyce, kter\xc3\xbd vyhovuje ur\xc4\x8dit\xc3\xa9 syntaxi._NEWLINE_Ve WWW prohl\xc3\xad\xc5\xbee\xc4\x8d\xc3\xadch je zpravidla specializovan\xc3\xbd HTML parser, a proto uveden\xc3\xa9 DTD nena\xc4\x8d\xc3\xadtaj\xc3\xad, ani kdy\xc5\xbe str\xc3\xa1nka obsahuje jeho URL. Modern\xc3\xad webov\xc3\xa9 prohl\xc3\xad\xc5\xbee\xc4\x8de v\xc5\xa1ak v dokumentu s typem text/html vyhled\xc3\xa1vaj\xc3\xad DOCTYPE, aby mohly p\xc5\x99esn\xc4\x9b ur\xc4\x8dit, v jak\xc3\xa9m re\xc5\xbeimu m\xc3\xa1 knihovna pro rozvr\xc5\xbeen\xc3\xad prvk\xc5\xaf HTML str\xc3\xa1nku vykreslit (zda m\xc3\xa1 pou\xc5\xbe\xc3\xadt standardn\xc3\xad re\xc5\xbeim nebo quirks mode kv\xc5\xafli zp\xc4\x9btn\xc3\xa9 kompatibilit\xc4\x9b)._NEWLINE_V HTML5 nen\xc3\xad serializace text/html zalo\xc5\xbeena na SGML, a DOCTYPE se pou\xc5\xbe\xc3\xadv\xc3\xa1 pouze pro v\xc3\xbdb\xc4\x9br re\xc5\xbeimu. DOCTYPE je zde zachov\xc3\xa1no jako \xe2\x80\x9eprakticky zbyte\xc4\x8dn\xc3\xa1, ale vy\xc5\xbeadovan\xc3\xa1\xe2\x80\x9c informace, kter\xc3\xa1 p\xc5\x99epne prohl\xc3\xad\xc5\xbee\xc4\x8d do standardn\xc3\xadho re\xc5\xbeimu.\n_START_SECTION_\nSyntaxe DOCTYPE\n_START_PARAGRAPH_\nObecn\xc3\xa1 syntaxe deklarace typu dokumentu je:_NEWLINE_<!DOCTYPE ko\xc5\x99enov\xc3\xbd-element PUBLIC "FPI" ["URI"] [ _NEWLINE_<!-- deklarace intern\xc3\xad podsady -->_NEWLINE_]>_NEWLINE_nebo_NEWLINE_<!DOCTYPE ko\xc5\x99enov\xc3\xbd-element SYSTEM "URI" [ _NEWLINE_<!-- deklarace intern\xc3\xad podsady -->_NEWLINE_]>_NEWLINE_Za DOCTYPE je v\xc5\xbedy uveden ko\xc5\x99enov\xc3\xbd-element, co\xc5\xbe je element, kter\xc3\xbd obklopuje cel\xc3\xbd zbytek dokumentu. V XML je to prvn\xc3\xad element v dokumentu; nap\xc5\x99\xc3\xadklad v XHTML je to element <html>, kter\xc3\xbd je otev\xc5\x99en jako prvn\xc3\xad po deklaraci DOCTYPE, a jako posledn\xc3\xad uzav\xc5\x99en. V\xc3\xbdb\xc4\x9br kl\xc3\xad\xc4\x8dov\xc3\xa9ho slova SYSTEM nebo PUBLIC ur\xc4\x8duje, zda DTD je soukrom\xc3\xa9 v syst\xc3\xa9mu nebo ve\xc5\x99ejn\xc3\xa9._NEWLINE_Za kl\xc3\xad\xc4\x8dov\xc3\xbdm slovem PUBLIC je uveden zkr\xc3\xa1cen\xc3\xbd tvar \xe2\x80\x9eve\xc5\x99ejn\xc3\xa9ho identifik\xc3\xa1toru\xe2\x80\x9c naz\xc3\xbdvan\xc3\xbd form\xc3\xa1ln\xc3\xad ve\xc5\x99ejn\xc3\xbd identifik\xc3\xa1tor (anglicky Formal Public Identifier, FPI) uzav\xc5\x99en\xc3\xbd v uvozovk\xc3\xa1ch; n\xc3\xa1sleduj\xc3\xadc\xc3\xad \xe2\x80\x9esyst\xc3\xa9mov\xc3\xbd identifik\xc3\xa1tor\xe2\x80\x9c uzav\xc5\x99en\xc3\xbd v uvozovk\xc3\xa1ch je nepovinn\xc3\xbd. Nap\xc5\x99\xc3\xadklad pro XHTML 1.1 je FPI "-//W3C//DTD XHTML 1.1//EN" a syst\xc3\xa9mov\xc3\xbd identifik\xc3\xa1tor lze podle pot\xc5\x99eby zvolit ze 3 mo\xc5\xben\xc3\xbdch syst\xc3\xa9mov\xc3\xbdch identifik\xc3\xa1tor\xc5\xaf; jedn\xc3\xadm z nich je URI "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"._NEWLINE_Za kl\xc3\xad\xc4\x8dov\xc3\xbdm slovem SYSTEM mus\xc3\xad n\xc3\xa1sledovat syst\xc3\xa9mov\xc3\xbd identifik\xc3\xa1tor. XML parser by m\xc4\x9bl v tomto p\xc5\x99\xc3\xadpad\xc4\x9b hledat DTD podle URI reference DTD uzav\xc5\x99en\xc3\xa9 v uvozovk\xc3\xa1ch zp\xc5\xafsobem z\xc3\xa1visl\xc3\xbdm na konkr\xc3\xa9tn\xc3\xadm syst\xc3\xa9mu._NEWLINE_Posledn\xc3\xad \xc4\x8d\xc3\xa1st deklarace je nepovinn\xc3\xa1. Pokud je p\xc5\x99\xc3\xadtomn\xc3\xa1, je uzav\xc5\x99en\xc3\xa1 v hranat\xc3\xbdch z\xc3\xa1vork\xc3\xa1ch ([]) a naz\xc3\xbdv\xc3\xa1 se intern\xc3\xad podsada (anglicky internal subset). Umo\xc5\xbe\xc5\x88uje p\xc5\x99id\xc3\xa1v\xc3\xa1n\xc3\xad a \xc3\xbapravu entit nebo chov\xc3\xa1n\xc3\xad ve\xc5\x99ejn\xc4\x9b definovan\xc3\xbdch typ\xc5\xaf. V jednoduch\xc3\xbdch SGML profilech b\xc3\xbdv\xc3\xa1 deklarace intern\xc3\xad podsady dokonce zak\xc3\xa1zan\xc3\xa1, aby bylo mo\xc5\xben\xc3\xa9 pou\xc5\xbe\xc3\xadvat jednoduch\xc3\xa9 HTML parsery, kter\xc3\xa9 neimplementuj\xc3\xad kompletn\xc3\xad parsov\xc3\xa1n\xc3\xad SGML._NEWLINE_V dokumentech zalo\xc5\xbeen\xc3\xbdch na SGML (jako nap\xc5\x99\xc3\xadklad HTML) jsou deklarace typu dokumentu pon\xc4\x9bkud odli\xc5\xa1n\xc3\xa9. Ve\xc5\x99ejn\xc3\xbd identifik\xc3\xa1tor zde m\xc5\xaf\xc5\xbee b\xc3\xbdt spojen se syst\xc3\xa9mov\xc3\xbdm identifik\xc3\xa1torem. Toto spojen\xc3\xad m\xc5\xaf\xc5\xbee b\xc3\xbdt provedeno nap\xc5\x99. pomoc\xc3\xad katalogov\xc3\xa9ho souboru, pomoc\xc3\xad kter\xc3\xa9ho se FPI odkazuje na syst\xc3\xa9mov\xc3\xbd identifik\xc3\xa1tor.\n_START_SECTION_\nP\xc5\x99\xc3\xadklady DTD\n_START_PARAGRAPH_\nZa\xc4\x8d\xc3\xa1tek mnoha WWW str\xc3\xa1nek vypad\xc3\xa1 takto:_NEWLINE_<!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="ar" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">_NEWLINE_Jedn\xc3\xa1 se o deklaraci typu dokumentu pro XHTML, kter\xc3\xa1 obsahuje ve\xc5\x99ejn\xc3\xbd identifik\xc3\xa1tor -//W3C//DTD XHTML 1.0 Transitional//EN i syst\xc3\xa9mov\xc3\xbd identifik\xc3\xa1tor http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd. Parser m\xc5\xaf\xc5\xbee pou\xc5\xbe\xc3\xadt libovoln\xc3\xbd z nich pro nalezen\xc3\xad referovan\xc3\xa9 extern\xc3\xad entity. Jako ko\xc5\x99enov\xc3\xbd-element je uvedeno html, a proto je ve v\xc5\xa1ech uveden\xc3\xbdch p\xc5\x99\xc3\xadkladech prvn\xc3\xadm tagem za deklarac\xc3\xad DOCTYPE tag html. Posledn\xc3\xad \xc5\x99\xc3\xa1dek obsahuj\xc3\xadc\xc3\xad zna\xc4\x8dku html ji\xc5\xbe nen\xc3\xad sou\xc4\x8d\xc3\xa1st\xc3\xad deklarace DOCTYPE, je pou\xc5\xbeit jenom jako p\xc5\x99\xc3\xadklad, jak m\xc5\xaf\xc5\xbee vypadat dal\xc5\xa1\xc3\xad text. \xc5\xbd\xc3\xa1dn\xc3\xbd z p\xc5\x99\xc3\xadklad\xc5\xaf nepou\xc5\xbe\xc3\xadv\xc3\xa1 definici intern\xc3\xad podsady.\n_START_SECTION_\nDTD pro HTML 4.01\n_START_PARAGRAPH_\nStrict DTD nepovoluje prezenta\xc4\x8dn\xc3\xad zna\xc4\x8dky; m\xc3\xadsto nich je nutn\xc3\xa9 pou\xc5\xbe\xc3\xadvat kask\xc3\xa1dov\xc3\xa9 styly (anglicky Cascading Style Sheets, CSS). Strict DTD vypad\xc3\xa1 takto:_NEWLINE_ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd">_NEWLINE_ <html>_NEWLINE_Transitional DTD povoluje n\xc4\x9bkter\xc3\xa9 star\xc5\xa1\xc3\xad nedoporu\xc4\x8dovan\xc3\xa9 (anglicky deprecated) PUBLIC atributy:_NEWLINE_ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd">_NEWLINE_ <html>_NEWLINE_Pro pou\xc5\xbeit\xc3\xad r\xc3\xa1m\xc5\xaf je nutn\xc3\xa9 pou\xc5\xbe\xc3\xadt Frameset DTD:_NEWLINE_ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"   "http://www.w3.org/TR/html4/frameset.dtd">_NEWLINE_ <html>\n_START_SECTION_\nDTD pro XHTML 1.0\n_START_PARAGRAPH_\nXHTML m\xc3\xa1 tak\xc3\xa9 3 DTD typy - Strict, Transitional a Frameset._NEWLINE_V XHTML Strict DTD nejsou povoleny nedoporu\xc4\x8dovan\xc3\xa9 tagy a k\xc3\xb3d mus\xc3\xad b\xc3\xbdt korektn\xc3\xad:_NEWLINE_ <?xml version="1.0" encoding="UTF-8"?>_NEWLINE_ <!DOCTYPE html     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">_NEWLINE_ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">_NEWLINE_XHTML Transitional DTD se podob\xc3\xa1 XHTML Strict DTD, ale nedoporu\xc4\x8dovan\xc3\xa9 tagy povoluje:_NEWLINE_ <?xml version="1.0" encoding="UTF-8"?>_NEWLINE_ <!DOCTYPE html     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">_NEWLINE_ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">_NEWLINE_Jedin\xc3\xa9 DTD, kter\xc3\xa9 povoluje r\xc3\xa1my v XHTML, je XHTML Frameset DTD:_NEWLINE_ <?xml version="1.0" encoding="UTF-8"?>_NEWLINE_ <!DOCTYPE html     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">_NEWLINE_ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n_START_SECTION_\nDTD pro XHTML 1.1\n_START_PARAGRAPH_\nXHTML 1.1 je nejnov\xc4\x9bj\xc5\xa1\xc3\xad dokon\xc4\x8den\xc3\xa1 verze XHTML, kter\xc3\xa1 zav\xc3\xa1d\xc3\xad podporu pro XHTML modularizaci. XHTML 1.1 je stejn\xc4\x9b striktn\xc3\xad jako XHTML 1.0 Strict._NEWLINE_<!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.1//EN"  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n_START_SECTION_\nDTD pro XHTML Basic\n_START_PARAGRAPH_\nXHTML Basic 1.0_NEWLINE_<!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML Basic 1.0//EN"  "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">_NEWLINE_XHTML Basic 1.1_NEWLINE_<!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML Basic 1.1//EN"  "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">\n_START_SECTION_\nDTD pro XHTML Mobile Profile\n_START_PARAGRAPH_\nXHTML Mobile Profile 1.0_NEWLINE_<!DOCTYPE html PUBLIC  "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"  "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">_NEWLINE_XHTML Mobile Profile 1.1_NEWLINE_<!DOCTYPE html PUBLIC  "-//WAPFORUM//DTD XHTML Mobile 1.1//EN"  "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">_NEWLINE_XHTML Mobile Profile 1.2_NEWLINE_<!DOCTYPE html PUBLIC  "-//WAPFORUM//DTD XHTML Mobile 1.2//EN"  "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">\n_START_SECTION_\nDOCTYPE pro HTML5 bez DTD\n_START_PARAGRAPH_\nDeklarace DOCTYPE je v HTML5 velmi kr\xc3\xa1tk\xc3\xa1, proto\xc5\xbee neobsahuje odkaz na DTD ve tvaru URL nebo FPI, ale jenom ko\xc5\x99enov\xc3\xbd-element dokumentu, HTML. Slovy samotn\xc3\xa9ho standardu: <!DOCTYPE html> bez rozli\xc5\xa1ov\xc3\xa1n\xc3\xad mal\xc3\xbdch a velk\xc3\xbdch p\xc3\xadsmen._NEWLINE_Tento form\xc3\xa1t (!DOCTYPE HTML bez rozli\xc5\xa1ov\xc3\xa1n\xc3\xad mal\xc3\xbdch a velk\xc3\xbdch p\xc3\xadsmen) je, a\xc5\xbe na chyb\xc4\x9bj\xc3\xadc\xc3\xad URI a FPI, stejn\xc3\xbd jako DOCTYPE pro HTML 4.01 zalo\xc5\xbeen\xc3\xa9 na SGML. Form\xc3\xa1ln\xc3\xad syntaxe je v HTML4 i v HTML5 definov\xc3\xa1na pomoc\xc3\xad velk\xc3\xbdch p\xc3\xadsmen, ale je povoleno i pou\xc5\xbeit\xc3\xad mal\xc3\xbdch p\xc3\xadsmen nebo libovoln\xc3\xa9 kombinace mal\xc3\xbdch a velk\xc3\xbdch p\xc3\xadsmen._NEWLINE_V XHTML5 se mus\xc3\xad v <!DOCTYPE html> rozli\xc5\xa1ovat mal\xc3\xa1 a velk\xc3\xa1 p\xc3\xadsmena, proto\xc5\xbee XHTML syntaxe vy\xc5\xbeaduje, aby v\xc5\xa1echny HTML PUBLIC pou\xc5\xbe\xc3\xadvaly mal\xc3\xa1 p\xc3\xadsmena v\xc4\x8detn\xc4\x9b ko\xc5\x99enov\xc3\xa9ho-elementu uveden\xc3\xa9ho v HTML5 DOCTYPE. XHTML dovoluje velk\xc3\xa1 p\xc3\xadsmena jen ve specifikaci DOCTYPE._NEWLINE_V XHTML5 je DOCTYPE nepovinn\xc3\xa9. Pokud ale m\xc5\xaf\xc5\xbee b\xc3\xbdt dokument zpracov\xc3\xa1n jako XML i HTML, mus\xc3\xad se DOCTYPE pou\xc5\xbe\xc3\xadt.'