HTML <p> Tag
<p>tag is used for defining a paragraph. In a typical browser, one line is inserted before and after <p> ~ </p>, but if the purpose is to simply break a line, please use the
<br>tag instead of the
<p>tag. It is recommended to use CSS if you want to set the appearance of the document, such as adjusting the spacing between paragraphs. In CSS, you can make the width between paragraphs wider or narrower, so you can specify a finer layout. In that case, general margin properties and padding properties are used.
- Example Code:
<p>This is some text in the p tag</p> <p>This is more text using a new paragraph</p>
This is some text in the p tag
This is more text using a new paragraph
Attribute Definition align Specifies the alignment of the text within a paragraph.
- Global Attributes:
<p>tag also supports the Global Attributes in HTML5
- Event Attributes:
<p>tag also supports the Event Attributes in HTML5