Her

Home HTML and CSS Tutorials The HTML Structure

The HTML Structure

Author: Pulse GFX Author's URL: pulsegfx.net More by this author

HTML stands for Hyper Text Markup Language. HTML is the basics of web-design and although you are limited to what you can do with it, it is still a great type of coding. Many other people you ask my disagree but in my opinion HTML rocks and is pretty easy to learn!

The HTML Structure

Okay we shall now begin! First off open up a text editor of some sort i.e Notepad. Then copy this into the text editor:

<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is my first go at HTML. Pulse GFX rules!</p>
</body>
</html>

The HTML StructureLets anaylse this HTML structure! The following structure above is the basic structure a HTML document must follow. If it isn't in this structure you could end up getting random errors and also you would not be coding HTML properly! Let's look at each part of this structure:

<html> This tag tells the browser that the beginning of a HTML document starts here. The </html> tag would tell the browser that the HTML document ends there.

<head> This tag would include all the header information that is on that html page. For example the title of the webpage of would go between the <head> tag because it is information that the browser needs to pick up and does not need to be seen by the user. Anything between the <head> tag can not be seen on the actual HTML page. The </head> tag tells the browser that any information after this point needs to be displayed.

<title> This tag is used to add a title name to your HTML pages. For example if you want to call you page, My Favorite Movies. You would simply place that between the <title> tag. Once you've finished your title name you would close it with the </title> tag to tell the broswer that the title text has ended.

<body> This tag is where all of your content that you wan't displayed should go. The browser would look out for this tag in your HTML structure so it knows what it needs to display! Once your content is finished you would close it up with the </body> tag.

Okay so now you know a little bit about a classic structure of a HTML page. Now it's time to save the HTML you've copied and make it into a webpage. You can simply do this by saving the document and then adding the correct file extenison. So save your text document and call it something like "myfirstpage" and then add onto that a HTML file extension...

.htm or .html?

To make a correct HTML webpage you can either use the .htm file extension or the .html file extension. I'd recommend using the .html file extension, because although both file extensions do exactly the same thing, .htm was around when only 3 character extensions were around and therefore .htm was the answer. But now it is bad practice to use .htm so get used to using .html!

Lower case or Upper case?

All of your HTML should be in lower case. Using upper case doesn't usually affect your coding result, but by using upper case your not following standards and your coding is defined as not valid, although it works your still not valid.