HTML #6 - HTML Paragraphs Introduction, Uses and How to use


Hello friends, welcome to the another tutorial of Programming Infinity. In this tutorial, we Will know about the HTML Paragraphs, its uses and also know the way of using it. We will also know some facts about the Paragraphs. So friends, let's begin to explore Infinity...

PARAGRAPHS

<p> My first Paragraph. </p>
<p> My Second Paragraph. </p>

Paragraph is used for giving information related to particular topic in multiple sentences. In HTML, we can easily create Paragraph with <p> tag. The syntax of using this is given above. the only need is for us to change the Content with desired content in the <p>....</p> element. When using the Paragraphs in HTML, the Browsers automatically add some margin around the paragraph i.e. after and before the paragraph.

DISPLAY VARIATIONS

Display variations from mobile to Computer, will causes the text to arrange itself according to the screen size  , which causes a unexpected arrangement of text, which sometimes looks unusual. It also remove the extra spaces and extra lines when it is displayed in the browser.

<pre>
Content.....
</pre>

 - pre element :- It is tag used to preserve the extra spaces and extra line breaks in the Text. It usually uses a fixed width font (Courier) as its default font. It will be helpful while writing a poems for showing its properly arranged. The syntax of using this is given above.

Don't forget the end tag

<p> Paragraph Error.
<p> Paragraph Right.</p>

Never forget to write the end tag while using paragraph, as it will cause unexpected behaviour. If you forget the end tag, then in most of the browsers, it will display normally. But sometimes , it can cause error.

Some more...

-- <br> tag :- It is used to add a single line break in between two visible elements. It is a empty element i.e. It doesn't contains any content within it. It can be written as <br> or <br/> tag. In the second one, we had closed it in the starting tag. This is the recommended one to use as it is supported by all HTML Versions.

-- <hr> tag :- It is used to add a thematic break by creating a horizontal line. We will know more about it in the another tutorial.


So friends, that's all for today friends. Hope u enjoyed it. If u have any problem, then ask me in comment box. 

Thanks - 
Programming Infinity (Samridh Sharma).

Comments