DOCTYPE html
w3hello.com logo
HTML Basics
What is HTML
Introduction to HTML
HTML Introduction, What is HTML
What is XHTML
What is Attributes in HTML
HTML Formatting
Bold and Italics in HTML
HTML Heading
HTML Elements
HTML Standard Fonts
XHTML vs HTML
HTML DOCTYPE
HTML Forms
HTML Head
HTML Comments
HTML Form
HTML Table
HTML Input Types
HTML Image Links
HTML Text Links
HTML Colors
HTML Title
HTML Paragraphs
HTML Frames
HTML Anchor
DOCTYPE html
HTML Charset
HTML URL Encoding
HTML Backgrounds
HTML Image
HTML Text Formatting
HTML Tables
HTML Basic
HTML Color Names
HTML Input Attributes
HTML Meta
HTML Paragraph
HTML Images
Why use XHTML
HTML global attribute spellcheck
Styling the HTML5 Tags
HTML Computer Code Elements
HTML Layout
HTML Entities
HTML Headings
HTML Symbols
XHTML Tips and Tricks
HTML Form Layouts
HTML Table Vs Div Based Layouts
HTML Drag and Drop
HTML Unordered List | HTML Bulleted List
Discuss XHTML
HTTP Status Codes - List of Standard Server Response Codes
HTML global attribute dir
HTML Attributes
HTML Form Elements
HTML Iframes
500+ HTML Color Names
HTML SVG
HTML tables - cell alignment, colours, images
HTML Lists
HTML YouTube Videos
How to create a basic html template
HTML Google Maps
HTML Quick Guide
XHTML Quick Guide
Spinners and Sliders in HTML 5
HTML Blocks
HTML Layouts
MIME Media Types
HTML Reference: Special Characters
HTML Exercises
HTML global attribute lang
Getting Started with Tags in HTML and HTML5
HTML Block and Inline Elements
XHTML Introduction
Working with HTML Head Elements
XHTML Useful Resources
Adding captions to images in HTML
HTML 5 Video and Audio
Execute HTML Online
HTML Overview
HTML Video
XHTML Doctypes
HTML 5 Form Elements
учебное руководств HTML
HTML5 Tables
HTML Multimedia
HTML Audio
HTML global attribute data-*
A simple one column layout with HTML5
HTML global attribute contenteditable
HTML global attribute accesskey
HTML Email Links
HTML Ordered, Unordered, and Definition Lists
HTML Style Sheet
HTML Styles
XHTML Summary
HTML global attribute draggable
HTML Character Encodings
HTML Basics
Previous : HTML Anchor Next : HTML Charset

DOCTYPE html


On the HTML document you have often seen that there is a <!DOCTYPE html> declaration before the <html> tag. This <!DOCTYPE html> declaration is not an HTML tag. It is used to instruct the web browser about the HTML page.

Actually, there are many type of HTML e.g. HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, XHTML 1.1 etc.

The <!DOCTYPE> declaration refers Document Type Declaration (DTD) in HTML 4.01; because HTML 4.01 was based on SGML. But HTML 5 is not SGML based language.

DTD defines the rules for the markup languages so that the browsers recognize the content correctly.

The doctype declaration differs between HTML versions. The HTML 5 doctype declaration is given below.

<!DOCTYPE html>

Let's see an example of HTML document with doctype declaration.

Note: It is always a good practice to add a declaration to your HTML documents to enable web browser to recognize that what type of document to expect.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<!DOCTYPE>YesYesYesYesYes

Note: DOCTYPE declaration is not case sensitive.

Previous : HTML Anchor Next : HTML Charset
© Copyright 2018 W3Hello Publishing Limited. All rights reserved.
Contact us | Sitemap