CINXE.COM
Document type declaration - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Document type declaration - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"c316ff52-bafc-458f-b3f2-8cd51b07cc3d","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Document_type_declaration","wgTitle":"Document type declaration","wgCurRevisionId":1215352676,"wgRevisionId":1215352676,"wgArticleId":40042954,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","XML-based standards","SGML"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Document_type_declaration","wgRelevantArticleId":40042954,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false, "wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q5372118","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={ "ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming", "ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Document type declaration - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Document_type_declaration"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Document_type_declaration&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Document_type_declaration"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Document_type_declaration rootpage-Document_type_declaration skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Document+type+declaration" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Document+type+declaration" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Document+type+declaration" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Document+type+declaration" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Syntax" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Syntax"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Syntax</span> </div> </a> <button aria-controls="toc-Syntax-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Syntax subsection</span> </button> <ul id="toc-Syntax-sublist" class="vector-toc-list"> <li id="toc-Document_type_name" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Document_type_name"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>Document type name</span> </div> </a> <ul id="toc-Document_type_name-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_identifier" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#External_identifier"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.2</span> <span>External identifier</span> </div> </a> <ul id="toc-External_identifier-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Internal_subset" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Internal_subset"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.3</span> <span>Internal subset</span> </div> </a> <ul id="toc-Internal_subset-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Example" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Example"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.4</span> <span>Example</span> </div> </a> <ul id="toc-Example-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Common_DTDs" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Common_DTDs"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Common DTDs</span> </div> </a> <button aria-controls="toc-Common_DTDs-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Common DTDs subsection</span> </button> <ul id="toc-Common_DTDs-sublist" class="vector-toc-list"> <li id="toc-HTML_4.01_DTDs" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#HTML_4.01_DTDs"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>HTML 4.01 DTDs</span> </div> </a> <ul id="toc-HTML_4.01_DTDs-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-XHTML_1.0_DTDs" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#XHTML_1.0_DTDs"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>XHTML 1.0 DTDs</span> </div> </a> <ul id="toc-XHTML_1.0_DTDs-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-XHTML_1.1_DTD" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#XHTML_1.1_DTD"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.3</span> <span>XHTML 1.1 DTD</span> </div> </a> <ul id="toc-XHTML_1.1_DTD-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-XHTML_Basic_DTDs" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#XHTML_Basic_DTDs"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.4</span> <span>XHTML Basic DTDs</span> </div> </a> <ul id="toc-XHTML_Basic_DTDs-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-HTML5_DTD-less_DOCTYPE" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#HTML5_DTD-less_DOCTYPE"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.5</span> <span>HTML5 DTD-less DOCTYPE</span> </div> </a> <ul id="toc-HTML5_DTD-less_DOCTYPE-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Document type declaration</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 12 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-12" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">12 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Deklarace_typu_dokumentu" title="Deklarace typu dokumentu – Czech" lang="cs" hreflang="cs" data-title="Deklarace typu dokumentu" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Declaraci%C3%B3n_de_tipo_de_documento" title="Declaración de tipo de documento – Spanish" lang="es" hreflang="es" data-title="Declaración de tipo de documento" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%A7%D8%B9%D9%84%D8%A7%D9%85%DB%8C%D9%87_%D9%86%D9%88%D8%B9_%D8%B3%D9%86%D8%AF" title="اعلامیه نوع سند – Persian" lang="fa" hreflang="fa" data-title="اعلامیه نوع سند" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Doctype" title="Doctype – French" lang="fr" hreflang="fr" data-title="Doctype" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EB%AC%B8%EC%84%9C_%ED%98%95%EC%8B%9D_%EC%84%A0%EC%96%B8" title="문서 형식 선언 – Korean" lang="ko" hreflang="ko" data-title="문서 형식 선언" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/Document_Type_Declaration" title="Document Type Declaration – Hebrew" lang="he" hreflang="he" data-title="Document Type Declaration" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Dokumentumt%C3%ADpus-deklar%C3%A1ci%C3%B3" title="Dokumentumtípus-deklaráció – Hungarian" lang="hu" hreflang="hu" data-title="Dokumentumtípus-deklaráció" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E6%96%87%E6%9B%B8%E5%9E%8B%E5%AE%A3%E8%A8%80" title="文書型宣言 – Japanese" lang="ja" hreflang="ja" data-title="文書型宣言" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Doctype" title="Doctype – Portuguese" lang="pt" hreflang="pt" data-title="Doctype" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/Document_type_declaration" title="Document type declaration – Russian" lang="ru" hreflang="ru" data-title="Document type declaration" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/Document_type_declaration" title="Document type declaration – Serbian" lang="sr" hreflang="sr" data-title="Document type declaration" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Belge_t%C3%BCr%C3%BC_beyan%C4%B1" title="Belge türü beyanı – Turkish" lang="tr" hreflang="tr" data-title="Belge türü beyanı" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q5372118#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Document_type_declaration" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Document_type_declaration" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Document_type_declaration"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Document_type_declaration&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Document_type_declaration&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Document_type_declaration"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Document_type_declaration&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Document_type_declaration&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Document_type_declaration" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Document_type_declaration" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Document_type_declaration&oldid=1215352676" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Document_type_declaration&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Document_type_declaration&id=1215352676&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDocument_type_declaration"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDocument_type_declaration"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Document_type_declaration&action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Document_type_declaration&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-wikibooks mw-list-item"><a href="https://en.wikibooks.org/wiki/HTML_5_Programming_and_Web_development/HTML_5_Doctype" hreflang="en"><span>Wikibooks</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q5372118" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Instruction that associates documents with a document type definition</div> <p>A <b>document type declaration</b>, or <b>DOCTYPE</b>, is an instruction that associates a particular <a href="/wiki/XML" title="XML">XML</a> or <a href="/wiki/SGML" class="mw-redirect" title="SGML">SGML</a> document (for example, a <a href="/wiki/Web_page" title="Web page">web page</a>) with a <a href="/wiki/Document_type_definition" title="Document type definition">document type definition</a> (DTD) (for example, the formal definition of a particular version of <a href="/wiki/HTML" title="HTML">HTML 2.0 - 4.0</a>).<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> In the <a href="/wiki/Serialize" class="mw-redirect" title="Serialize">serialized</a> form of the document, it manifests as a short string of <a href="/wiki/Markup_language" title="Markup language">markup</a> that conforms to a particular syntax. </p><p>The <a href="/wiki/HTML" title="HTML">HTML</a> <a href="/wiki/Browser_engine" title="Browser engine">layout engines</a> in modern <a href="/wiki/Web_browser" title="Web browser">web browsers</a> perform DOCTYPE "sniffing" or "switching", wherein the DOCTYPE in a document served as <code>text/html</code> determines a layout mode, such as "<a href="/wiki/Quirks_mode" title="Quirks mode">quirks mode</a>" or "standards mode". The <code>text/html</code> serialization of <a href="/wiki/HTML5" title="HTML5">HTML5</a>, which is not SGML-based, uses the DOCTYPE only for mode selection. Since web browsers are implemented with special-purpose HTML parsers, rather than general-purpose DTD-based parsers, they do not use DTDs and never access them even if a URL is provided. The DOCTYPE is retained in HTML5 as a "mostly useless, but required" header only to trigger "standards mode" in common browsers.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Syntax">Syntax</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=1" title="Edit section: Syntax"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The general syntax for a document type declaration is: </p> <div class="mw-highlight mw-highlight-lang-dtd mw-content-ltr" dir="ltr"><pre><span></span><span class="k"><!DOCTYPE</span> <span class="nt">root-element</span> <span class="kc">PUBLIC</span> <span class="s2">"/quotedFPI/"</span> <span class="s2">"/quotedURI/"</span> <span class="k">[</span> <span class="c"><!-- internal subset declarations --></span> <span class="k">]></span> </pre></div> <p>or </p> <div class="mw-highlight mw-highlight-lang-dtd mw-content-ltr" dir="ltr"><pre><span></span><span class="k"><!DOCTYPE</span> <span class="nt">root-element</span> <span class="kc">SYSTEM</span> <span class="s2">"/quotedURI/"</span> <span class="k">[</span> <span class="c"><!-- internal subset declarations --></span> <span class="k">]></span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Document_type_name">Document type name</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=2" title="Edit section: Document type name"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The opening <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr"><!DOCTYPE</code> syntax is followed by separating syntax<sup id="cite_ref-goldfarb_3-0" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 403–404">: 403–404 </span></sup> (such as spaces,<sup id="cite_ref-goldfarb_3-1" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 297–298, 372">: 297–298, 372 </span></sup> or (except in XML) comments opened and closed by a doubled <a href="/wiki/Hyphen-minus" title="Hyphen-minus">ASCII hyphen</a>),<sup id="cite_ref-goldfarb_3-2" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 372, 391">: 372, 391 </span></sup> followed by a <i>document type name</i><sup id="cite_ref-goldfarb_3-3" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 403–404">: 403–404 </span></sup> (i.e. the name of the root element that the DTD applies to trees descending from). In XML, the root element that represents the document is the first element in the document. For example, in XHTML, the root element is <html>, being the first element opened (after the doctype declaration) and last closed. </p><p>Since the syntax for the external identifier and internal subset are both optional,<sup id="cite_ref-goldfarb_3-4" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 403–404">: 403–404 </span></sup> the document type name is the only information which it is mandatory to give in a DOCTYPE declaration. </p> <div class="mw-heading mw-heading3"><h3 id="External_identifier">External identifier</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=3" title="Edit section: External identifier"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The DOCTYPE declaration can optionally contain an <i><a href="/wiki/Formal_Public_Identifier#Public_identifiers_and_system_identifiers_in_SGML" title="Formal Public Identifier">external identifier</a></i>, following the root element name (and separating syntax such as spaces), but before any internal subset.<sup id="cite_ref-goldfarb_3-5" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 403–404">: 403–404 </span></sup> This begins with either the keyword <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">SYSTEM</code> or the keyword <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">PUBLIC</code>,<sup id="cite_ref-goldfarb_3-6" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 379">: 379 </span></sup> specifying whether the DTD is specified using a <i>public identifier</i> identifying it as a <i>public text</i>, i.e. one shared between multiple computer systems (regardless of whether it is an <i>available public text</i> available to the general public, or an <i>unavailable public text</i> shared only within an organisation).<sup id="cite_ref-goldfarb_3-7" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 180–182">: 180–182 </span></sup> If the PUBLIC keyword is used, it is followed by the public identifier enclosed in double or single <a href="/wiki/ASCII" title="ASCII">ASCII</a> quotation marks. The public identifier does not point to a storage location, but is rather a unique fixed string intended to be looked up in a table (such as an <a href="/wiki/SGML_catalog" class="mw-redirect" title="SGML catalog">SGML catalog</a>);<sup id="cite_ref-goldfarb_3-8" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 180">: 180 </span></sup> however, in some (but not all) SGML profiles, the public identifier must be constructed using a particular syntax called <a href="/wiki/Formal_Public_Identifier" title="Formal Public Identifier">Formal Public Identifier</a> (FPI), which specifies the owner as well as whether it is available to the general public.<sup id="cite_ref-goldfarb_3-9" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 182–183">: 182–183 </span></sup> </p><p>The public identifier (if present) or <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">SYSTEM</code> keyword (otherwise) may (and, in XML, must)<sup id="cite_ref-xml-catalog_4-0" class="reference"><a href="#cite_note-xml-catalog-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> be followed by a "system identifier" that is likewise enclosed in quotation marks. Although the interpretation of system identifiers in general SGML is entirely system-dependent (and might be a filename, database key, offset, or something else),<sup id="cite_ref-goldfarb_3-10" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 378">: 378 </span></sup> XML requires that they be <a href="/wiki/URI" class="mw-redirect" title="URI">URIs</a>.<sup id="cite_ref-clarkxml_5-0" class="reference"><a href="#cite_note-clarkxml-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> For example, the FPI for XHTML 1.1 is <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">"-//W3C//DTD XHTML 1.1//EN"</code> and, there are 3 possible system identifiers available for XHTML 1.1 depending on the needs. One of them is the <a href="/wiki/URL" title="URL">URL</a> reference <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</code>. It means that the XML parser must locate the DTD in a system specific fashion, in this case, by means of a URL reference of the DTD enclosed in double quote marks. </p><p>In XHTML documents, the doctype declaration must always explicitly specify a system identifier. In SGML-based documents like HTML, on the other hand, the appropriate system identifier may automatically be inferred from the given public identifier. This association might e.g. be performed by means of a catalog file resolving the FPI to a system identifier.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> The <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">SYSTEM</code> keyword can (except in XML) also be used without a system identifier following, indicating that a DTD exists but should be inferred from the document type name.<sup id="cite_ref-goldfarb_3-11" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 378">: 378 </span></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Internal_subset">Internal subset</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=4" title="Edit section: Internal subset"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The last, optional, part of a DOCTYPE declaration is surrounded by literal square brackets (<code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">[]</code>), and called an <i>internal subset</i>. It can be used to add/edit <a href="/wiki/Document_type_definition#Markup_declarations" title="Document type definition">entities</a> or add/edit PUBLIC keyword behaviors.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> It is possible, but uncommon, to include the entire DTD in-line in the document, within the internal subset, rather than referencing it from an external file.<sup id="cite_ref-goldfarb_3-12" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 402">: 402 </span></sup> Conversely, the internal subset is sometimes forbidden within simple SGML profiles, notably those for basic HTML parsers that don't implement a full SGML parser. </p><p>If both an internal DTD subset and an external identifier are included in a DOCTYPE declaration, the internal subset is processed first, and the external DTD subset is treated as if it were transcluded at the end of the internal subset. Since earlier definitions take precedence over later definitions in a DTD, this allows the internal subset to override definitions in the external subset.<sup id="cite_ref-goldfarb_3-13" class="reference"><a href="#cite_note-goldfarb-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 402–403">: 402–403 </span></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Example">Example</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=5" title="Edit section: Example"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The first line of a World Wide Web page may read as follows: </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><!DOCTYPE html PUBLIC</span> <span class="cp"> "-//W3C//DTD XHTML 1.0 Transitional//EN"</span> <span class="cp"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></span> <span class="p"><</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">"ar"</span> <span class="na">dir</span><span class="o">=</span><span class="s">"ltr"</span> <span class="na">xmlns</span><span class="o">=</span><span class="s">"http://www.w3.org/1999/xhtml"</span><span class="p">></span> </pre></div> <p>This document type declaration for XHTML includes by reference a DTD, whose public identifier is <code>-//W3C//DTD XHTML 1.0 Transitional//EN</code> and whose system identifier is <code>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</code>. An entity resolver may use either identifier for locating the referenced external entity. No internal subset has been indicated in this example or the next ones. The root element is declared to be <code>html</code> and, therefore, it is the first tag to be opened after the end of the doctype declaration in this example and the next ones, too. The HTML tag is not part of the doctype declaration but has been included in the examples for orientation purposes. </p> <div class="mw-heading mw-heading2"><h2 id="Common_DTDs">Common DTDs</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=6" title="Edit section: Common DTDs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some common DTDs have been put into lists. W3C has produced a list of DTDs commonly used in the web, which contains the "bare" HTML5 DTD, older XHTML/HTML DTDs, DTDs of common embedded XML-based formats like <a href="/wiki/MathML" title="MathML">MathML</a> and <a href="/wiki/Scalable_Vector_Graphics" class="mw-redirect" title="Scalable Vector Graphics">SVG</a> as well as "compound" documents that combine those formats.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> Both W3C <a href="/wiki/HTML5" title="HTML5">HTML5</a> and its corresponding WHATWG version recommend browsers to only accept XHTML DTDs of certain FPIs and to prefer using internal logic over fetching external DTD files. It further specifies an "internal DTD" for XHTML which is merely a list of HTML entity names.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Location: §13.2">: §13.2 </span></sup> </p> <div class="mw-heading mw-heading3"><h3 id="HTML_4.01_DTDs">HTML 4.01 DTDs</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=7" title="Edit section: HTML 4.01 DTDs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Strict DTD does not allow presentational markup with the argument that Cascading Style Sheets should be used for that instead. This is how the Strict DTD looks: </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span> <span class="cp"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"</span> <span class="cp"> "http://www.w3.org/TR/html4/strict.dtd"></span> <span class="p"><</span><span class="nt">html</span><span class="p">></span> </pre></div> <p>Transitional DTD allows some older PUBLIC and attributes that have been deprecated: </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span> <span class="cp"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"</span> <span class="cp"> "http://www.w3.org/TR/html4/loose.dtd"></span> <span class="p"><</span><span class="nt">html</span><span class="p">></span> </pre></div> <p>If <a href="/wiki/Framing_(World_Wide_Web)" class="mw-redirect" title="Framing (World Wide Web)">frames</a> are used, the Frameset DTD must be used instead, like this: </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span> <span class="cp"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"</span> <span class="cp"> "http://www.w3.org/TR/html4/frameset.dtd"></span> <span class="p"><</span><span class="nt">html</span><span class="p">></span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="XHTML_1.0_DTDs">XHTML 1.0 DTDs</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=8" title="Edit section: XHTML 1.0 DTDs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/XHTML" title="XHTML">XHTML</a>'s DTDs are also Strict, Transitional and Frameset. </p><p>XHTML Strict DTD. No <a href="/wiki/Deprecated" class="mw-redirect" title="Deprecated">deprecated</a> tags are supported and the code must be written correctly according to XML Specification. </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span> <span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> <span class="cp"><!DOCTYPE html</span> <span class="cp"> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"</span> <span class="cp"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"></span> <span class="p"><</span><span class="nt">html</span> <span class="na">xmlns</span><span class="o">=</span><span class="s">"http://www.w3.org/1999/xhtml"</span> <span class="na">xml:lang</span><span class="o">=</span><span class="s">"en"</span> <span class="na">lang</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span> </pre></div> <p>XHTML Transitional DTD is like the XHTML Strict DTD, but deprecated tags are allowed. </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span> <span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> <span class="cp"><!DOCTYPE html</span> <span class="cp"> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"</span> <span class="cp"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></span> <span class="p"><</span><span class="nt">html</span> <span class="na">xmlns</span><span class="o">=</span><span class="s">"http://www.w3.org/1999/xhtml"</span> <span class="na">xml:lang</span><span class="o">=</span><span class="s">"en"</span> <span class="na">lang</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span> </pre></div> <p>XHTML Frameset DTD is the only XHTML DTD that supports Frameset. The DTD is below. </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span> <span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> <span class="cp"><!DOCTYPE html</span> <span class="cp"> PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"</span> <span class="cp"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"></span> <span class="p"><</span><span class="nt">html</span> <span class="na">xmlns</span><span class="o">=</span><span class="s">"http://www.w3.org/1999/xhtml"</span> <span class="na">xml:lang</span><span class="o">=</span><span class="s">"en"</span> <span class="na">lang</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="XHTML_1.1_DTD">XHTML 1.1 DTD</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=9" title="Edit section: XHTML 1.1 DTD"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>XHTML 1.1 is the most current finalized revision of XHTML, introducing support for <a href="/wiki/XHTML_Modularization" title="XHTML Modularization">XHTML Modularization</a>. XHTML 1.1 has the stringency of XHTML 1.0 Strict. </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><!DOCTYPE html PUBLIC</span> <span class="cp"> "-//W3C//DTD XHTML 1.1//EN"</span> <span class="cp"> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"></span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="XHTML_Basic_DTDs">XHTML Basic DTDs</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=10" title="Edit section: XHTML Basic DTDs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>XHTML Basic 1.0 </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><!DOCTYPE html PUBLIC</span> <span class="cp"> "-//W3C//DTD XHTML Basic 1.0//EN"</span> <span class="cp"> "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"></span> </pre></div> <p>XHTML Basic 1.1 </p> <div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><!DOCTYPE html PUBLIC</span> <span class="cp"> "-//W3C//DTD XHTML Basic 1.1//EN"</span> <span class="cp"> "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"></span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="HTML5_DTD-less_DOCTYPE">HTML5 DTD-less DOCTYPE</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=11" title="Edit section: HTML5 DTD-less DOCTYPE"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/HTML5" title="HTML5">HTML5</a> uses a <code>DOCTYPE</code> declaration which is very short, due to its lack of references to a DTD in the form of a URL or FPI. All it contains is the tag name of the root element of the document, <code>HTML</code>.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> In the words of the specification draft itself: </p> <blockquote cite="http://dev.w3.org/html5/spec/syntax.html#the-doctype"><p><code class="mw-highlight mw-highlight-lang-html mw-content-ltr" style="" dir="ltr"><span class="cp"><!DOCTYPE html></span></code>, case-insensitively.</p></blockquote> <p>With the exception of the lack of a URI or the FPI string (the FPI string is treated case sensitively by validators), this format (a case-insensitive match of the string <code>!DOCTYPE HTML</code>) is the same as found in the syntax of the SGML based HTML 4.01 <code>DOCTYPE</code>. Both in HTML4 and in HTML5, the formal syntax is defined in upper case letters, even if both lower case and mixes of lower case upper case are also treated as valid. </p><p>In <a href="/wiki/XHTML5" class="mw-redirect" title="XHTML5">XHTML5</a> the <code>DOCTYPE</code> must be a case-sensitive match of the string "<code class="mw-highlight mw-highlight-lang-html mw-content-ltr" style="" dir="ltr"><span class="cp"><!DOCTYPE html></span></code>". This is because in XHTML syntax all HTML element names are required to be in lower case, including the root element referenced inside the HTML5 <code>DOCTYPE</code>. </p><p>The <code>DOCTYPE</code> is optional in XHTML5 and may simply be omitted.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> However, if the markup is to be <a href="/wiki/Polyglot_markup" class="mw-redirect" title="Polyglot markup">processed as both XML and HTML</a>, a DOCTYPE should be used.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=12" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Document_type_definition" title="Document type definition">Document type definition</a> contains an <a href="/wiki/Document_type_definition#Examples" title="Document type definition">example</a></li> <li><a href="/wiki/RDFa" title="RDFa">RDFa</a></li> <li><a href="/wiki/XML_schema" title="XML schema">XML schema</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=13" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://www.w3.org/MarkUp/html-spec/html-pubtext.html">HTML2</a> <a rel="nofollow" class="external text" href="https://www.w3.org/TR/2018/SPSD-html32-20180315/#dtd">HTML3</a> <a rel="nofollow" class="external text" href="https://www.w3.org/TR/1998/REC-html40-19980424/sgml/dtd.html">HTML4</a></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype">"The HTML syntax ― HTML5"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2011-06-05</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+HTML+syntax+%E2%80%95+HTML5&rft_id=http%3A%2F%2Fwww.whatwg.org%2Fspecs%2Fweb-apps%2Fcurrent-work%2Fmultipage%2Fsyntax.html%23the-doctype&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-goldfarb-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-goldfarb_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-goldfarb_3-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-goldfarb_3-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-goldfarb_3-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-goldfarb_3-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-goldfarb_3-5"><sup><i><b>f</b></i></sup></a> <a href="#cite_ref-goldfarb_3-6"><sup><i><b>g</b></i></sup></a> <a href="#cite_ref-goldfarb_3-7"><sup><i><b>h</b></i></sup></a> <a href="#cite_ref-goldfarb_3-8"><sup><i><b>i</b></i></sup></a> <a href="#cite_ref-goldfarb_3-9"><sup><i><b>j</b></i></sup></a> <a href="#cite_ref-goldfarb_3-10"><sup><i><b>k</b></i></sup></a> <a href="#cite_ref-goldfarb_3-11"><sup><i><b>l</b></i></sup></a> <a href="#cite_ref-goldfarb_3-12"><sup><i><b>m</b></i></sup></a> <a href="#cite_ref-goldfarb_3-13"><sup><i><b>n</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGoldfarb1990" class="citation book cs1"><a href="/wiki/Charles_Goldfarb" title="Charles Goldfarb">Goldfarb, Charles F.</a> (1990). <i>The SGML Handbook</i>. <a href="/wiki/Oxford" title="Oxford">Oxford</a>: <a href="/wiki/Clarendon_Press" class="mw-redirect" title="Clarendon Press">Clarendon Press</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/0-19-853737-9" title="Special:BookSources/0-19-853737-9"><bdi>0-19-853737-9</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+SGML+Handbook&rft.place=Oxford&rft.pub=Clarendon+Press&rft.date=1990&rft.isbn=0-19-853737-9&rft.aulast=Goldfarb&rft.aufirst=Charles+F.&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-xml-catalog-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-xml-catalog_4-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWalsh2001" class="citation web cs1">Walsh, Norman (2001-08-06). <a rel="nofollow" class="external text" href="https://www.oasis-open.org/committees/entity/spec.html">"XML Catalogs"</a>. The Organization for the Advancement of Structured Information Standards (OASIS).</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=XML+Catalogs&rft.pub=The+Organization+for+the+Advancement+of+Structured+Information+Standards+%28OASIS%29&rft.date=2001-08-06&rft.aulast=Walsh&rft.aufirst=Norman&rft_id=https%3A%2F%2Fwww.oasis-open.org%2Fcommittees%2Fentity%2Fspec.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-clarkxml-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-clarkxml_5-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFClark1997" class="citation web cs1"><a href="/wiki/James_Clark_(programmer)" title="James Clark (programmer)">Clark, James</a> (1997-12-15). <a rel="nofollow" class="external text" href="https://www.w3.org/TR/NOTE-sgml-xml-971215/">"Comparison of SGML and XML"</a>. <a href="/wiki/W3C" class="mw-redirect" title="W3C">W3C</a>. NOTE-sgml-xml-971215.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Comparison+of+SGML+and+XML&rft.pub=W3C&rft.date=1997-12-15&rft.aulast=Clark&rft.aufirst=James&rft_id=https%3A%2F%2Fwww.w3.org%2FTR%2FNOTE-sgml-xml-971215%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110814080220/http://www.freebsd.org/doc/en/books/fdp-primer/sgml-primer-doctype-declaration.html">"The DOCTYPE Declaration"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.freebsd.org/doc/en/books/fdp-primer/sgml-primer-doctype-declaration.html">the original</a> on 2011-08-14<span class="reference-accessdate">. Retrieved <span class="nowrap">2011-09-09</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+DOCTYPE+Declaration&rft_id=http%3A%2F%2Fwww.freebsd.org%2Fdoc%2Fen%2Fbooks%2Ffdp-primer%2Fsgml-primer-doctype-declaration.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/ms256059.aspx">"DOCTYPE Declaration"</a>. <i>msdn.microsoft.com</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=msdn.microsoft.com&rft.atitle=DOCTYPE+Declaration&rft_id=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms256059.aspx&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.w3.org/QA/2002/04/valid-dtd-list.html">"W3C QA - Recommended list of Doctype declarations you can use in your Web document"</a>. <i>www.w3.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">22 March</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=www.w3.org&rft.atitle=W3C+QA+-+Recommended+list+of+Doctype+declarations+you+can+use+in+your+Web+document&rft_id=https%3A%2F%2Fwww.w3.org%2FQA%2F2002%2F04%2Fvalid-dtd-list.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://html.spec.whatwg.org/multipage/xhtml.html#parsing-xhtml-documents">"HTML Standard"</a>. <i>html.spec.whatwg.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">22 March</span> 2019</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=html.spec.whatwg.org&rft.atitle=HTML+Standard&rft_id=https%3A%2F%2Fhtml.spec.whatwg.org%2Fmultipage%2Fxhtml.html%23parsing-xhtml-documents&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype">"The HTML syntax ― HTML5"</a>. <a href="/wiki/Web_Hypertext_Application_Technology_Working_Group" class="mw-redirect" title="Web Hypertext Application Technology Working Group">Web Hypertext Application Technology Working Group</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2011-06-05</span></span>. <q>3. A string that is an ASCII case-insensitive match for the string "DOCTYPE". 5. A string that is an ASCII case-insensitive match for the string "HTML".</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+HTML+syntax+%E2%80%95+HTML5&rft.pub=Web+Hypertext+Application+Technology+Working+Group&rft_id=http%3A%2F%2Fwww.whatwg.org%2Fspecs%2Fweb-apps%2Fcurrent-work%2Fmultipage%2Fsyntax.html%23the-doctype&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20120618203652/http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html">"The XHTML syntax ― HTML5"</a>. <a href="/wiki/Web_Hypertext_Application_Technology_Working_Group" class="mw-redirect" title="Web Hypertext Application Technology Working Group">Web Hypertext Application Technology Working Group</a>. Archived from <a rel="nofollow" class="external text" href="https://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#writing-xhtml-documents">the original</a> on 2012-06-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-09-01</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+XHTML+syntax+%E2%80%95+HTML5&rft.pub=Web+Hypertext+Application+Technology+Working+Group&rft_id=http%3A%2F%2Fwww.whatwg.org%2Fspecs%2Fweb-apps%2Fcurrent-work%2Fmultipage%2Fthe-xhtml-syntax.html%23writing-xhtml-documents&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.w3.org/TR/html-polyglot/#doctype">"Polyglot Markup: HTML-Compatible XHTML Documents"</a>. <a href="/wiki/World_Wide_Web_Consortium" title="World Wide Web Consortium">World Wide Web Consortium</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2012-01-17</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Polyglot+Markup%3A+HTML-Compatible+XHTML+Documents&rft.pub=World+Wide+Web+Consortium&rft_id=http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml-polyglot%2F%23doctype&rfr_id=info%3Asid%2Fen.wikipedia.org%3ADocument+type+declaration" class="Z3988"></span></span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Document_type_declaration&action=edit&section=14" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1235681985">.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style><style data-mw-deduplicate="TemplateStyles:r1237033735">@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style><div class="side-box side-box-right plainlinks sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}</style> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/9/99/Wiktionary-logo-en-v2.svg/40px-Wiktionary-logo-en-v2.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/99/Wiktionary-logo-en-v2.svg/60px-Wiktionary-logo-en-v2.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/99/Wiktionary-logo-en-v2.svg/80px-Wiktionary-logo-en-v2.svg.png 2x" data-file-width="512" data-file-height="512" /></span></span></div> <div class="side-box-text plainlist">Look up <i><b><a href="https://en.wiktionary.org/wiki/doctype" class="extiw" title="wiktionary:doctype">doctype</a></b></i> in Wiktionary, the free dictionary.</div></div> </div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1235681985"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1237033735"><div class="side-box side-box-right plainlinks sistersitebox"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1126788409"> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/60px-Wikibooks-logo-en-noslogan.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/80px-Wikibooks-logo-en-noslogan.svg.png 2x" data-file-width="400" data-file-height="400" /></span></span></div> <div class="side-box-text plainlist">Wikibooks has a book on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/Authoring_Webpages/HTML,_XHTML_and_DOCTYPEs" class="extiw" title="wikibooks:Authoring Webpages/HTML, XHTML and DOCTYPEs">Authoring Webpages/HTML, XHTML and DOCTYPEs</a></b></i></div></div> </div> <ul><li><a rel="nofollow" class="external text" href="http://www.corelangs.com/html/introduction/doctype.html">HTML Doctype overview</a></li> <li><a rel="nofollow" class="external text" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">Recommended DTDs to use in your Web document</a> - an informative (not normative) W3C Quality Assurance publication</li> <li><a rel="nofollow" class="external text" href="http://www.meyerweb.com/eric/dom/dtype/dtype-grid.html">DOCTYPE grid</a> - another overview table <small>[Last modified 27 November 2006]</small></li> <li><a rel="nofollow" class="external text" href="http://www.quirksmode.org/css/quirksmode.html">Quirks mode and transitional mode</a></li> <li><a rel="nofollow" class="external text" href="http://www.quirksmode.org/css/box.html">Box model tweaking</a></li></ul> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐f69cdc8f6‐txx8l Cached time: 20241122152723 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.313 seconds Real time usage: 0.363 seconds Preprocessor visited node count: 4991/1000000 Post‐expand include size: 33328/2097152 bytes Template argument size: 3085/2097152 bytes Highest expansion depth: 16/100 Expensive parser function count: 23/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 51991/5000000 bytes Lua time usage: 0.150/10.000 seconds Lua memory usage: 5143689/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 323.152 1 -total 38.52% 124.481 1 Template:Reflist 30.08% 97.211 10 Template:Cite_web 24.95% 80.635 15 Template:Rp 23.01% 74.373 15 Template:R/superscript 18.84% 60.880 1 Template:Short_description 11.44% 36.984 45 Template:R/where 11.32% 36.566 2 Template:Pagetype 7.44% 24.046 2 Template:Sister_project 7.00% 22.636 2 Template:Side_box --> <!-- Saved in parser cache with key enwiki:pcache:idhash:40042954-0!canonical and timestamp 20241122152723 and revision id 1215352676. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Document_type_declaration&oldid=1215352676">https://en.wikipedia.org/w/index.php?title=Document_type_declaration&oldid=1215352676</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:XML-based_standards" title="Category:XML-based standards">XML-based standards</a></li><li><a href="/wiki/Category:SGML" title="Category:SGML">SGML</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 24 March 2024, at 16:45<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Document_type_declaration&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-2l27l","wgBackendResponseTime":137,"wgPageParseReport":{"limitreport":{"cputime":"0.313","walltime":"0.363","ppvisitednodes":{"value":4991,"limit":1000000},"postexpandincludesize":{"value":33328,"limit":2097152},"templateargumentsize":{"value":3085,"limit":2097152},"expansiondepth":{"value":16,"limit":100},"expensivefunctioncount":{"value":23,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":51991,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 323.152 1 -total"," 38.52% 124.481 1 Template:Reflist"," 30.08% 97.211 10 Template:Cite_web"," 24.95% 80.635 15 Template:Rp"," 23.01% 74.373 15 Template:R/superscript"," 18.84% 60.880 1 Template:Short_description"," 11.44% 36.984 45 Template:R/where"," 11.32% 36.566 2 Template:Pagetype"," 7.44% 24.046 2 Template:Sister_project"," 7.00% 22.636 2 Template:Side_box"]},"scribunto":{"limitreport-timeusage":{"value":"0.150","limit":"10.000"},"limitreport-memusage":{"value":5143689,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-f69cdc8f6-txx8l","timestamp":"20241122152723","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Document type declaration","url":"https:\/\/en.wikipedia.org\/wiki\/Document_type_declaration","sameAs":"http:\/\/www.wikidata.org\/entity\/Q5372118","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q5372118","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2004-11-21T22:26:53Z","dateModified":"2024-03-24T16:45:30Z","headline":"instruction that associates a particular SGML or XML document with a document type definition (DTD)"}</script> </body> </html>