Welcome Guest! (App Version 3.1)
IntroductionHTML Tutorial What is HTML? My First Program in HTML Doctype Types of Elements Block Elements Inline Elements
Box ModelWhat is Box Model Content in Box Model Padding in Box Model Border in Box Model Margin in Box Model
HTML TagsDiv Tags H1 to H6 Tags Paragraphs Tags Span Tags Bold Tags Italic Tags
HTML UtilitiesAdding Images Adding Hyperlinks Adding Comments Types of Lists Tables Iframes Breaking Lines Horizontal Line
FormsForms in HTML Text-Box Radio Checkbox Select and Option Text Area Button Submit
HTML 5What is new in HTML5 Syntax Changes New Elements & Properties Semantic Tags New Elements New Input Types Graphics Support Canvas SVG Media Support Audio Video Client Side Storage Local Storage Session Storage Indexed DB Web SQL [dep] Cookies API Support Web Worker Web Sockets Service Worker App Cache [dep] SSE Drag & Drop Geolocation
HTML QuizHTML Quiz 1
However, it is not compulsory to add a doctype to your web page but while making professional websites it helps in rendering the web pages correctly (by the browser), depending on the doctype declaration you made for that particular HTML page.
Doctype declaration helps the browser (eg: chrome or firefox) to understand what version of html are you using for your web pages, and what protocols are to be followed to render these web pages correctly.
The following table shows various doctype versions and their implementation codes:
|HTML 4.01||<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">|
|XHTML||<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">|