Align Paragraph
The HTML <p> can be aligned with the CSS property text- align.
Example: The example shows how to apply CSS styling to the paragraph with text align.
HTML
<!DOCTYPE html> < html lang = "en" > < head > < title >HTML paragraph tag</ title > < style > p { color: green; font-size: 30px; font-weight: 700; text-align: center; background-color: rgb(186, 218, 186); } </ style > </ head > < body > < p >This is paragraph element</ p > </ body > </ html > |
Output:
HTML Tag
HTML <p> tag defines the paragraph and is used to give structure to text content within a webpage. It is a block-level element & used to add the space or margins after and before the element this is done by browsers by default.
Note: The HTML <p> tag supports the Global Attributes and Event Attributes.
Contact Us