HTML Tutorial

Formatting

These basic skills are very useful for converting text documents into attractive hypertext presentations.

Lesson One: Line and Paragraph Breaks
Lesson Two: Spacing
Lesson Three: Adding Emphasis

Lesson One: Line and Paragraph Breaks

The Black Box "AOL has decided to put her on the list to pick on." "This box, right now, composes our universe." Chelsea found herself in a thick, black darkness. "Hello?" she called tentatively. Her eyes adjusted to the darkness, and she could see some circles of light on the floor. She approached one, and found the wall nearby.

This excerpt is difficult to follow because it lacks paragraph breaks. Any document that is simply put on the web will lose word processor formatting unless it is uploaded directly as a text file (and then it has no line breaks or word wrap).

Placing the paragraph tag

at the end of a paragraph will cause the browser to "skip" a line between paragraphs. It will not show the tag (

). Tags may be in upper, lower or mixed case because HTML is not a case-sensitive programming language. The line break tag,
, may be typed as
,
,
, or
. All will end the line of type. You do not need to put the line break tag at the end of every line, most browsers just wrap the lines--continue onto the next line if the text is too long for one line.

Here is the above example with paragraph and line break tags added.

The Black Box
"AOL has decided to put her on the list to pick on."
"This box, right now, composes our universe."

Chelsea found herself in a thick, black darkness. "Hello?" she called tentatively. Her eyes adjusted to the darkness, and she could see some circles of light on the floor. She approached one, and found the wall nearby.

Back to top


Lesson Two: Spacing

The Black Box
"AOL has decided to put her on the list to pick on."
"This box, right now, composes our universe."

Chelsea found herself in a thick, black darkness. "Hello?" she called tentatively. Her eyes adjusted to the darkness, and she could see some circles of light on the floor. She approached one, and found the wall nearby.

Spacing deals with both the space between words and sentences and the space at the beginning of lines. In the formatted version of this excerpt, three paragraph beginnings are indented and one is not. Each sentence is followed by two spaces. To ensure that the browser will preserve your indentation, use the   tag. This tag will put one nonbroken space into the document. It is not necessary to put a nbsp tag between words and sentences; however, it is necessary to do so to indent. The following example has 5 nbsp tags at the beginning of the indented paragraphs.

The Black Box
     "AOL has decided to put her on the list to pick on."
     "This box, right now, composes our universe."

     Chelsea found herself in a thick, black darkness. "Hello?" she called tentatively. Her eyes adjusted to the darkness, and she could see some circles of light on the floor. She approached one, and found the wall nearby.

Back to top


Lesson Three: Adding emphasis

The Black Box
     "AOL has decided to put her on the list to pick on."
     "This box, right now, composes our universe."

     Chelsea found herself in a thick, black darkness. "Hello?" she called tentatively. Her eyes adjusted to the darkness, and she could see some circles of light on the floor. She approached one, and found the wall nearby.

In this selection, the quotations were in italics before is was converted to HTML. The section title, "The Black Box," was bold. For the sake of this demonstration, we will assume that the word "thick" in the last paragraph was underlined.

All of these forms of added emphasis can be duplicated in HTML documents with simple tags. To end the emphasized sections, as with most other tags, add a "/" between the opening < and the beginning of the text inside the tag. Underlined text sections need to have the : tag at the beginning of the section and the tag at the end of the section. This will underline spaces between words and sentences inside the emphasized sections as well at the text. Italicized text sections should begin with the tag and end with the . Some word processors that convert documents to HTML use the tag instead of the tag. Finally, bold sections begin with and end with .

Here is the selection with emphasis added.

The Black Box
     "AOL has decided to put her on the list to pick on."
     "This box, right now, composes our universe."

     Chelsea found herself in a thick, black darkness. "Hello?" she called tentatively. Her eyes adjusted to the darkness, and she could see some circles of light on the floor. She approached one, and found the wall nearby.

Back to top