HTML <!DOCTYPE> Tag
Description
The HTML <!DOCTYPE>
tag is used for specifying which language and version the document is using. This is referred to as the document type declaration (DTD).
With the introduction of HTML 5, the <!DOCTYPE>
tag is mostly useless, as HTML 5 does not require a reference to a DTD. Having said that, for legacy reasons, the HTML 5 specification recommends including the header at the top of all HTML documents.
Properties
- Permitted Parents
- -
- Content
- -
- Start/End Tags
- -
Example
<!DOCTYPE html>
<html>
<head>
<title>Document Title</title>
</head>
<body>
<p>Document Contents</p>
</body>
</html>
Attributes
None
Global Attributes
None
Event Attributes
None
Browser Support
Desktop | |||||
Yes | Yes | Yes | Yes | Yes | Yes |
Tablets / Mobile | |||||
![]() |
|||||
Yes | Yes | Yes | Yes | Yes | Yes |
Last updated by CSSPortal on: 6th December 2019
HTML Tags
- a
- abbr
- address
- area
- article
- aside
- audio
- b
- base
- bdi
- bdo
- blockquote
- body
- br
- button
- canvas
- caption
- cite
- code
- col
- colgroup
- comment
- datalist
- dd
- del
- details
- dfn
- dialog
- div
- dl
- doctype
- dt
- em
- embed
- fieldset
- figcaption
- figure
- footer
- form
- h1
- h2
- h3
- h4
- h5
- h6
- head
- header
- hr
- html
- i
- iframe
- img
- input
- ins
- kbd
- keygen
- label
- legend
- li
- link
- map
- mark
- menu
- meta
- meter
- nav
- noscript
- object
- ol
- optgroup
- option
- output
- p
- param
- picture
- pre
- progress
- q
- rp
- rt
- ruby
- s
- samp
- script
- section
- select
- small
- source
- span
- strong
- style
- sub
- summary
- sup
- table
- tbody
- td
- textarea
- tfoot
- th
- thead
- time
- title
- tr
- track
- u
- ul
- var
- video
- wbr