<P> HTML paragraph tag

We can create paragraphs in html by using paragraph tags. This html tag is used to create gaps between lines of texts.

However we can create line breaks by using <BR> tags. Here we will use paragraph tags.

Here is one example of using HTML paragraph tag.
<P> Paragraph starts from here and ends at here </P>
We can skip the end paragraph tag and start a new paragraph like this.
<P>This is paragraph number one and we are not using any end tag here <P> The second paragraph starts here without any end paragraph tag</P>
The output of above code is here

This is paragraph number one and we are not using any end tag here

The second paragraph starts here without any end paragraph tag

We can add style to our paragraph html tag. Here it is



This is before the paragraph
<p align=center>This is a text only</p>
This is after the paragraph

 
Now here is the output of above code

This is before the paragraph

This is a text only

This is after the paragraph
Like this we can add other parameters to this paragraph style.

Using CSS with P Tag

<style>
p { 
 font-size: 25px;
 color:blue;
}
</style>
We can assign different style to <P> tag on the same page.
DEMO: <P> Tag with CSS

Full HTML page <P> tags with Style

<html>
<head>
<title>P tag with style DEMO</title>
<META NAME="DESCRIPTION" CONTENT="DEMO of P Tag with  style ">
<META NAME="KEYWORDS" CONTENT="HTML Paragraph demo style "> 
<meta name="viewport" content="width=device-width,minimum-scale=1">
<style>
.p5{ 
font-size: 20px;
 font-family:courier;
 background:#008cba;
 color:#FFFFFF; 
 padding: 5px 2px;
 border: 1px solid #f03000; // red
 }
.p7{ 
 font-size: 25px;
 font-family:Arial;
 background:#c03040;
 color:#ffffff; 
 padding: 15px 15px;
 border: 2px solid #000000;
 border-radius: 50%;
 }
 </style>

</head>
<body style="margin:50;">
<p class='p5'>This is with Class='p5'</p>
<br>
<p class='p7'>This is with Class='p7'</p>
<br>

</body>
</html>
Bold Tag <Div> Tag

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer