[wp-hackers] Code Tag Driving me Nuts!!
petit at petitpub.com
Sun Oct 29 13:02:02 GMT 2006
Computer Guru wrote:
> Is the <code></code> tag supposed to (in WP) display whatever is in between
> it tit-for-tat or is it supposed to parse the HTML within?
> It's driving me _nuts_!
> I'm trying to put up a post that has more code than normal text, and I just
> can't for the life of me figure out how to get my stuff to display right!
> If I put un-encoded HTML straight into the <code> tags, it'll display OK in
> WP, but it'll completely screw up my other apps that use the WP database.
> Computer Guru
> NeoSmart Technologies
Without testing it, out of my sleepy hat, I'd propose that you use
escaped code within a <pre> tag to preserve formatting.
For styling I'd use <pre class="code">some code here</pre> and a CSS
rule for .code.
That should work I guess. ( hopefully my "tags" above doesn't break
More information about the wp-hackers