The basic webpage

School of Geography, University of Leeds


Web pages are text files composed of content (text, links, etc.) and <tags> which tell the web browsers what the content's format and position should be. These files are put in a special directory that is known by the webserver software. The webserver software sends out the pages when people ask to look at them using a web browser.

The tags are known as a 'HyperText Markup Language' or 'html', the specifications for which are controlled by the World Wide Web Consortium. These pages will give you an overview of the most useful of these tags, but it won't take long before you'll want to know more, and you might want to look at the useful sites page for information about learning the full html.

There are very few essential tags. The most basic page looks like this...

<HTML>
 
<HEAD>
  <TITLE>Some title</TITLE>
</HEAD>
 
<BODY>
  Some content
</BODY>
 
</HTML>
Notice that the tags come in pairs which enclose the areas they affect. They aren't case senstive yet, but will be soon - so use upper case for the tag names. The <HTML></HTML> tags tell the browser that the content is formatted with html. The <HEAD></HEAD> tags enclose an area which isn't usually shown in the browser window. This contains information describing the page, for example, the <TITLE></TITLE> which is usually displayed in the top bar of the browser.
Picture of Netscape title bar
The content you want displayed is placed between the <BODY></BODY> tags.

Try typing the basic page outline above into whatever editor you are using. If you are in a windows environment you can probably copy and paste it straight out of the browser screen. Save this into a directory as a standard text file, but call it 'index.html' rather than say 'index.txt'.

Then open the file using your browser. There should be an option for opening files stored on your computer in one of the browser menus. In Internet Explorer this is in the 'File' menu under 'Open...' and then 'Browse...'. You will hopefully see this. Use your browser's 'back' button to come back here.

The file containing your page should always be one of the standard text formats, should have no spaces in the filename, and should be suffixed with '.htm' or (better) '.html'.

If you want to see how any page is coded (a good way to learn) then somewhere on one of your browser's menus will be an option to look at the page's 'Source Code' or 'Page Source'. On Internet Explorer right-click on page and select 'View source'.


Go on to formatting text.

[School of Geography homepage] [Leeds University homepage]