HTML5 Doctype

In HTML5, you can just use the following Doctype before the <html> tag.

<!DOCTYPE html>

Quote from W3Schools

The declaration must be the very first thing in your HTML5 document, before the tag.

The declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

In HTML 4.01, all declarations require a reference to a DTD, because HTML 4.01 was based on SGML.

HTML5 is not based on SGML, and therefore does not require a reference to a DTD.


To start a HTML5 page, you can use the following template.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
  </head>
  <body></body>
</html>

 

Done =)

Reference:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s