Paragraphs and Line Breaks
Main
Getting Started
Backgrounds
Adding Text
Line Breaks
Adding Links
Graphics
Using Fonts
Creating Lists
META Tags
Using Tables
Page Jumps
Frames
JavaScript As HTML
Select Menus
Mouse Commands
JavaScript Boxes
Status Messages
New Windows
Clocks

Tools
Links
Feedback

It is a good idea to break up text on a page so it is easier to read. HTML provides methods for creating paragraphs and breaking up text.

Creating Paragraphs

First we will look at paragraphs. To create paragraphs we use the <P> tag. The ending tag </P> is optional in this case. Every time you wish to start a new paragraph just insert <P> at the beginning of the line. This tag creates a blank line before starting with the new paragraph. Suppose we want to write the following:

<P>Learning how to create a webpage is fun and easy. The WebPage Tutor offers tutorials on HTML and JavaScript. These tutorials will help you by showing examples of how to use HTML and JavaScript. <P>The WebPage Tutor will also help you to design and maintain a successful page. The tutorials will give you tips on how to correctly use HTML and JavaScript and tips on maintenance.

This will appear as follows on your browser:

Learning how to create a webpage is fun and easy. The WebPage Tutor offers tutorials on HTML and JavaScript. These tutorials will help you by showing examples of how to use HTML and JavaScript.

The WebPage Tutor will also help you to design and maintain a successful page. The tutorials will give you tips on how to correctly use HTML and JavaScript and tips on maintenance.

Using BLOCKQUOTE

Using the <BLOCKQUOTE> and </BLOCKQUOTE> tags will create a new paragraph that is indented on both sides from the rest of the page. Suppose we want to add BLOCKQUOTE to our example:

<P>Learning how to create a webpage is fun and easy. The WebPage Tutor offers tutorials of HTML and JavaScript. These tutorials will help you by showing examples on how to use HTML and JavaScript. <BLOCKQUOTE>These tutorials include understanding HTML and getting started, adding a background, adding text and graphics, creating links, changing fonts, creating lists and tables, and using frames.</BLOCKQUOTE> The WebPage Tutor will also help you to design and maintain a successful page. The tutorials will give you tips on how to correctly use HTML and JavaScript and tips on maintenance.

And here is what it will look like:

Learning how to create a webpage is fun and easy. The WebPage Tutor offers tutorials of HTML and JavaScript. These tutorials will help you by showing examples on how to use HTML and JavaScript.
These tutorials include understanding HTML and getting started, adding a background, adding text and graphics, creating links, changing fonts, creating lists and tables, and using frames.
The WebPage Tutor will also help you to design and maintain a successful page. The tutorials will give you tips on how to correctly use HTML and JavaScript and tips on maintenance.

Line Breaks

We can create a blank line without using the paragraph tag by using <BR> by itself. All this tag means is that it will create a breaking space in the document. This tag DOES NOT have an ending tag. To use it just type <BR>:

<BR>

Horizontal Rules

We can also create a line break visually by using the <HR> (horizontal rule) tag. Using this tag creates a horizontal line across the screen. Like <BR>, this tag doesn't have an ending tag. So writing <HR> produces


The <HR> tag has several attributes: ALIGN, NOSHADE, SIZE and WIDTH. ALIGN allows the rule to be aligned left, right, or center with respect to the browser window, NOSHADE allows the rule to be one color instead of a two tone groove, SIZE allows you to set the height of the rule in pixels, and WIDTH allows you to set the lenght of the rule, in either pixels or percentage. ALIGN is defaulted to the left and WIDTH is already defaulted to 100%. Below are some examples of the code followed by what it produces:

<HR WIDTH="50%">


<HR WIDTH="75">


<HR WIDTH="50%" ALIGN="LEFT">


<HR WIDTH="50%" ALIGN="RIGHT">


<HR WIDTH="50%" ALIGN="CENTER">


<HR NOSHADE>


<HR WIDTH="50%" ALIGN="CENTER" NOSHADE>


<HR SIZE="5">


<HR SIZE="8" NOSHADE>


<HR WIDTH="50%" SIZE="8" ALIGN="RIGHT" NOSHADE>


Graphics As Line Breaks

You can also create a line break using graphics. It is best to pick a graphic that is long horizontally, but rather small vertically. Refer to the graphics tutorial for the correct way to add a graphic. Here are several examples:




Search
for
This page has been accessed
866
times since June 24, 2001


Last Updated March 21, 2001