Back to index

BASIC TAGS


Here is a simple page of html code:
< html>
< body>
< center>
< h1> Page Title</h1>
< hr size=5 color=yellow>
< code> Here is a brief message.< br>
< /code> Here are some more words.
< /body>
< /html>
Click on this link to see simple page

Now inspect that page (click the above link) and study its source code. You can do that by right clicking and pulling down to source or by pulling down to source from the view menu. Make sure you understand how each tag (those are the things between the greater than and less than signs) produces the results on the page.


You will notice in the sample code above that some of the coding was placed in red areas on the page. For convenience, your instructor refers to these areas as red zones. Every page you create should include these tags in the red zones. They signal to the browser that it is dealing with a web page. Leaving out certain items in the red zone will cause certain aspects of certain pages not to function correctly. There are optional lines that can be added to the red zones, but the red zones shown here should be considered the least you should have in these parts of an HTML page. So, get in a habit of always including the red zones before you do anything else!!!

HEADINGS and BODY TAG

The body tag has the following attributes: bgcolor, text, link, and a bunch more. For now all we will concern ourselves with is bgcolor and text. You can set the color for the text and background color as follows:
< body bgcolor=red text=black>

HEADINGS- Headings are used mostly to title pages, sections and subsections within pages. H1, H2, H3, H4, and H5 are available sizes. To use them they must be placed between the lesser than and greater than symbols AND you close them in the usual way.

Click here to see sample page


NEW LINES - The < br> and < p> tags can be used to start new lines. The BR tag simply goes to the next line on a webpage, while the P tag places a blank line above the next line where text will appear.

It is proper syntax to always open and close your HTML tags, but you can get away without doing this with the P and CENTER tags in most situations. Also you never need to close the BR tag.


ASSIGNMENT: At this point you have enough information to be able to code a simple webpage using HTML. Here's what it needs to look like:
  • It will be divided into three sections.
  • There will be an approprite, overall title at the top of the page.
  • Each section will have an appropriate section title.
  • Appropriately use heading tags for each title.
  • Separate each section using HR tags.
  • TOPIC: Places you have visited or would like to visit. Each section will be about a different location. Sixty word MINIMUM per section.