This and That HTML Page Two
by mm and Tik Tok

 

Let's get the evil align tags and div tags done so we can do the fun stuff later.

You can divide your web page into several different sections using the <div> tag. Each division can be used to set the alignment for an entire section of a page. When a browser encounters this tag, it will take all the text and images located between the <div> and </div> and format it to the instructions contained in the attributes of said tag. Duh?? Simply put, you can make things be centered on the page, left justified, or right justified using either of these tags. Let's do align first.

If you've been to our pages on Help with Tables or to lisaviolet's site help, you know all about the <center> </center> tag. If not, trot over there now, then come back, we'll wait...

(Distant humming in background..hummmmhummmmhummmm)

Got it? Good. Now let's left justify something:

See, we did it already. All these sentences since the title of this page have been left justified, or aligned left.

Here's the code for this sentence (My comments in red):

<p align "left"> Here's the code for this sentence:</p>

<p (Opens the paragraph tag)

align "left"> (Tells the browser to left justify or left align the text. Then closes the opening tag)

Here's the code for this sentence:</p> (My text, then the closing tag for the entire sentence/paragraph)

Even though this example paragraph is only one sentence long, we had to open a paragraph tag, then close it.

Now, let us right justify or right align some words:

Once upon a time, in a galaxy far far away
lived a cute little cat named Punky.
Her owner was known by all as mm.
I made this text bold.

Let's see the code:

<p align="right">
<b>
Once upon a time, in a galaxy far far away
<br> lived a cute little cat named Punky.
<br> Her owner was known by all as mm.
<br> I made this text bold.
</b>
</p>

And talk about it:

<p align="right">(Opens the paragraph and right justifies it on the page)

<b> (I want all the text to be bold. This opens the bold tag)

Once upon a time, in a galaxy far far away (My first line of text)

<br> (I want to start a new line, but not a new paragraph, so I use the line break tag. Doesn't need a closing tag. Just open it < type in br then close it >)

lived a cute little cat named Punky. (My second line of text)

<br> (Line break tag)

Her owner was known by all as mm. (My third line of text)

<br> (Line break tag)

I made this text bold. (My fourth line of text)

</b> (Closes the bold tag)

</p> (Closes the paragraph tag)

Same paragraph, left justified:

Once upon a time, in a galaxy far far away
lived a cute little cat named Punky.
Her owner was known by all as mm.
I made this text bold.

<p align="left">(Opens the paragraph and left justifies it on the page)

<b> (I want all the text to be bold. This opens the bold tag)

Once upon a time, in a galaxy far far away (My first line of text)

<br> (I want to start a new line, but not a new paragraph, so I use the line break tag. Doesn't need a closing tag. Just open it < type in br then close it >)

lived a cute little cat named Punky. (My second line of text)

<br> (Line break tag)

Her owner was known by all as mm. (My third line of text)

<br> (Line break tag)

I made this text bold. (My fourth line of text)

</b> (Closes the bold tag)

</p> (Closes the paragraph tag)

And now centered:

Once upon a time, in a galaxy far far away
lived a cute little cat named Punky.
Her owner was known by all as mm.
I made this text bold.

<p align="center">(Opens the paragraph and centers it on the page)

<b> (I want all the text to be bold. This opens the bold tag)

Once upon a time, in a galaxy far far away (My first line of text)

<br> (I want to start a new line, but not a new paragraph, so I use the line break tag. Doesn't need a closing tag. Just open it < type in br then close it >)

lived a cute little cat named Punky. (My second line of text)

<br> (Line break tag)

Her owner was known by all as mm. (My third line of text)

<br> (Line break tag)

I made this text bold. (My fourth line of text)

</b> (Closes the bold tag)

</p> (Closes the paragraph tag)

And I see you scratching your head and saying...Tik Tok, where is the closing tag for centering?

Because we put the align="center" attribute in, we didn't open a center tag, ergo, we don't have to close it.

 

 

 

End of Page Two....click here for Page Three

Page: 1 2  3  4  5  6 7

 

Back to Site Help

This helpful information compiled by Tik Tok