4. Format and Header Tags

Print out this lesson so you have a reference to the tags in this lesson
(Click HERE. Now use Print Frame in Netscape, and Print in Explorer. Both are in the FILE menu )

Format Tags

Remember that HTML does not recognize a RETURN (carriage return) in a text file, so there had to be a tag which would let you break lines of text and even put in blank spaces. From Lesson 3, that tag was the BREAK tag and its symbol is <BR>.

The BREAK tag is an example of a FORMAT tag. FORMAT tags work in a way similar to the way STYLE tags work, except they have to do with "structure" of the way text is presented on the page rather than the "style" of the text. That is, they deal with BREAKS, INDENTING, PARAGRAPHS, and even letting you FORMAT your own way, rather than just styling the text in BOLD, ITALIC, UNDERLINE, etc.

The table below illustrates the principal FORMAT tags. The name and syntax of the tag are given, and then in the last column you see the tag used in the explanation of what it does. That is, you see the actual tag, and then under "Tag Results," how text using that tag would appear in the browser.

Read through the table and look at the tags. Be sure you understand what each does. Some are just variations of others, and you may choose to use whichever you wish. Sometimes a combination of tags, which when combined, produce the same structural result as a single tag.

After the section on HEADER tags at the end of this lesson, you will have a chance to try out you all of the tags covered so far in a set of exercises. (Suprise! Surprise!)

Format Tags

Tag Name Tag Syntax Tag Results
BLOCK QUOTE <BLOCKQUOTE> ...
</BLOCKQUOTE>
<BLOCKQUOTE> Marks the selected text to be placed in a separate block on the Screen. It is used to place a large quote on the screen and indents the text on both sides.</BLOCKQUOTE>
Marks the selected text to be placed in a separate block on the Screen. It is used to place a large quote on the screen and indents the text on both sides.
CENTER LINE <CENTER> ... </CENTER>
<CENTER> Marks text to be centered in the browser window where it appears</CENTER>
Marks text to be centered in the browser window where it appears
CENTER PARAGRAPH <P ALIGN=CENTER> ... </P>
<P ALIGN=CENTER>Marks a paragraph to have each line in it be centered in the browser window. It does the same as CENTER LINE, except it puts a space before and after the text.</P>

Marks a paragraph to have each line in it be centered in the browser window. It does the same as CENTER LINE, except it puts a space before and after the text.

LINE BREAK <BR>
Causes<BR> a line of text to<BR> be broken at the point the tag<BR> is placed.<BR>
Causes
a line of text to
be broken at the point the tag
is placed.
NO LINE BREAK <NOBR> ... </NOBR>
<NOBR>Marks the selected text to be viewed with no line breaks.</NOBR>
Marks the selected text to be viewed with no line breaks.
PARAGRAPH <P> ... </P>
<P>Marks the selected text as being a paragraph. </P><P>It is a more formal way of using the PARAGRAPH BREAK tag.</P>

Marks the selected text as being a paragraph.

It is a more formal way of using the PARAGRAPH BREAK tag.

PARAGRAPH BREAK <P>
<P>Marks the text as being a paragraph. <P>It is a simplified way of using the PARAGRAPH BREAK tag.

Marks the text as being a paragraph.

It is a simpliefied way of using the PARAGRAPH BREAK tag.

PREFORMATED TEXT <PRE> ... </PRE>
<PRE>Marks the text as being already
formatted by the author. This tag      includes text in a fixed-width

font and causes spaces, new lines, and tabs to be
shown "as is."</PRE>

Marks the text as being already 
formatted by the author.  This tag      includes text
in a fixed-width

font and causes spaces, new lines, and tabs to be 
shown "as is."

Header Tags

The reason there is a separate section for header tags is that they combine the functions of both STYLE and FORMAT tags.

Header tags are used for "titles" in HTML. They make the text BOLD, and they always place a line before and after the text. One variation CENTERS the header text on the page.

You could accomplish the same thing with the CENTER LINE, and PARAGRAPH BREAK Format tags and the BOLD Style tag, but the HEADER tags include one feature you have not yet used. They allow you to choose different sizes of text. You may have noticed this in the titles to various sections in these lessons. Those are all HEADER tags.

