HTML Paragraphs - The following is a summary of the HTML paragraphs tag/element (
What are HTML Paragraphs?
HTML Paragraphs are HTML tags or elements that function to make the content in those tags into paragraphs. This tag is usually used for content in the form of text / writing.
The HTML Paragraph code is
Text using the HTML Paragraph tag starts on a new line and automatically has top and bottom margins without the need for CSS Styling adjustments.
Content inside the HTML Paragraph tag will also make extra spaces and newlines disappear automatically.
Tips: Do not include container elements such as blockquotes (
<blockquote>), HTML Headings, or anything else inside the paragraph element
<p>so as not to break the sematics of the Paragraph elements.
|HTML Element||Default Stylesheet|
Attributes and Functions
|class||Contains class selector for CSS Styling.||class-selector||
|id||Contains the unique code id selector for CSS Styling and targeting elements.||class-selector||
|style||Contains CSS styling code for images.||CSS Value||
Note: The results that appear in the results section are already affected by CSS Styling, so they don't appear as default.
- Even though it is in the form of a paragraph, the indensation of the text still has to be set manually using the CSS Styling method using the
- Another alternative to the HTML Paragraph element is HTML Preformatted Text (
That's a little summary of HTML Paragraph that I can share. If something is missing, unclear, or wrong, please let me know or just ask through the comments column below. Hopefully useful and see you in my other writings.
Paragraph element is very useful to make text appear neater and doesn't contain a lot of DOM which makes loading difficult.Ninura