All HTML documents must start with this tag before the <html> tag.(type declaration)
☛
Used to specifying which version of HTML the document is using.
☛
It gives instruction to browser about what version of
HTML the page is written in.
☛
It's not case sensitive, all cases are acceptable as <!DoCtYPE HtmL>
☛
The <!DOCTYPE> tag does not have an end tag </!DOCTYPE> .
☛
Referred to as the document type declaration (DTD) (DTD specifies the rules for the markup language).
☛
HTML 4.01 was based on SGML follow DTD
☛
HTML5 is not based on SGML, and therefore does not fully follow DTD
☛
In HTML5 there is only one declarations
<!DOCTYPE html>
☛
In HTML 4.01 there are 3 possible declarations
1.HTML 4 Strict :- Includes all HTML elements/attributes except deprecated elements and those that appear in frameset
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
//EN" "http://www.w3.org/TR/html4/strict.dtd">
2.HTML 4 Transitional :- Includes all HTML elements/attributes including those that have been deprecated.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional //EN" "http://www.w3.org/TR/
html4/loose.dtd">
3.HTML 4 Frameset :- Includes all HTML elements/attributes in the transitional DTD & allows the use of frameset content.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Frameset //EN" "http://www.w3.org/TR/html4/
frameset.dtd">