The Basics of HTML


Format of HTML Pages

All HTML pages follow a pattern. They all have a head and a body to them. Not literally of course. The following shows the basic format for HTML pages:
<html>
<head>
</head>
<body>
</body>
</html>


Now you may and probably will be confused about this. What are the <'s and >'s doing there you may ask. In HTML, whatever you put between the <'s and >'s is called a tag. These tags define the content of HTML. Lets take a look at the <html> tag. This tag says whatever is after this is html code, not some other type of code. When you put a </html>, it ends the tag and anything after that is not affected. Lets take a look at the <head> tag. Whatever is after this tag describes the format of the page such as the type of text color the page has and other things like that. The </head> finishes the head head tag. The head tag may be confusing now because its contents are somewhat advanced but don't worry because everything will be covered in later chapters. The <body> tag may be easier to grasp though. This tag explains the content of the website. For example, in this tag you would say that there will be a picture in the website and some text or something like that. The </body> finishes the <body> tag.
Remeber:The data that you put in the tags has to go in between the <> and </>. For example:
<html>
<head>
</head>
<body>
<p>Hello</p>
</body>
</html>

You really don't need to worry about what that means, just remeber that the data goes in between the <> and </>.


In This Chapter...

In this chapter, you have learned the basic structure of an HTML page and what is expected to be in it. In the next chapter, you will make your first webpage and learn how to make text and other fun things. Now, for the quiz.


Quiz


In this quiz, you will have to say what is wrong with the HTML that is written. As always the answers are on the bottom in white text so just highlight them to see the answers.


1. <body>
aa<body>

2. <head>
aa<html>
aa</head>
aa<body>
aa</body>
aa</html>

3. All of you people out there must realize how lazy I actually am. I will eventually finish this last question, just when I feel like it.


Answers


1. The second <body> needs to have the / so it should be changed to </body>.

2. The <head> tag should be after the <html> tag not after it.


The next chapter will definately be a lot of fun for all of us. We will be experimenting with different texts so just click the link to go to:

Text and Stuff