🔷 1. Introduction:
In HTML, the <p>
tag is used to define a paragraph.
It is a block-level tag that adds spacing before and after the paragraph.
Paragraphs make content easy to read and organized.
🔷 2. Definition:
The <p>
tag stands for “paragraph”.
It is used to display a block of text.
Browsers automatically add a blank line (margin) before and after each paragraph.
🔷 3. Syntax:
<p>This is a paragraph.</p>
Each paragraph must be placed inside opening <p>
and closing </p>
tags.
🔷 4. Example (Code):
<p>HTML stands for HyperText Markup Language.</p>
<p>It is used to create webpages and applications.</p>
🔷 5. Output:
HTML stands for HyperText Markup Language.
It is used to create webpages and applications.
Each paragraph will be shown separately with spacing.
🔷 6. Real Life Example:
Suppose a student is writing an essay on the internet.
They can use the <p>
tag for each paragraph like this:
<p>The internet has changed our lives.</p>
<p>We can now study, shop, and talk online easily.</p>
🔷 7. Align Attribute in <p>
(Optional in HTML4):
You can align text inside a paragraph using the align
attribute (not supported in HTML5):
<p align="center">This text is centered.</p>
Better use CSS in HTML5:
<p style="text-align: center;">This text is centered.</p>
🔷 8. Practical Uses:
Use | Purpose |
---|---|
Writing essays | Divide text in clear sections |
Blog articles | Format content neatly |
Webpages | Show info in a readable way |
Documentation | Present data clearly |
🔷 9. Styling Paragraphs with CSS (Optional):
<p style="color: green; font-size: 18px;">Styled paragraph text.</p>
You can use CSS to change color, size, spacing, and more.
🔷 10. Advantages:
- Organizes text neatly
- Easy to read and understand
- Spacing is automatic
- Useful in all web content
- Works in all browsers
🔷 11. Limitations:
- Only used for text blocks
- No support for images or links directly
- Limited formatting without CSS
HTML में Paragraph टैग (
<p>
)
🔷 1. परिचय (Introduction):
HTML में <p>
टैग का उपयोग पैरा (अनुच्छेद) लिखने के लिए किया जाता है।
यह एक block-level टैग होता है जो टेक्स्ट को एक समूह (block) में दिखाता है।
पैरा टैग से लिखा गया कंटेंट साफ-सुथरा और पढ़ने योग्य बनता है।
🔷 2. परिभाषा (Definition):
HTML में <p>
टैग का मतलब है paragraph।
यह किसी भी टेक्स्ट को एक पैराग्राफ के रूप में दर्शाता है।
ब्राउज़र पैराग्राफ के पहले और बाद में अपने-आप खाली जगह (spacing) जोड़ देता है।
🔷 3. सिंटैक्स (Syntax):
<p>यह एक पैराग्राफ है।</p>
हर पैराग्राफ को <p>
और </p>
टैग के बीच लिखा जाता है।
🔷 4. उदाहरण (Example):
<p>HTML का पूरा नाम HyperText Markup Language है।</p>
<p>यह वेबपेज बनाने में उपयोग होती है।</p>
🔷 5. आउटपुट (Output):
HTML का पूरा नाम HyperText Markup Language है।
यह वेबपेज बनाने में उपयोग होती है।
हर लाइन के बीच में अपने-आप खाली जगह दिखेगी।
🔷 6. वास्तविक जीवन उदाहरण (Real Life Example):
मान लीजिए एक छात्र इंटरनेट पर निबंध लिख रहा है।
वह <p>
टैग की मदद से हर अनुच्छेद को अलग दिखा सकता है:
<p>इंटरनेट ने हमारी ज़िंदगी बदल दी है।</p>
<p>अब हम ऑनलाइन पढ़ सकते हैं, खरीदारी कर सकते हैं और बातचीत कर सकते हैं।</p>
🔷 7. Align Attribute (align
) — HTML4 में (HTML5 में नहीं):
<p align="center">यह टेक्स्ट सेंटर में है।</p>
HTML5 में align
की जगह CSS इस्तेमाल करें:
<p style="text-align: center;">यह टेक्स्ट सेंटर में है।</p>
🔷 8. कहां उपयोग करें (Practical Uses):
उपयोग | उद्देश्य |
---|---|
निबंध लेखन | अनुच्छेदों में बाँटना |
ब्लॉग लेख | साफ और सुंदर फॉर्मेटिंग |
वेबसाइट सामग्री | पढ़ने में आसान बनाना |
दस्तावेज़ | जानकारी को स्पष्ट रूप में दिखाना |
🔷 9. CSS से Styling का उदाहरण:
<p style="color: green; font-size: 18px;">यह स्टाइल किया हुआ पैराग्राफ है।</p>
इससे आप रंग, साइज, स्पेसिंग आदि बदल सकते हैं।
🔷 10. लाभ (Advantages):
- टेक्स्ट को सुंदर ढंग से दिखाता है
- पढ़ने में आसान
- ब्राउज़र खुद spacing देता है
- हर वेबसाइट में उपयोगी
- सभी ब्राउज़र में काम करता है
🔷 11. सीमाएँ (Limitations):
- केवल टेक्स्ट दिखाने के लिए
- सीधे इमेज या लिंक नहीं जोड़े जा सकते
- अच्छे फॉर्मेटिंग के लिए CSS ज़रूरी है