Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

HTML Basics: Basic Text Tags : Page 4

Learn the basic HTML tags to put in your pages and see just how easy HTML can be!


advertisement
Paragraph

<p align=left/right/center>
</p>

In its simplest form, the paragraph tag tells the browser to display the text that follows it on a separate line, and to add extra space above it. So, this file:



<p>
Hello World!
</p>
<p>
How Are You?
</p>

displays like this in a web browser:

Hello World!

How Are You?

Make sure to end each paragraph with the end tag </p>. Everything between the start and end paragraph tags is the contents of that particular paragraph. Any attributes you specify in the paragraph apply to the entire paragraph between the open and close tags.

The most common paragraph attribute is align. You can align the paragraph in three ways:

  1. The default is left. If you don't use the align attribute the text automatically aligns to the left margin.
  2. align=right sends the text to the right margin.
  3. align=center centers the text across the page.
HTML Code Result

<p>This paragraph uses the default alignment, left. Each line is flush to the left margin.</p>

This paragraph is aligned left. Each line is flush to the left margin.

<p align=right>This paragraph is aligned right. Each line is flush to the right margin.</p>

This paragraph is aligned right. Each line is flush to the right margin.

<p align=center>The paragraph is aligned center. Each line is centered and touches neither margin.</p>

This paragraph is aligned center. Each line is centered and touches neither margin.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date