First webpage guide
  1. First webpage
  2. Second webpage
  3. Summary

Your second webpage

Your first webpage contained several parts, most of which were sorrounded by the < and > symbols. In HTML, anything sorrounded by < and > is called a tag. For example, the <h1> tag which sets text to appear in a big heading size.

Tags explained

Two tags that are required for every webpage are <html> and <body>, so these are the tags the most basic webpage will consist of.

As basic as it gets:
<html> <body> Here is some text </body> </html>

The <html> tag signifies the beginning of an HTML document. The <body> tag signifies the beginning of the content on a webpage.

Closing tags

The two tags at the end of the above example - </body></html> are closing tags. Closing tags signify the end of a section of a webpage created by their associated opening tags. So everything between <body> and </body> is the content and everything between <html> and </html> is the entire HTML document.

An "/" character is placed inside a tag one space after the "<" character to specify a closing tag. So for example, the opening tag for the content on a webpage is <body> and its closing tag is </body>.

NOTE: Always close tags in the right order. In the above example, the <body> tag is opened inside the <html> tag, so the <body> tag must be closed before the <html> tag is closed. HTML tags follow a logical order that needs to be kept consistent.

Creating your second webpage

At this point, you have created a webpage and have a little bit of understanding of how HTML works, so lets now build your second webpage..this time with a little more complexity!

Create, save, and view your second webpage the same way you did with your first webpage.

Copy the following HTML code into notepad and save the file:

<html> <head> <title>My second webpage!</title> </head> <body> <h1>This is my second webpage!</h1> <p>This is a paragraph</p> </body> </html>

NOTE: The webpage may not function correctly if you don't copy the code exactly as it is here, so please make sure to do that.

Viewing your second webpage

When you view your second webpage in the browser this is what you should see:

Second webpage

Did it work? If not, please review the steps to create a webpage carefully and make sure that you follow each one exactly as stated.

The tags on this page are discussed in the First webpage guide summary along with other useful info.

© Copyright 2013-2014 Landofcode.com
Terms of use | Privacy policy | Copyright information