How to insert code or other pre-formatted text into your webpage using the -pre- html tag

Occasionally, you'll want to give your readers example of code, or other unusual text, that you would rather not be interpreted and formatted by browsers.  This is where you use the <pre> html tag. If you want to demonstrate a piece of code, for example, you would use the following method: <pre><code>p { color: red; text-align: center; }</code></pre>...

Scroll to top