![]() |
HTML GUIDE
PAGE 4 |
Tags covered on this page
<ADDRESS> <B> <BR> <CENTER><CODE>
|
FORMATTING AND STYLE OF TEXT
This is the line BReak tag.
As you write text into your document, the browser will fill each line
with text before moving onto the next.
Often this can look messy or just strange, so a BR command will come in handy.
Given something like
|
This line of text looks strange in some
way. |
We can alter it to look more effective
|
This line of text
looks strange in some way. |
The Paragraph tag is very similar to the BReak tag, but it leaves an extra
blank line between the two lines it seperates.
|
This is my first paragraph This is my second paragraph |
The CENTER tag allows text to be aligned to the center of the browser window rather than constantly to the left. This can help break up and emphasise blocks of text within the page.
|
Aligned to the left
Second line Third line |
Notice the cancellation tag </CENTER>
which restores text alignment to the left
and that each of the <CENTER>
& </CENTER>
tags automatically inserts a line BReak.
The Horizontal Rule is an object tag. On coming across this tag, the browser breaks text line and draws a shaded horizontal line across the page. This comes in handy for seperating those long pages of text into small managable sections.
You can alter the rulers appearence by using its three main attributes : width, size and align.
The WIDTH
of the rule can be specified in pixels or as a percentage of the window width. In the latter case, if the reader decides to alter the browser size then the ruler changes its size too.
<HR WIDTH=200>
<HR WIDTH=60%>
The SIZE
of the rule is generally specified in pixels and measures the height of the rule.
<HR SIZE=5>
<HR SIZE=20>
The ALIGN
attribute specifies where the rule should be placed. If left out, the rule is centered on the screen (as shown in the above examples).
<HR ALIGN=LEFT WIDTH=60%>
<HR ALIGN=RIGHT WIDTH=60%>
<FONT>
This tag allows sections of text to be highlighted by changing its size
(and colour - but I shall return to this later).
This is done by substituting the size number ( 1-7 ) for the question mark in :
<FONT SIZE=?>
|
Immediate cancellation:
Small text Large text
Nested cancellation:
|
This is a good example of how important structuring your HTML file is.
As I said at the start of this course, bad structuring can lead to immense problems in finding rogue tags that upset your page.
The example above shows immediate and nested cancellation - both are good structuring techniques.
There are many other tags that produce differing styles of text. This can be done in many ways via a long list of container tags, all of which work in the same way as the font tag above.
The examples below are not in full html form.
To test out the tags on your own page, you will need to insert them into the code given
on the above examples.
Alternatively, you can copy and edit 'example of the page' at the base of this page.
|
ABCDEFG - abcdefg
abcdefg
abcdefg
|
All the tags covered on this page can be found on an example file,
FILE NUMBER 1, on this examples page.
![]() ![]() ![]() ![]() |
|