Understanding Tags and Structure

So, you've now created your first webpage. Lets take a look at what we've actually created.

You wrote this into an html document:

(source)

Your First Webpage:

<html>
<head>
<title>My First Webpage</title>
</head>
<body>
Hello World!
</body>
</html>

And when you opened it in a web browser, you got this:

(results)

Your First Webpage:

Hello World!

What happened to everything else? What are the words inside the angley brackets?

The XHTML Tag

The words inside the angley brackets are called tags. The webpage you just created uses the following tags: <html>, <head>, <title>, and <body>. The reason you don't see a tag when you open it in your browser is because tags are instructions to your browser. Tags do many things, including change font and colors, add hyperlinks, images, and much more.

You browser needs to know where instructions end. Therefore, all tags must be closed. The tags with the slashes before them, e.g. </html>, are closing tags. They tell your browser where to stop the specified instruction.

Lets quickly review the tag:

Definitions of the four tags we've used: