format_align_left The <pre> Element
Displays text exactly as written
Uses monospace font
Preserves whitespace and line breaks
code When to Use
Displaying ASCII art
Showing code snippets
Preserving text formatting
lightbulb Benefits
Maintains exact spacing
No need for extra <br> tags
Perfect for technical content
info
Remember
The <pre> tag preserves all whitespace, including indentation and multiple spaces, which would normally be collapsed in regular HTML.
<pre>
----------------------------
< I'm an expert in my field. >
----------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
</pre>
preview
Browser Output
----------------------------
< I'm an expert in my field. >
----------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||