The following HTML tags are used to
format the appearance of the text on your web page. This can brighten up the
look of the web page, however, too much variety in the text
formatting can also look displeasing. Example are:
Header -
<h1>
</h1>
There
are 6 levels of headings available, from
h1
for the largest and
most important heading, down to h6
for the smallest heading.
Bold -
<b>
</b>
The
text in between the tags will be bold, and stand out against text around it,
the same as in a word processor.
Italic -
<i>
</i>
Also
working the same way as a word processor, italics displays the text at a slight
angle.
Underline -
<u>
</u>
Again,
the same as underline in a word processor. Note that html links are already underlined and don't need
the extra tag.
Strike-out -
<strike>
</strike>
Puts
a line right through the centre of the text, crossing it out. Often used to
show that text is old and no longer relevant. Also works by using
<s> </s>
instead.
Preformatted
Text -
<pre>
</pre>
Any
text between the
pre
tags, including spaces, carriage returns and punctuation, will
appear in the browser as it would in a text editor (normally browsers ignore
multiple spaces)
Source Code -
<code>
</code>
Similar
to
tt
the text is displayed in a fixed-width font, and is commonly used
to show source code. I have used it on this site, along with stylesheets, to show all tags.
Typewriter
Text -
<tt>
</tt>
The
text appears to have been typed by a typewriter, in a fixed-width font. For
example: This
text is written using the <tt></tt> tags.
Block Quote -
<blockquote>
</blockquote>
Defines
a long quotation, and the quote is displayed with an extra wide margin on the
left hand side of the block quote.
Small -
<small>
</small>
Instead
of having to set a font size, you can use the
small
tag to render text slightly smaller than the text around it.
Useful for displaying the 'fine-print'.
Font Color -
<font
color="color_name/hex_number_/rgb_number"> </font>
Change
the colour of a few words or a section of text. The 6 question marks represent
the hex color code.
Attribute Values
Attribute Values
Value
|
Description
|
color_name
|
Specifies the text color with a color name (like
"red")
|
hex_number
|
Specifies the text color with a hex code (like
"#ff0000")
|
rgb_number
|
Specifies the text color with an rgb code (like
"rgb(255,0,0)")
|
Font Size -
<font
size="5"> </font>
For
an immediate change of font size with respect to the font size preceding it,
this tag increase or decreases the size of the font by the number you specify.
Change Font
Face -
<font
face="Arial"> </font>
To
show text in a particular font, use the font name such "Helvetica" or
"Arial" or "Courier". Be aware that using some fancy font
from your computer means that the person viewing that page must also have that
font installed on their computer too, otherwise it will look totally different
to them.
Centre -
<center>
</center>
A
useful tag, as it says, it makes everything in between the tags centred (in the
middle of the page).
Emphasis -
<em>
</em>
Used
to emphasize text, which usually appears in italics, but can vary according to
your browser.
Strong
Emphasis -
<strong>
</strong>
Used
to emphasize text more, which usually appears in bold, but can vary according
to your browser.
No comments:
Post a Comment