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 define a paragraph in HTML5 ?
- How to set indent the second line of paragraph using CSS ?
- Inline HTML Helper - HTML Helpers in ASP.NET MVC
- HTML | <html> xmlns Attribute
- HTML Course | Structure of an HTML Document
- HTML | DOM HTML Object
- HTML Course | Basics of HTML
- What is the difference between <html lang="en'> and <html lang="en-US'> ?
- HTML | <dfn> Tag
- HTML | <kbd> Tag
- HTML | <!--...--> Tag
- PHP vs HTML
- HTML tr Tag
- HTML | <td> Tag
- HTML | <xmp> tag
- HTML | <map> Tag
- HTML | <q> Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.