Preformatted Text And Horizontal Rule

1. Preformatted Text
  • Purpose: To preserve the exact spacing and line breaks of the text as written in the HTML code. This is useful for displaying code, poems, or text with special formatting.
  • Tags: <pre>
  • Example:
<pre>
This is a preformatted text.
It will preserve spaces and line breaks.
</pre>
2. Horizontal Rule
  • Purpose: To create a visual separator or thematic break in the content.
  • Tags: <hr>
  • Example:
<p>This is some text.</p>
<hr>
<p>This is another paragraph, separated by a horizontal rule.</p>
Scroll to Top