Below is a table of header tags with the results of their use as well as their syntax.

Header Size 1

Header Size 1 - Centered

<H1> ... </H1>

<H1 ALIGN=CENTER>...</H1>

Header Size 1

Header Size 1 - Centered

Header Size 2

Header Size 2 - Centered

<H2> ... </H2>

<H2 ALIGN=CENTER>...</H2>

Header Size 2

Header Size 2 - Centered

Header Size 3

Header Size 3 - Centered

<H3> ... </H3>

<H3 ALIGN=CENTER>...</H3>

Header Size 3

Header Size 3 - Centered

Header Size 4

Header Size 4 - Centered

<H4> ... </H4>

<H4 ALIGN=CENTER>...</H4>

Header Size4

Header Size 4 - Centered

Header Size 5

Header Size 5 - Centered

<H5> ... </H5>

<H5 ALIGN=CENTER>...</H5>

Header Size5

Header Size 5 - Centered
Header Size 6

Header Size 6 - Centered

<H6> ... </H6>

<H6 ALIGN=CENTER>...</H6>

Header Size6

Header Size 6 - Centered


One last note. Notice that the HEADER SIZE 1 is the largest and HEADER SIZE 6 is the smallest. When we look at the <FONT> tag and FONT sizes in Lesson 10, the situation will be just the opposite. FONT SIZE 1 will be the smallest and FONT SIZE 7 the largest.

Exercises 4

Open the file you named and saved as "HTMLStationary" in the last lesson. Use "Save As..." in the FILE menu to save it under the new name "MyPage2.html" on the Mac or "MyPage2.htm" on a PC.

Below is a page of formatted text. SELECT and COPY it, then PASTE it into your "MyPage2.html" file. Format it using all the tags you have learned so it looks like the one here when it is viewed in a browser.

Remember that there are some tags whose results can be obtained by a combination of other tags. That means there is no unique way to do the formatting and styling. The solution I give you will be just one possibility. You need to look at what you have done, and if it looks right on the screen, then it is done correctly-- if not efficiently.


Taxes and Morals

By Mark Twain

Address Delivered in New York, January 22, 1906.

From Mark Twain's Speeches (New York: Harper and Brothers, 1910).

At the twenty-fifth anniversary of the founding of Tuskeegee Institute by Booker Washington, Mr. Choate presided, and in introducing Mr. Clemens made fun of him because he made play his work, and that when he worked hardest he did so lying in bed.

I came here in the responsible capacity of policeman to watch Mr. Choate. This is an occasion of grave and serious importance, and it seems necessary for me to be present, so that if he tried to work off any statement that required correction, reduction, refutation, or exposure, there would be a tried friend of the public to protect the house. He has not made one statement whose veracity fails to tally exactly with my own standard. I have never seen a person improve so. This makes me thankful and proud of a country that can produce such men -- two such men. And all in the same country. We can't be with you always; we are passing away, and then -- well, everything will have to stop, I reckon. It is a sad thought. But in spirit I shall still be with you. Choate, too -- if he can.

Every born American among the eighty millions, let his creed or destitution of creed be what it may, is indisputably a Christian to this degree -- that his moral constitution is Christian.

Christian Morals

There are two kinds of Christian morals, one private and the
other public. These two are so distinct, so unrelated, that they
are no more akin to each other than are archangels and
politicians. During three hundred and sixty-three days in the
year the American citizen is true to his Christian private
morals, and keeps undefiled the nation's character at its best
and highest; then in the other two days of the year he leaves his
Christian private morals at home and carries his Christian public
morals to the tax office and the polls, and does the best he can
to damage and undo his whole year's faithful and righteous work.
Without a blush he will vote for an unclean boss if that boss is
his party's Moses, without compunction he will vote against the
best man in the whole land if he is on the other ticket. Every
year in a number of cities and States he helps put corrupt men in
office, whereas if he would but throw away his Christian public
morals, and carry his Christian private morals to the polls, he
could promptly purify the public service and make the possession
of office a high and honorable distinction.

