First mistake was that it would be easier if I plug the code into the WordPress text editor and it would convert the code for me and not interpret the code. The other is that display was ugly.
To resolve this situation use the following HTML tags:
<pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both spaces and
line breaks
</pre>
<code>
This will not preserve spacing or formatting and display text as is.
</code>
W3School is great for all of this HTML code and CSS reference.
If you're not using WordPress and just want to display HTML code without it being interpreted you will need something to recode those special characters and symbols. I found this neat site that will convert it for you.
No comments:
Post a Comment