HTML - Paragraphs
Examples of closing tags
<a href="#"> This is an example of anchor tag</a> <p> This is an example of paragraph tag</p>
Paragraph Tag
paragraph tag is used to surround a paragraph of text. The main characteristic of a paragraph tag is that it skips a line before display of paragraph text and it wraps text automatically to new line. The text layout of paragraph can be controlled using align attributes.
Spaces, linefeeds and carriage returns in HTML web pages aren't significant. In fact, any amount of whitespace, linefeeds, and carriage returns are automatically compressed into a single space when your HTML document is displayed in a browser. A web browser ignores this line break and starts a new paragraph only when it encounters a new paragraph tag.
To display multiple spaces within a paragraph tag you need to make use of non-breaking space character  .
The behavior of paragraph tag can be further controlled using CSS
paragraph alignment attribute code
Alignment attribute within paragraph tag can be used to align paragraph differently. i.e. center, left or right. In XHTML 1.1 the attribute 'align' is not permitted for the
tag.
<p align = "center">a centered paragraph</p> <p align = "left">a left paragraph</p> <p align = "right">a right paragraph</p> |
This is how it will appear in a browser |
a centered paragraph a left paragraph a right paragraph |
View above example output in a new browser window |
paragraph with embedded tags code
View above example output in a new browser window |
Special paragraph formatting tags
<blockquote><p>this is a blockquote text</p></blockquote> |
This is how it will appear in a browser |
|
View above example output in a new browser window |