Let's learn the basic layout of an HTML file.
Before we can start with creating a website, we have to know how to declare which version of HTML we are using.
Here is the basic layout of an HTML file:
1
2
3
4
5
6
7
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
Now let's break this down line-by-line.
<!DOCTYPE html>
This delcares the version of HTML.
'!DOCTYPE' is the document type, and 'html' is the name of HTML 5.0.
<html>
</html>
'html' is the entire webpage, it's where you would store everything.
<head>
</head>
'head' is just where you would put information about your sites in.
<body>
</body>
'body' is where you would put everything that you want to be on your webpage.
Below is what you would see in a basic website.
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<html>
<head>
<title>Genius Hour</title>
<meta charset="UTF-8">
</head>
<body>
<div class="main">
<h2>Lorem ipsum.</h2>
<p>Aliquam erat volutpat. Integer ut augue quam. Sed fermentum posuere.</p>
</div>
</body>
</html>
Who would like to try to explain everything within this website?
Does everybody here understand the basics? If not I can explain this further.