Paragraph Horizontal and Line Break Tags

DevJunctionPoint
0

 



  • The <p> tag defines a paragraph.
  • Browsers automatically add a single blank line before and after each.


<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>paragraph</title>
    <style>
        @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Urbanist:wght@300;400;600;700;800;900&display=swap");

        html {
            font-family: "jost", sans-serif;
            /* font-weight: bold; */
            text-align: center;
            background-color: #efefef;
            /* color: #fff; */
        }

        img {
            box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
            border-radius: 8px;
        }
    </style>
</head>

<body>
    <p>
        Lorem, ipsum dolor sit amet consectetur adipisicing elit.
        Voluptate sapiente voluptas,
        consequuntur fuga velit
        rerum nemo non perferendis reprehenderit possimus blanditiis
        veniam obcaecati! Ipsa similique iure dolor culpa
        provident ipsam?
        <br> <!-- line break-->
        Lorem ipsum, dolor sit amet consectetur adipisicing elit.
        Repellat in optio totam expedita voluptatum rerum
        dicta quibusdam quod dignissimos quas?
    </p>
    <hr> <!-- Horizontal rule-->
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.
        Architecto rerum, pariatur adipisci saepe exercitationem
        obcaecati et harum quibusdam, nisi qui aliquam? Cum
        dolorum voluptatum culpa quo tempora ex numquam vel!
        Lorem ipsum dolor sit amet consectetur adipisicing elit.
        Sequi sit deleniti dolorum necessitatibus a vitae
        quibusdam sint error impedit eligendi.
    </p>
    <p>Lorem ipsum dolor sit amet, <strong> consectetur
        adipisicing elit.</strong> Voluptate, eligendi.</p>
</body>

</html>

<hr> Horizontal line:

  • To add a horizontal line in your HTML document, the <hr> tag.

How to use the <hr> tag?

  <hr>

  • The <hr> tag is an empty or self-closing tag, meaning it doesn't require a closing tag. 

<br> break line:

  • To insert a line break in your HTML document, you can utilize the <br> tag.
  • <br> tag is used to insert line breaks in text or paragraphs
  • The <br> tag is commonly referred to as an empty or self-closing tag

INTERVIEW: HTML PARAGRAPH ELEMENT

  1. How do you create a paragraph using the <p> tag?
  2. Can you nest other HTML elements inside a <p> tag?
Answer 2. No, the <p>   tag is a block-level element, and it cannot contain block-level elements like other paragraphs or headings. However, you can include inline elements like <strong>, <em>, and links. </em></strong></p>


Tags

Post a Comment

0Comments

Do leave your comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!
To Top