In this lesson, the basic HTML 5 template will be introduced. Every Html 5 layout should follow this basic structure.
Let us have a look at some of the elements.
- The HTML 5 Document must start with a declaration element:
<!doctype html>
- The HTML tag open and closes the document
<html></html>
- The head tag defines the head of the document. Other tags are included in this tag such as title and meta.
<head> </head>
- The title tag is used to define the title of the page or document. The title will be displayed in the browser tab
<title> </title>
- The meta tags are used to describe the page. This will help google and other search engines find your page.
<meta name="description" value="">
<meta name="keywords" value="">
- The body tag will hold the content of the page.
<body> </body>
Here is a full example below:
<!doctype html>
<html>
<head>
<title>Wecode101 HTML Page</title>
<meta name="description" content="the first page">
<meta name="keywords" content="lesson html5 page template">
</head>
<body>
This is a lesson about creating a basic html 5 template
</body>
</html>