HTML Paragraph


Paragraphs allows to add text to a document in such a way that it will automatically adjust the end of line to suit the window size of the browser in which it is being displayed.

Each line of text stretches to the entire length of the window Inserts a line space before and after a paragraph

The <p> element can carry all the Universal attributes.

align , class , id , style , title , dir , lang , xml:lang

HTML Paragraph Example

<html> 
 <head>  
  <title> HTML Tutroial </title> 
  </head>  
  <body>  
   <p> learn HTML , CSS , ASP.NET , PHP </p>
   <p> Learn More and Enjoy More </p>
  </body>  
</html>
Output

learn HTML , CSS , ASP.NET , PHP

Learn More and Enjoy More


HTML Display

You cannot be sure how HTML will be displayed.

Large or small screens, and resized windows will create different results.

With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.

The browser will remove extra spaces and extra lines when the page is displayed.

Any number of spaces, and any number of new lines, count as only one space.


HTML Line Breaks

The HTML <br> element defines a line break.

Use <br> if you want a line break (a new line) without starting a new paragraph:

Example

<p> Welcome<br>To<br>HTML Tutorial</p>

The <br> element is an empty HTML element. It has no end tag.

Welcome
To
HTML Tutorial


Share this article on