David C. Rankin wrote:
After looking further, it looks like I'm just stuck with <pre>...
For the reasons Brian gave, do what Jos said but with a minor change. Don't use id attributes, because those have to be unique and you want something you can apply to any of your code blocks. Use class attributes instead. And while it can be convenient to use div tags to hold those attributes, it's not necessary. So here's an example that works for me: <html> <head> <title>test of pre-like formatting</title> <style> .foobar { font-size: 0.95em; padding: 1em; border: 1px dashed #5C6DEF; font-family: "DejaVu Sans Mono", "Cumberland AMT", sans-serif; color: black; background-color: #EAEAEA; line-height: 1.2em; overflow: auto; } </style> <head> <body> <p> This is some ordinary text. </p> <p class="foobar"> This is some special text. This is some special text. This is some special text. This is some special text. This is some special text. This is some special text. </p>