HTML Preformated & Horizontal Rule Tag

The <pre> tag and the <hr> tag are two commonly used HTML elements that can help improve the formatting and organization of a web page.

The <pre> tag is used to define preformatted text, which is text that should be displayed exactly as it is written, with all white space and line breaks preserved. This is useful for displaying code snippets or other text that needs to maintain its original formatting.

Example:

<pre>
    function myFunction() {
      var x = document.getElementById("myInput").value;
      document.getElementById("demo").innerHTML = x;
    }
</pre>

The <hr> tag is used to insert a horizontal rule or line on a web page. This can be used to visually separate different sections of content or to add emphasis to a particular part of the page.

Example:

<p>This is some text above the horizontal rule.</p>
<hr>
<p>This is some text below the horizontal rule.</p>

You can also use attributes with the <hr> tag to customize its appearance, such as changing its height, width, color, and style.

Example:

<hr style="height: 5px; background-color: black;">

Both the <pre> and <hr> tags are relatively simple and easy to use, but they can help improve the readability and organization of your web pages.

Wordpress Social Share Plugin powered by Ultimatelysocial
Wordpress Social Share Plugin powered by Ultimatelysocial