HTML: Paragraph and Break Tags




To contact us



HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]

© 2002 - 2013 All Rights Reserved Total Application Works


  • Tell a friend about this site (copy and paste the following HTML page into a file (e.g., using Notepad).)
    <html>
    <head>
    <title>Example of a link </title>
    </head>
    <body>
    <a href="http://sumtotalz.com/TotalAppsWorks/HTML/forms.html">
    Paragraph and break tags </a>
    </table>
    </body>
    </html>




How to write a HTML Page with Paragraph and Break Tags

The purpose of this tutorial is to show you how to write a HTML page with Paragraph and Break Tags. What is HTML (HyperText Markup Language)? HTML is a layout/tag language that is used to organize text and/or images on a web page. In the following example, we will show you the code for our page that lays out Paragraph and Break Tags. What is a paragraph tag and a break tag? A paragraph tag is used to group related text together. This is done by creating a line space on either side of the text that they (<p> and <p>) enclose. Publishing any written work of substance requires the use of a paragraph. Consider the following example

paragraph Tags paragraph Tags Displayed by Browser
  
<p>This is paragraph 1.</p>
<p>This is paragraph 2.</p>
<p>This is paragraph 3.</p>
<p>This is paragraph 4.</p>
  

This is paragraph 1.

This is paragraph 2.

This is paragraph 3.

This is paragraph 4.

Figure 1: Example of a paragraph tag


  1. <html> - indicates the beginning of the HTML page
  2. <body> - indicates the beginning of what will be displayed on the user's screen
  3. <p> - indicates the beginning of a paragraph
  4. </p> - indicates the end of the paragraph
  5. </body> - indicates the end of what will be displayed on the user's screen
  6. </html> - indicates the end of the HTML page

We use the paragraph (<p>) and break (<br>) tags in the Figure 2 to further illustrate the grouping of text.

paragraph and Break Tags paragraph and Break Tags
displayed by a Browser
<html> <body> <p>Friendship <br> <br>

My friend is my friend because I am their friend; <br>
Our friendship is based on mutual respect <br>
Our friendship is based on loyalty and honor <br>
Our friendship is based on secrets kept <br>
Our friendship is based on no put-downs <br>
I revel in my friend's success <br>
I want and wish for the best for my friend <br>
My friend is a keeper <br>
My friend is my brother and sister <br>
I love my brother and sister <br> <br>

I. Asone </p> </body> </html>

Friendship

My friend is my friend because I am their friend;
Our friendship is based on mutual respect
Our friendship is based on loyalty and honor
Our friendship is based on secrets kept
Our friendship is based on no put-downs
I revel in my friend's success
I want and wish for the best for my friend
My friend is a keeper
My friend is my brother and sister
I love my brother and sister

I. Asone

Figure 2: Example of text with the break tag


Paragraph - Align Justification

We can left justify our paragraph by adding align="justify" to the paragraph tag.

paragraph and Break Tags paragraph and Break Tags
displayed by a Browser
<html> <br>
<body> <br>
<p align="justify">Friendship <br> <br>

My friend is my friend because I am their friend; <br>
Our friendship is based on mutual respect <br>
Our friendship is based on loyalty and honor <br>
Our friendship is based on secrets kept <br>
Our friendship is based on no put-downs <br>
I revel in my friend's success <br>
I want and wish for the best for my friend <br>
My friend is a keeper <br>
My friend is my brother and my sister <br>
I love my brother and my sister <br> <br>

I. Asone </p> </body> </html>

Friendship

My friend is my friend because I am their friend;
Our friendship is based on mutual respect
Our friendship is based on loyalty and honor
Our friendship is based on secrets kept
Our friendship is based on no put-downs
I revel in my friend's success
I want and wish for the best for my friend
My friend is a keeper
My friend is my brother and my sister
I love my brother and my sister

I. Asone

Figure 3: Example of text with the break tag


Paragraph - Align Right

We can center our paragraph by adding align="right" to the paragraph tag.

