Computer Science, asked by ankit6522, 9 months ago

Write a html program to apply break and horizontal tag to a webpage​

Answers

Answered by royharshita07
1

Answer:

hey here is your answer

Explanation:

Paragraph element is used to publish text on the web pages.

Paragraphs are defined with the <p> tag. Paragraph tag is a very basic and typically the first tag you will need to publish your text on the web pages. Here's an example:

ExampleTry this code »

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

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

Note: Browsers built-in style sheets automatically create some space above and below the content of a paragraph (called margin), but you can override it using CSS.

Closing a Paragraph Element

In HTML 4 and earlier versions, it was enough to initiate a new paragraph using the opening tag. Most browsers will display HTML correctly even if you forget the end tag. For example:

ExampleTry this code »

<p>This is a paragraph.

<p>This is another paragraph.

The HTML code in the example above will work in most of the web browsers, but don't rely on it. Forgetting the end tag can produce unexpected results or errors.

Note: For the purposes of forwards-compatibility and good coding practice, it's advisable to use both the opening and closing tags for the paragraphs.

Creating Line Breaks

The <br> tag is used to insert a line break on the web page.

Since the <br> is an empty element, so there is no need of corresponding </br> tag.

ExampleTry this code »

<p>This is a paragraph <br> with line break.</p>

<p>This is <br>another paragraph <br> with line breaks.</p>

Note: Don't use the empty paragraph i.e. <p></p> to add extra space in your web pages. The browser may ignore the empty paragraphs since it is logical tag. Use the CSS margin property instead to adjust the space around the elements.

Creating Horizontal Rules

You can use the <hr> tag to create horizontal rules or lines to visually separate content sections on a web page. Like <br>, the <hr> tag is also an empty element. Here's an example:

ExampleTry this code »

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

<hr>

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

hope it helps you.

plz marks it brainliest

Similar questions