HTML – Displaying a document

After creating or as you create your web page, you should view your page at least one browser to detect any errors. If your webpage does not look the way you expect, then, you should make the necessary changes to correct any problem.

In this section, we will display a basic web page:

Figure 1 - A simple web page with basic tags

As the web page shows, the content of the title tag is displayed on the top of the web page in the blue bar of Internet Explorer. If you wanted to have "My First Web Page" appear in the title bar, your title tag will look like :

<title>My First Web Page</title>

Next, figure 1 shows the location of the web page. The address box shows the web page is located at "C:\HTMLExamples\basic-page.htm".

But why is it important to know where a web page is located? So you can view the web page in a browser. In this example, the webpage is saved to a local C drive in the HTML Examples folder.

To access the web page, first you would open the C: drive and then the HTML Examples folder. Finally, you will click on the web page file you want to open.

Finally, the web page shows the content that is placed inside the body tag. Suppose you want to display the following text (with a white background) on a web page:

Before a webpage can be viewed in a browser, it must be saved.

To display that text your body tag will look something like this:

<body>Before a webpage can be viewed in a browser, it must be saved.</body>

In summary, the title tag contains the title information of a web page. The body tag contains the content of the web page. Once a web page is saved, it can be viewed by double-clicking on the web page file. Alternatively, you can type the location of the web page in the address box.

SOURCE

LINK

LANGUAGE
ENGLISH