It is used to create a reference to a Document Type Definition. In HTML 5, Doctype declaration is only needed to enable a standard mode for documents which are written with the HTML syntax. Hence, the Doctype for HTML 5 is short and case-insensitive.

  • <!DOCTYPE html>
  • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "">
  • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
  • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "">
  • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
BY Best Interview Question ON 12 Mar 2020