paragraph tag:
When a HTML document that uses inline elements is displayed in a browser then any number of white spaces are actually compressed into a single space. As a result, the document looks like a single large paragraph which is not easily editable. So to make it editable easily, it is better to divide the document into sections which is possible with the use of paragraph tag <p>.the general syntax is:
<p> paragraph tag</p>
the end tag </p> is optional as the browser, automatically understands that when it encounters the <p> tag, the previous paragraph has ended.
you can also align your paragraph to left, right, center, or justify it to the screen of the browser by LEFT, RIGHT, CENTER or JUSTIFY alignment attributes respectively.
for example:
<p align="right"> paragraph text </p>
HTML code:
On viewing in a web browser:
The <p> tag can also contain inline formatting elements such as <B>, <I> etc. these elements help to format the text contained.
0 Comments