Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

!doctype

Description

The !doctype element for HTML declares the type of document.

It is case-insensitive and placed at the start of the document.

Syntax

<!doctype top-element availability "registration//organization//type label definition//language" "uniform-resource-locator">
NameDefaultDescription
top elementhtmltop-level element
availabilityPUBLICformal public identifier (FPI) is a publicly accessible object or a system resource
PUBLIC specifies a publicly accessible object
SYSTEM specifies a system resource, such as a local file or URL
registration+registered by the International Organization for Standardization (ISO)
+ specifies registered
- specifies not registered
organizationOwnerID, a unique label indicating the name of the organization responsible for creation and maintenance of the DTD
typeDTDpublic text class, the type of object being referenced
labelHTMLpublic text description, a unique descriptive name for the public text being referenced
definitiondocument type definition (DTD)
Strict specifies non-depreciated and non-frame elements and attributes
Transitional specifies depreciated and non-frame elements and attributes
Frameset specifies depreciated and frame elements and attributes
languageENpublic text language, the natural language encoding system used in the creation of the referenced object
uniform resource locatorlocation of the referenced object

HTML 4

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

HTML 4.01

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

HTML5

<!doctype html>

XHTML 1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML 1.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

XHTML Basic 1.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">

Examples

a

abbr

address

area

article

aside

audio

b

base

bdi

bdo

blockquote

body

br

button

canvas

caption

cite

code

col

colgroup

data

datalist

dd

del

details

dfn

dialog

div

dl

dt

em

embed

fieldset

figcaption

figure

footer

form

h1

h2

h3

h4

h5

h6

head

header

hgroup

hr

html

i

iframe

img

input

ins

kbd

label

legend

li

link

main

map

mark

menu

meta

meter

nav

noscript

object

ol

optgroup

option

output

p

param

picture

pre

progress

q

rb

rp

rt

rtc

ruby

s

samp

script

search

section

select

slot

small

source

span

strong

style

sub

summary

sup

table

tbody

td

template

textarea

tfoot

th

thead

time

title

tr

track

u

ul

var

video

wbr

Web Hypertext Application Technology Working Group (WHATWG)

HomeMenu