xtricks: color snail picture w/ xtricks (Default)
xtricks ([personal profile] xtricks) wrote in [community profile] getting_started2011-05-19 04:29 pm
Entry tags:

Markup to show HTML code?

The question was asked here: http://getting-started.dreamwidth.org/9572.html?nc=15#comments

And the final comment links to a page that is now dead on how to do it for LJ.

I'm looking for the HTML coding to put in (part of) a post that prevents DW from reading and applying the HTML codes so I can have a little box that people can copy to get a template that includes the raw HTML.

I've seen it around, so I know it's possible (often as a little scroll box). Like everyone else, I tried raw-code and got the lack of breaks. When I try code (which DW says is a valid HTML tag for the site) I get my text in tiny courier print.

Is there such a code in DW or can someone link me to a current tutorial on how to make what I'm looking for?
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2011-09-28 04:13 pm (UTC)(link)
And just in case that link disappears, the manual way to have code showing up without the HTML being parsed is to do the following steps in order in a text editor:

1. Replace the string "&" with the string "&".
1. Replace the string "<" with the string "<".
1. Replace the string ">" with the string ">".

After doing that you'll have HTML that looks "something like &lt;em&gt;this&lt;/em&gt;". You should then copy and paste that into your entry, and it'll show up as you want it to. In this case, that code would show up as "something like <em>this</em>".
Edited (Oops, fixing mock-HTML. Sorry for the edit spam!) 2011-09-28 16:15 (UTC)