TIP

Remember tags usually come in opening and closing pairs. The analogy of the structure of a HTML page as "onion skin" is good to remember when entering code for your webpage.

TIP
If you are viewing this page in Internet Explorer you will probably here a looping sound. This is a wav sound. Look at the code and you can place your own wav file into your web page. The "Loop' part of the tag can be any number you wish to loop the sound. Placing infinite or -1 will make the sound continuous.

Glossary

HTML Hypertext markup language - the code which is used to construct everything seen on a webpage.

 

home

HTML Code

Some Useful HTML tags and key attributes
A Quick Reference Guide

Comments:


  1. Tags usually come in pairs - the first tag of the pair turns the property on, the second tag of the pair turns it off.
  2. The first tag in the document is usually <HTML> and the last tag is </HTML>
  3. The information between the <HEAD>...</HEAD> tags is the header part of the HTML document, so comments here are not intended to be displayed in the body of the browser screen.
  4. The comment between the tags <TITLE>...</TITLE> is part of the header, so it does not appear in the body of the document, but appears in the little strip at the top of your browser screen.
  5. The Title of this page is Some Useful HTML Tags and is displayed in the strip at the top of the browser.
  6. Tags should be turned off in the reverse of the order in which they were turned on - that is, last on should be first turned off. For example:
    <font face="Arial"><B><U><I> this is Arial, bold, underlined and italic.
    </I></U></B> </FONT> .
    Unless you follow the convention you will create nesting errors and confuse some browsers.
  7. You must use the American spelling of CENTER - the Australian spelling of CENTRE isn't recognised by the browser. Similarly, you must use COLOR instead of COLOUR.
  8. To see the text and tags of this document, you should view the document source.


<HTML>...</HTML> defines the page as an HTML document
<HEAD>...</HEAD> head of the document
<TITLE>...</TITLE> the document title
<BODY attribute= > ... </BODY> body of the document
background=" ... " background image
bgcolor="#rrggbb" background colour
text="#rrggbb" colour of page text
link="#rrggbb" colour of links
vlink="#rrggbb" colour of visited links
alink="#rrggbb" colour of links while clicked on
<p attribute>...</p> a paragraph
align=center centres the paragraph
<center>...</center> centres the elements
<br> insert a line break
<hr attribute= > insert a horizontal line
size= thickness of the line
width= length of the line as a % of screen width
<strong>...</strong> strong type, commonly bold
<b>...</b> bold type
<em>...</em> emphasised text, usually italics
<i>...</i> italic text
<kbd>...</kbd> fixed width typewriter font
<tt>...</tt> typewriter (courier) font
<basefont size= > sets font size for the entire page
<font attribute=>...</font> sets font attributes
size= font size, range 1-7, default is 3, can use size=+5
color="#rrggbb" font colour
<blink>...<blink> text blinks continually
<address>...</address> small italic text used for author details
<blockquote>...</blockquote> a long quote
<h1>...</h1> heading text, level one (also h2-h6 are possible)
<!-- comment --> a comment hidden in the document
<img src=" ... " > filename or URL of an image
align= align text to left, right, top, middle, center, bottom of image
vspace= space above and below image
hspace= space to the left and right of image
width= width of image in pixels
height= height of image in pixels
alt=" ... " show text instead of image for text browsers
<a href="http://www.... "> ... </a> creates hyperlink to another address or file
<ul>...</ul> an unordered list
<ol>...</ol> an ordered list
<li> a list item
<dl>...</dl> definition or glossary list
<dt> definition term
<dd> definition description
<table attribute>...</table> defines a table
width= width of the table on the page
cellpadding= space between the table border and inside text
border= width of the table border, 0 = no border.
<tr attribute>...</tr> creates a table row
valign= vertical alignment of the row's contents
<td attribute>...</td> creates a table cell
valign= vertical alignment of the cell's contents
colspan= number of columns a cell will span
rowspan= number of rows a cell will span
width= width of the cell in the table
bgcolor="#rrggbb" cell background colour

 


 

Go to the previous page.
Go to the next page.
Go to the Home page.

Copyright © 1998 Schoolsnet Australia Pty Ltd. All rights reserved.