paragraph and Break Tags paragraph and Break Tags
displayed by a Browser
<html> <br>
<body> <br>
<p align="right">Friendship <br> <br>

My friend is my friend because I am their friend; <br>
Our friendship is based on mutual respect <br>
Our friendship is based on loyalty and honor <br>
Our friendship is based on secrets kept <br>
Our friendship is based on no put-downs <br>
I revel in my friend's success <br>
I want and wish for the best for my friend <br>
My friend is a keeper <br>
My friend is my brother and my sister <br>
I love my brother and my sister <br> <br>

I. Asone </p> </body> </html>

Friendship

My friend is my friend because I am their friend;
Our friendship is based on mutual respect
Our friendship is based on loyalty and honor
Our friendship is based on secrets kept
Our friendship is based on no put-downs
I revel in my friend's success
I want and wish for the best for my friend
My friend is a keeper
My friend is my brother and my sister
I love my brother and my sister

I. Asone

Figure 4: Text with the paragraph, break tag aligned on the right


Paragraph - Align Center

We can right justify our paragraph by adding align="center" to the paragraph tag.

paragraph and Break Tags paragraph and Break Tags
displayed by a Browser
<html> <br>
<body> <br>
<p align="center">Water under the bridge <br> <br>

As I sit on the bank and watch water flow under the bridge, <br>
I see glittering gold morsels of knowledge, <br>
And I wonder if this knowledge is forever lost, <br>
As the grains of sands fall through the hour-glass, <br>
This knowledge contains history, good and bad, <br>
The bad we are doomed to repeat if we do not know it, <br>
The good I hope we can repeat, if we know it, <br>
I watch the water flow while in a Rip Van Winklesque
catatonic state, <br>
Only to awaken, old too soon, wise too late, <br>
For my life is like a wheel, <br>
That repeats showing the good and bad, <br>
Wisdom will allow me to duplicate the good and
eliminate the bad, <br> <br>

I. Asone </p>
</body>
</html>

Water under the bridge

As I sit on the bank and watch water flow under the bridge,
I see glittering gold morsels of knowledge,
And I wonder if this knowledge is forever lost,
As the grains of sands fall through the hour-glass,
This knowledge contains history, good and bad,
The bad we are doomed to repeat if we do not know it,
The good I hope we can repeat, if we know it,
I watch the water flow while in a Rip Van Winklesque catatonic state,
Only to awaken, old too soon, wise too late,
For my life is like a wheel,
That repeats showing the good and bad,
Wisdom will allow me to duplicate the good and eliminate the bad,

I. Asone

Figure 5: Text with the paragraph, break tag and aligned in the center


In the following table, you will find another example that demonstrates the use of the paragraph and break tags.

paragraph and Break Tags paragraph and Break Tags
displayed by a Browser
<html> <br>
<body> <br>
<p align="left">Being <br> <br>

To be or not to be is not the question, <br>
I think, therefore I am is not the statement, <br>
Whether it is better to be or to be better, <br>
Or whether it is better to think better, <br>
To think and not know one's history, <br>
Is to think less and not learn, <br>
Is to think and not evolve, <br>
Having others think for you is not thinking, <br>
I think, I evolve and I learn because I think, <br>
To be is to strive to be the best, <br>
I think to be the best that I can be. <br> <br>
Because I think therefore I am. <br> <br>

I. Asone </p> </body> </html>


Being

To be or not to be is not the question,
I think, therefore I am is not the statement,
Whether it is better to be or to be better,
Or whether it is better to think better,
To think and not know one's history,
Is to think less and not learn,
Is to think and not evolve,
Having others think for you is not thinking,
I think, I evolve and I learn because I think,
To be is to strive to be the best,
I think to be the best that I can be.
Because I think therefore I am.

I. Asone

Figure 6: Text with the paragraph


Feel free to copy and paste the code in the above Figures into a source file.










HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]


To contact us

© 2002 - 2013 All Rights Reserved Total Application Works