Basic HTML5 Structure

In this article I’ll show you the basic structure of an HTML5 Document. Look at the following code, which is a very basic example of an HTML5-page.

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>
			This Text will be shown as the Browsers Tab Heading
		</title>
	</head>
 
	<body>
		Here comes the HTML, which will be displayed in the browser.
	</body>
</html>

In the first line you’ll find the DOCTYPE

<!DOCTYPE html>

This tells the browser that the document contains HTML5 markup.

The HTML document starts width <html> and ends with </html>.

Between the HTML-Tags you can see the <head>-Section.
The <head>-Section contains document-wide information like meta-tags, the <title> or some CSS or Javascript-includes.

Next is the <body>-Section.
The <body>-Section contains all the HTML, which will be displayed in the browser.

(Visited 74 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

*