PUBLISHED ON: FEBRUARY 19, 2021
HTML P Tag
In HTML, the <p> tag stands for paragraph.
-
Paragraphs are usually represented as a block of text that is separated from the rest of the text by either using blank lines or using the first-line indentation
-
On the other hand, HTML Paragraphs are represented as the structural grouping of related content like images, forms, etc.
-
Before and after the <p> tag margin gets automatically added by the browser.
-
The <p> tag comes under the category of a block-level element.
HTML <p> Tag Syntax and Usage
The <p> tag requires both opening (start) tag and closing(end) Tag.
<p>
...!content here
</p>
HTML <p> Tag Basic Example
Below we have a basic example for a clear understanding of <p> tag
HTML <p> Tag Attributes
This <p> tag does not have any specific attributes; though it supports global and event attributes.
Default CSS Settings for HTML <p> Tag
The default CSS settings for <p> tag are given below:
p {
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
}
Browser Support for HTML <p> Tag
Following browsers support this attribute:
-
Google Chrome 1+
-
Internet Explorer 2+
-
Apple Safari 1+
-
Opera 2.1+
-
Firefox 1+