A paragraph always starts on a new line, and is usually a text block.
Example: In this example, we use the <p> tag used for paragraph in HTML.
Paragraph <p> tag
The <p> tag in HTML defines a paragraph. These have opening and closing tags. So anything said within <p> and </p> is considered a paragraph. Many browsers read a line as a paragraph even if we do not use the close mark, </p>, but this may suggest unexpected results. So, both are good meetings, and we should use a closing tag.
<!DOCTYPE html> <html> <body> <p>This is a paragraph.</p> <p>This is a second paragraph.</p> <p>This is a third paragraph.</p> </body> </html>
You can not be sure how HTML will be displayed.
Large or small screens, and resized windows will create different effects.
With HTML, you can’t change the template by adding extra spaces or lines to your HTML code.
The browser will automatically delete any additional spaces and lines when the page is displayed
HTML Line Breaks
There is a way to inform HTML where the browser needs to change lines using the <br> tag. These tags do not have closing tags. Therefore, one opening marker will change the line.
<h1>This is a Heading</h1> <p>This is a paragraph</p> </br> <h1>This is a Heading 2</h1> <p>This is a paragraph 2</p> </br>
The <p> tag directly supports the alignment attribute and allows us to align our paragraphs to the left, right, or center alignment.
<p align="left">This Is A Left Paragraph</p> <p align="center">This Is A Center Paragraph</p> <p align="right">This Is A Right Paragraph</p>
We’ve tag ignores all additional line and space changes within the paragraph, but there is a way to save this by using the <pre> tag. It also contains an opening and closing tag. Displays text within a fixed length and width and saves additional lines and spaces we use.
<pre> Welcome to KrTricks. I will show you to the paragraph uses in html. </pre> <pre> Welcome to KrTricks. I will show you to the paragraph uses in html. </pre>
- Google Chrome
- Internet Explorer