The DOCTYPE element in HTML


 Declare the DOCTYPE of an HTML Element:

  • There are a few elements in the HTML that gives overall structure to your page and should be included in every HTML document.
  • At the top of your document, you need to tell the browser which version of HTML your page is using.
  • HTML is an evolving language and is updated regularly.
  • Most major browser support the latest specification, which is HTML5.
  • However, older webpages may use previous versions of the language.
  • You tell the browser information by adding the <!DOCTYPE  version> tag on the first line.
  • For HTML5 you use <!DOCTYPE html>.
  • Note the ! and the uppercase DOCTYPE is important, especially for older browsers.
  • The HTML is not case sensitive.
  • The standard format of a HTML page is:
  •  

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>

</body>
</html>






No comments:

Post a Comment