Element <p> is used for define a paragraph.In paragraph you can not add extra spaces or extra lines
because browser will remove extra spaces and extra lines when page load.
If you want to break line then use <br> tag in paragraph.
Example:-
<p>This is a paragraph.</p>
If you want line break then use <br> as below example:-
Example:-
<p>This is my paragraph. <br> I want eat mango</p>
If you want to write poem then use <pre> tag and you should not use <p> tag because <pre> tag maintain line break and spaces . <pre> mean pre formatted text.
<PRE> tag Example 1:-
Poem example is below will be in given format at any screen.
<pre>
What does little birdie say
In her nest at peep of day?
Let me fly, says little birdie,
Mother, let me fly away.
Birdie, rest a little longer
Till the little wings are stronger,
So she rests a little longer
Then she flies away.
</pre>
<PRE> tag Example 2:-
<pre>
1000000
1000
10
1
</pre>
Try HTML Paragraph Example in Editor
because browser will remove extra spaces and extra lines when page load.
If you want to break line then use <br> tag in paragraph.
Example:-
<p>This is a paragraph.</p>
If you want line break then use <br> as below example:-
Example:-
<p>This is my paragraph. <br> I want eat mango</p>
If you want to write poem then use <pre> tag and you should not use <p> tag because <pre> tag maintain line break and spaces . <pre> mean pre formatted text.
<PRE> tag Example 1:-
Poem example is below will be in given format at any screen.
<pre>
What does little birdie say
In her nest at peep of day?
Let me fly, says little birdie,
Mother, let me fly away.
Birdie, rest a little longer
Till the little wings are stronger,
So she rests a little longer
Then she flies away.
</pre>
<PRE> tag Example 2:-
<pre>
1000000
1000
10
1
</pre>
Try HTML Paragraph Example in Editor
No comments:
Post a Comment