What is HTML Heading, Paragraph and Comment?

html heading, paragraph aur comment kya hota hai

What is HTML Heading?

    • HTML Heading वे Title या Subtitle होते हैं जिन्हें आप किसी Web Page पर Display करना चाहते हैं।
    • HTML Heading को <h1> से <h6> Tag के साथ Define किया जाता है।
    • <h1> सबसे महत्वपूर्ण Heading को Define करता है। <h6> कम से कम महत्वपूर्ण Heading को Define करता है।
				
					<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Heading Example</title>
</head>
<body>
    <h1>This is a Heading 1. </h1>
    <h2>This is a Heading 2. </h2>
    <h3>This is a Heading 3. </h3>
    <h4>This is a Heading 4. </h4>
    <h5>This is a Heading 5. </h5>
    <h6>This is a Heading 6. </h6>
</body>
</html>
				
			
html heading

Note: Browser स्वचालित रूप (Automatically) से Heading के पहले और बाद में कुछ White Space (Margin) जोड़ते हैं और Text को Big या Bold कर देता है।

Heading Importance

  • Search Engine आपके Web Pages की Structure और Content को Index करने के लिए Headings का उपयोग करते हैं।
  • Users अक्सर किसी Page को उसके Heading के आधार पर Skim करते हैं। Document Structure दिखाने के लिए Heading का उपयोग करना महत्वपूर्ण है।
  • <h1> Heading का उपयोग मुख्य Headings के लिए किया जाना चाहिए, उसके बाद <h2> Headings, फिर कम महत्वपूर्ण <h3>, और इसी तरह।

What is HTML Paragraph?

  • HTML <p> Tag का उपयोग Web page में Paragraph को Define करने के लिए किया जाता है।
  • एक Paragraph हमेशा एक New Line से Start होता है, और आमतौर पर Text का Block होता है।
  • Browser स्वचालित रूप (Automatically) से एक Paragraph के पहले और बाद में कुछ White Space (Margin) जोड़ते हैं।
  • Page Display होने पर Browser स्वचालित रूप (Automatically) से किसी भी Extra Space और Lines को हटा देता है।
				
					<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Paragraph Example</title>
</head>
<body>
    <h2>Define Paragraph</h2>
    <p>This is paragraph. </p>
    <h2>Remove Extra Space and Line in Paragraph</h2>
    <p>Lorem ipsum dolor sit         amet consectetur       adipisicing elit.                             ullam numquam ratione, quod commodi 
     rerumincidunt laborum cupiditateet!</p>
</body>
</html>
				
			
html paragraph

Use br and hr Tag with Paragraph

  • <hr> Element का उपयोग HTML Page में Content को अलग करने (या Change को Define करने) के लिए किया जाता है।
  • <br> का उपयोग New Paragraph Start किए बिना Line Break (New Line) करने के लिए कर सकते हैं।
				
					<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Paragraph Example</title>
</head>
<body>
    <h2>Use Br and Hr Tag with Paragraph</h2>
    <p>This is paragraph. </p>
    <hr>
    <p>Lorem, ipsum dolor sit amet <br> consectetur adipisicing   elit. Eos, sapiente. </p>
</body>
</html>
				
			
hr and br

What is HTML Comment?

  • Comments जो HTML File के लिए उपयोग की जाती हैं उन्हें HTML Comment के रूप में जाना जाता है।
  • <! — … –> Tags के बीच लिखी गई किसी भी Content को Browser द्वारा Ignore कर दिया जाता है, इसलिए Comments Web Page पर दिखाई नहीं देती है।
  • किसी भी Code की Comment Code को समझने में आसान बनाती हैं और Code की Readability को बढ़ाती हैं।
  • Comments भी Code का हिस्सा हैं, जो Code को Explain करती हैं।
				
					<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Comment Example</title>
</head>
<body>
    <!-- comment heading -->
    <h2>Comment Example</h2>

    <h2>Multiple Line Comment</h2>
    <!-- <p>Lorem, ipsum dolorsits amet consectetur adipisicing</p>
    <p>Lorem, ipsum dolor sits amet consectetur adipisicing </p> -->
</body>
</html>
				
			
Facebook
Pinterest
LinkedIn
WhatsApp

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top