Thursday, 8 August 2013

<P> -- Paragraph tag in HTML:
  • Paragraph represents the block of text.
  • Paragraph represents with  in <p>  </p> tag.
  • Usually paragraph tag  is more useful to represent block of text.
  • Paragraph automatically add extra line before and after a paragraph.
  • Paragraph ignores all new line characters and blank spaces.
Syntax:
                <p>welcome to paragraph one </p>
                <p>welcome to paragraph two</p>

Example:

<html>
<head>
                <title>Paragraph Example</title>
</head>
<body>
<h1>welcome to paragraph example</h1>
<p>
                     If you are looking for Stock and Share Tips for Intraday and Long term basis then you have landed at the right page.
                      We provide Services in Stock Cash, Stock Futures and Stock Options Tips with more
than 90% Accuracy.
                      These tips are provided on a daily basis with proper time to enter into the trade and come out with profit daily.
</p>
<p>
                     We provide tips for NSE as well as BSE. Our clients are benefitting from our recommendations and you can be the next.
                     Just fill in the details below and start joying the taste of profit. Our clients say our tips rocks and now it's your time to rock with us.
</p>
</body>
</html>

output:

Explanation:
                   As i mentioned paragraph ignores new line characters, in the program we given new line in each paragraph but it ignores all new line characters and spaces.

                  As i mentioned in the output paragraph tag add's extra line before and after the tag.

For Demo : Click Here

<p> tag with attributes:
Alignment attribute for <p> tag as follows,
align="left"( by default paragraph contain left alignment)
align="center"
align="right"
align="justify"

Example:
<html>
<head>
             <title>Paragraph with attr</title>
</head>
<body>
                <p align="left">welcome to left alignment, it is default alignment</p>
                <p align="center">welcome to  alignment</p>
                <p align="right"> welcome to right alignment</p>
                <p align="justify">welcome to justify</p>
</body>
</html>

output:


For Demo : Click Here


0 comments:

Post a Comment