HTML | Paragraph
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.