|
Intro &
Getting Started | Viewing Source &
Tags | Making & Testing a Page
| Basic Text Formatting | Images
Links | Directory
Structure & e-mail | Tables |
META Tags | Outside
Resources
Basic Text Formatting:
You may have noticed that in whatever text you typed, if you hit
"enter" to make a new paragraph, it didn't show up once
you viewed the page. That's normal! Since HTML is really just text,
and there's no character to represent a line break, you have to
code a line break yourself.
<BR> - Think of it as "BReak line." The text will
go down to the next available line.
<P> - Think of it as "Paragraph." The text will
go down to the next line, and then one more, to create a clear break
between two paragraphs.
NOTE: The above tags are special. They have no closing tags.
You may also want to format your text:
<B> </B> - Bold
<I> </I> - Italicize
<U> </U> - Underline
These are pretty self-explanatory text formatting options. You
should be familiar with them if you've used any kind of word processing
program. Simply surround the text you wish to format (for example,
"This word is <B>bold</B>"). You can even
use more than one, if you wish. Remember to close all tags, and
try and keep them in order as you use them (for example, "<B><I>bold
and italic</I></B>")- first opened, last closed.
You'll probably also want to format the size and font of your text
at some point. The <FONT> tag allows you to do this. For example,
if you wanted the font for your text to be a size 12 Arial, the
syntax of your coding would look something like this:
<FONT SIZE="12" FACE="Arial">insert all
of your text here</FONT>
The "FONT" indicates to the browser that you're formatting
the text. The "SIZE" lets the browser know what size to
place the text at (the sizes are the same as they would be if you
were working in a word processor). Finally, the "FACE"
lets the browser know which exact font to write in. "SIZE"
and "FACE," in this case, are examples of tag "attributes."
Most tags have attributes that let you specify even more how the
tag should affect your content. To use an attribute, include it
in the opening tag, add an =, and put the specific info in quotation
marks.
You'll notice that all of your text will be left-justified. To
center anything on your page, simply surround it with the <CENTER>
and </CENTER> tags.
However, if you're going to be aligning text alone (rather than
images, etc.), it is better programming to use the ALIGN attribute
of the <P> tag. You'll remember the <P> tag from earlier,
when creating a new paragraph. If you want to have a single paragraph
be aligned to the right, it would look something like this:
<P ALIGN="Right">insert all of your text here</P>
You'll notice that now there is a closing tag ("</P>").
Since you are using the <P> in conjunction with new attributes,
you must close the tag.
>> next
|