Paragraph Tags ?
Paragraph or p Tags are semantic tags and used to wrap contents of a webpage or simply a
paragraph of content. Here paragraph means the same as paragraph in english language.
You can use as many "p" tag as you want in any html file or webpage.
Syntax and Usage :
To create a paragraph in HTML, simply wrap your text content with the <p> opening and </p> closing tags.
You can include multiple paragraphs on a page by using additional <p> tags.
Here's an example:
<p> A new day.</p> <p> Life is beautiful.</p>
Formatting text in paragraphs :
1. Bold : To make text bold, enclose it within the <strong> or <b> tags.
For example : <p>This is <strong>bold</strong> text.</p>.
2. Italic: To italicize text, enclose it within the <em> or <i> tags.
For example : <p>This is <em>italic</em> text.</p> .
3. Underline : To underline text, enclose it within the <u> tag.
For example : <p>This is <u>underlined</u> text.</p> .
4. Strike-through: To add a strike-through effect to text, enclose it within the <s> or <del> tags.
For example : <p>This is <s>struck-through</s> text.</p>.
Best Practices
When working with paragraph tags, it's important to follow these best practices:
Use Semantic Markup: Ensure that the content within the <p> tags represents a logical and meaningful paragraph.
Separate Paragraphs: Use separate <p> tags for each paragraph to maintain proper structure and readability.
Avoid Excessive Formatting: Limit the use of excessive text formatting within paragraphs to maintain readability and a consistent style across your website.
HTML paragraph tags are a fundamental element for organizing and displaying textual content on web pages. By using them correctly and adhering to best practices, you can enhance the structure, readability, and accessibility of your web content.
Note::
Please do not forget that paragraph or para or p tags are block level element. And if you
remember, it has top/bottom/right/left extra margins and paddings by default.
FYI :: These extra margins and paddings we need to remove from all block elements and
then only UI will be consistent and follow css box model, obviously when we go to css.