Once a year he lays aside his Christian private morals and hires a ferry-boat and piles up his bonds in a warehouse in New Jersey for three days, and gets out his Christian public morals and goes to the tax office and holds up his hands and swears he wishes he may never-never if he's got a cent in the world, so help him. The next day the list appears in the papers -- a column and a quarter of names, in fine print, and every man in the list a billionaire and member of a couple of churches. I know all those people. I have friendly, social, and criminal relations with the whole lot of them. They never miss a sermon when they are so's to be around, and they never miss swearing-off day, whether they are so's to be around or not.

I used to be an honest man. I am crumbling. No -- I have crumbled. When they assessed me at $75,000 a fortnight ago I went out and tried to borrow the money, and couldn't; then when I found they were letting a whole crop of millionaires live in New York at a third of the price they were charging me I was hurt, I was indignant, and said:

"This is the last feather. I am not going to run this town all by myself."
In that moment -- in that memorable moment -- I began to crumble. In fifteen minutes the disintegration was complete. In fifteen minutes I had become just a mere moral sand-pile; and I lifted up my hand along with those seasoned and experienced deacons and swore off every rag of personal property I've got in the world, clear down to cork leg, glass eye, and what is left of my wig.

Those tax officers were moved; they were profoundly moved. They had long been accustomed to seeing hardened old grafters act like that, and they could endure the spectacle; but they were expecting better things of me, a chartered, professional moralist, and they were saddened.

I fell visibly in their respect and esteem, and I should have fallen in my own, except that I had already struck bottom, and there wasn't any place to fall to.

At Tuskeegee they will jump to misleading conclusions from insufficient evidence, along with Doctor Parkhurst, and they will deceive the student with the superstition that no gentleman ever swears.

Look at those good millionaires; aren't they gentlemen? Well, they swear. Only once in a year, maybe, but there's enough bulk to it to make up for the lost time. And do they lose anything by it? No, they don't; they save enough in three minutes to support the family seven years. When they swear, do we shudder? No -- unless they say "damn!" Then we do. It shrivels us all up. Yet we ought not to feel so about it, because we all swear -- everybody. Including the ladies. Including Doctor Parkhurst, that strong and brave and excellent citizen, but superficially educated.

For it is not the word that is the sin, it is the spirit back of the word. When an irritated lady says "oh!" the spirit back of it is "damn!" and that is the way it is going to be recorded against her. It always makes me so sorry when I hear a lady swear like that. But if she says "damn," and says it in an amiable, nice way, it isn't going to be recorded at all.

The idea that no gentleman ever swears is all wrong; he can swear and still be a gentleman if he does it in a nice and benevolent and affectionate way. The historian, John Fiske, whom I knew well and loved, was a spotless and most noble and upright Christian gentleman, and yet he swore once. Not exactly that, maybe; still, he -- but I will tell you about it.

One day, when he was deeply immersed in his work, his wife came in, much moved and profoundly distressed, and said:

"I am sorry to disturb you, John, but I must, for this is a serious matter, and needs to be attended to at once."

Then, lamenting, she brought a grave accusation against their little son. She said:

"He has been saying his Aunt Mary is a fool and his Aunt Martha is a damned fool."
Mr. Fiske reflected upon the matter a minute, then said:
"Oh, well, it's about the distinction I should make between them myself."

Mr. Washington*, I beg you to convey these teachings to your great and prosperous and most beneficent educational institution, and add them to the prodigal mental and moral riches wherewith you equip your fortunate proteges for the struggle of life.

_________
*Booker T. Washington, founder of the Tuskeegee Institute.


If you want to see my answers, click here.
They are shown paragraph by paragraph (sort of).

After the small window at the bottom comes up, if you move your mouse to the bar separating the two windows you will see the cursor change. This will allow you to click-and-hold the mouse button and move the bar up. It will let you see more of the answers at one time.

After reading the answers, in order to put things back the way they were, use the BACK button or scroll down to the link at the bottom of the "Answers" page.