Our Top Courses
Preformatted text and horizontal rule enhance document structure and readability.
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>
Result
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>
Result