There are many reasons why we should publish text in paragraphs such as short paragraphs attract more readers, it filters the information and help in driving a point.
So due to the following benefits of publishing text in paragraphs, HTML also has a tag for the same purpose. The <p> tag is used to define paragraphs. It is one of the most basic tags that a person requires to publish a text on a webpage. The text to be published in a paragraph is written between the opening <p> and closing </p> tag.
Closing the Paragraph Element :
In HTML 4 and earlier versions, closing the paragraph tag wasn’t compulsory. A paragraph could be initiated by just using a new paragraph opening tag.
Line Breaks in Paragraph :
The <br> tag which stands for a break is used to insert a line break without changing the paragraph.
Comments in HTML :
Comments are added to provide extra information which helps in understanding the source code. It usually helps the developer in the future when he thinks of modifying the source code. Comments are not displayed in the output screen.
An HTML comment begins with <!– and ends with –>.
The PRE Element in HTML :
The <pre> tag defines preformatted text. The pre tag preserves both spaces and line breaks which are present in the text enclosed between the pre tags.
- HTML | Paragraph
- HTML | DOM Paragraph Object
- HTML | DOM Paragraph align Property
- How to set indent the second line of paragraph using CSS ?
- How to define a paragraph in HTML5 ?
- How to change the cases of text in paragraph using CSS?
- HTML | <html> Tag
- HTML Course | Structure of an HTML Document
- HTML Course | Basics of HTML
- HTML | DOM HTML Object
- HTML | <html> xmlns Attribute
- What is the difference between <html lang="en'> and <html lang="en-US'> ?
- Inline HTML Helper - HTML Helpers in ASP.NET MVC
- HTML | scoped Attribute
- HTML | DOM lang Property
- HTML | <section> Tag
- HTML | DOM Style backgroundClip Property
- HTML | DOM Style borderTop Property
- HTML | <th> valign Attribute
- HTML | <col> align Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.