An HTML paragraph is just like a paragraph in a page of a book. It is a way of separating text. HTML paragraphs always start on a new line and will always have some margin (space) above and below the top and bottom lines of text. Each paragraph in a web page should start with an opening <p> tag and a closing </p> tag.
The following HTML code example shows the use of the HTML paragraph. Also, the paragraphs start with an HTML Heading.
1 2 3 4 5 6 7 |
<h1>HTML Paragraph Examples</h1> <p>This is the first paragraph. Notice the separation of space between the top of the paragraph as well as the bottom of the heading text. Space is added by default when working with HTML paragraph and heading.</p> <p>This the second paragraph. This text is separated from the first paragraph. Separating text is one of the main reasons to use HTML paragraphs.</p> |
So, the above code would display similar to the heading and paragraphs below.
HTML Paragraph Examples
This is the first paragraph. Notice the separation of space between the top of the paragraph as well as the bottom of the heading text. Space is added by default when working with HTML paragraph and heading.
This the second paragraph. This text is separated from the first paragraph. Separating text is one of the main reasons to use HTML paragraphs.