This page is designed to give the reader an insight and basic understanding of HTML.
Pages are easily created or edited in Windows Notepad or any ASCII Text Editor.
Once created, a page should be saved with an .HTM or .HTML Extension. This page was written entirely in Windows Notepad.
Index
<HTML> This tells the browser that it is dealing with an HTML Document
The Header Tag is an easy tag to explain and use. The header for this section was set as follows :
<H2>Section Headings</H2>
but the 2 could have been any number between 1 and 6, 1 being the largest header. You can use text formatting to alter the appearance of the header and this will be explained later.
<HEAD> This sets the header area and appears to be not always necessary
<TITLE>Beginners HTML (Page Title)</TITLE> This sets the Title which is displayed in the header of the browser. (If you're not using FRAMES)
</HEAD>
<BODY BGCOLOR="#RRGGBB"> This sets the looks of the page and can contain many instructions that will be dealt with later.
</BODY> This sets the end of the displayable part of the page
</HTML> This sets the end of the document.
Back to top of Page
Section Headings
The colour statement is formatted in one of two ways : ="#RRGGBB". The colour is set using Hexidecimal Code or Hex for short, which consists of a number system to the base 16. There are 16 symbols used which are : 0123456789ABCDEF
Each colour is set using three Hex pairs, i.e. RED is set as
You may, if you know the correct name of the colour you want, use the colour name. <FONT COLOR="GREEN">GREEN</FONT>
If you use the name of the colour, you are limited to the following only: BLACK, GRAY, SILVER, WHITE, RED, GREEN, BLUE, MAROON, PURPLE, OLIVE, LIME, AQUA, NAVY, YELLOW, TEAL & FUCHSIA.
If, when typing a line of text, you wish to make a temporary colour change then you may use the following :
<FONT COLOR="#RRGGBB">text that you want to change colour here</FONT>.
The </FONT> tag tells the browser to revert to the previously used colour, which may not be the page default colour !
The <P> Tag (New Paragraph) is one of the more versatile as you can add commands to the Tag to align text to the LEFT, CENTRE, RIGHT or JUSTIFY. For example,
The <P> Tag only requires the </P> Tag when you insert commands inside the Tag and you want to revert to the normal format. For a normal New Paragraph <P> on it's own will suffice.
Another way of displaying text in the centre of the page is to use the
<FONT COLOR="FF0000">Body Tag Settings
You can set the colour of the following, by inserting statements in the <BODY> Tag
Our BODY Tag could well look like this : Temporary Colour Change
Back to top of Page
Formatting and Aligning Text
There are several things you can do to TEXT to make it stand out or to position it on the page.
<P ALIGN=LEFT></P>
<P ALIGN=CENTER></P>
<P ALIGN=RIGHT></P>
These placed around the text you wish to centre. All text, including Headings, will be displayed in the centre of the page until you cancel the <CENTER> Tag with the </CENTER> Tag
If you wish to only insert a line Break the <BR> Tag is what you need.
The big difference between the <P> & <BR> Tags is that the <P> tags puts in an extra line space.
It is possible to change the size of the text
The full range is <FONT SIZE=7>7654321</FONT>
You may make text <B>BOLD</B> or <I>ITALIC</I> or <U>UNDERLINED</U> or You may, of course, use a combination of all three and even change the colour. There are many other ways of affecting the appearance of the text, there are also numerable pages on the Web to explain them in more detail.
Several types of lists have already been used in this document and I will attempt to explain how they work and what other types there are.
There are other types of lists, such as MENU and DIRECTORY Lists but these produce the same result as an Unordered List.
It is in order to NEST lists as I have above. i.e. One list in another, more than once if required.
It should also be noted that the temporary change of colour mentioned in the Using Colours Section alters the colour of the bullets or numbers in a list as well as the text, so it is possible to have the bullets set to one colour and links listed using another colour !
You may use an anchor to link to a reference on the same page or to a refernece on another page or to a new page or image.
You may display any image format that your Browser supports but you must always consider that other Browsers may not support all the image formats. The normal Image Format is .GIF (Graphics Interchange Format) or .JPG .JEPG (Joint Photographic Experts Group)
To display an Image, the following should be used :
<IMG SRC="IMAGEFILENAME.GIF">
In some Browsers, it is possible to switch off downloading of graphics files to speed download times.
In this environment, the person downloading your picture or image would not have a clue what was supposed to be there.
To overcome this problem you may insert a text statement that will be displayed instead, as follows :
<IMG SRC="IMAGEFILENAME.GIF" ALT="Your text here">
You may wish to display text alongside the image and it is possible to position the text at either the top, middle or bottom as follows :
| ALIGN="TOP"
| ALIGN="MIDDLE"
| ALIGN="BOTTOM"
| |
| Of course, you may want the image to appear on the right hand side of the page and if so, you should use the following : |
|
| <IMG SRC="IMAGEFILENAME.GIF" ALT="Your text here" ALIGN="RIGHT"> |
If the image is too large for your page, you may specify a size that the image will be displayed at.
and this is done with the addition of WIDTH=Number of Pixels HEIGHT=Number of Pixels within the Image Tag as follows:
For controlling the layout of a page, Tables are a very useful device in HTML.
The <TABLE> Tag indicates the beginning of the Table and the </TABLE> Tag indicates the end of the Table. The "Table Row" <TR> Tag indicates the start of each row. You may end the row with a </TR> Tag but this is not always necessary as the next <TR> Tag will suffice. You should always get into the habbit of using the End Tag. Other tags that are used in tables are : <TH> which is the Table Header and <TD> which is for a Data Cell.
A picture paints a thousand words, so here is an example of a Table with the HTML to go with it.
<TABLE BORDER=1>
| <TR><TH COLSPAN=2>Header</TH></TR>
<TR><TD>Cell 1</TD><TD>Cell 2</TD></TR> |
| ||||
In the above example, the term COLSPAN was used, it is also possible to ROWSPAN in the same manner. The BGCOLOR Tag and BACKGOUND Tag may also be used with Tables to great effect. In addition to the above, it is also in order to use ALIGN as in the <P> Tag.
<TABLE BORDER=5>
| Header, Cell 1 and Cell 2 as above <TR><TD BGCOLOR="RED" ALIGN="RIGHT" COLSPAN=2> </TD></TR> |
| ||||||
The above should give the reader a good insight into how tables work and how to adapt tables to their own use.
More to come, when I get the time.