HTML Paragraphs and Line Breaks - wordsclank.in

Sunday 4 November 2018

HTML Paragraphs and Line Breaks

HTML Paragraph :

The HTML < p > tag is  used to define a paragraph. < p > tag makes the piece of text a separate block by adding spaces above and below.


Example :


< p > This is paragraph and 
it has multi lines. 
But the browser ignores all the enters.  < /p >

< p > This is another paragraph.
So to represent paragrah we need p tag.< /p >

Browser view :



HTML Paragraph Justification:

HTML align attribute is used to justify your paragraph as center, left or right. By default justification is aligned to left.

< p align="justify"> This is a paragraph. < /p >


Example :


< p align= "center" > This paragraph is aligned to center. < /p >
< p align= "left" > This paragraph is aligned to left. < /p >
< p align= "right" > This paragraph is aligned to right. < /p >

Browser view :

HTML paragraph align

HTML Line Breaks :

The HTML < br / > tag is used to break a line or to create a new line without changing the paragraph.  


Example :


< p > This is paragraph. < br / > 
It has multi lines. < br / >
The browser creates a new line after the < br / > tag.  < /p >

Browser view :