Back

HTML in 60 Seconds

The Document Type tag is important. While your html document will likely render on a modern web browser, it's better to get the benefits of telling your browser what standards to use. In 2019, HTML5 is currently the most modern standard. Previous versions of HTML can still be used with modern browsers, but in all cases the Document Type tag is required if you wish to make sure the browser uses the rules designed for the version of HTML you used to create your document.

The tag actually looks like this: <!DOCTYPE html>

It should be the very first line of your document. A few more tags to get you started include:

The html open and closing tags - for the beginning and end of your document: <html></html>

The head open and closing tags - this is where you might include linking tags to style and script documents: <head></head>

The title open and closing tags - the title tag tells the browser the name of the page and is the text most often used to identify your page when it is bookmarked: <title></title>

The body open and closing tags - this is where the content of your page generally belongs: <body></body>

You may have noticed that these tags include open and closing tags, but the Document Type tag did not. It is not necessary to close the Document Type tag. There are a few other tags in html that do not require a closing tag, but that is a subject for another post.

The Summary: An example html document.

<!DOCTYPE html>
<html>
<head>
<title>An Example Document</title>
</head>
<body>
This is the simplest example of an html document I can produce.
</body>
</html>