Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Possible Duplicate:
How do I format my code blocks?

Whenever I try to use HTML tags for a code example on stack overflow, the actual HTML is used on the page, instead of being escaped. To make matters more difficult, only some of the tags are not escaped, making code samples with HTML in them next to impossible. The raw textbox (where I am trying right now) is filled with ampersands and semicolons!

Is this normal, or is there just a problem with by browser or account? Am I missing something here?

EDIT: Yes, I know that you're supposed to indent code with 4 spaces. This only works for about half the tags.

share|improve this question

migrated from Jun 19 '12 at 6:09

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Shadow Wizard, Arjan, Time Traveling Bobby, Toon Krijthe, Manishearth Jun 19 '12 at 14:32

This question was marked as an exact duplicate of an existing question.

Indent your code by 4 spaces. This will treat all the text as literal string. – nhahtdh Jun 19 '12 at 5:15
doesn't work all the time, only works for about half of the tags. – alecwhardy Jun 19 '12 at 5:17
Can you show some example? – nhahtdh Jun 19 '12 at 5:21
Stack Overflow has code blocks, read the linked faq to see how you can achieve those. – Shadow Wizard Jun 19 '12 at 6:18

I think you may find your answer here? Apparently there is limited support for HTML tags. The post lists the tags you can use.

Post: What HTML tags are allowed on Stack Exchange sites?

<h1>, <h2>, <h3>

Read the post itself for more information.

share|improve this answer
That post relates to what is allowed OUTSIDE code examples, I.E. mixed with markdown. The question is regarding code examples. – Jon P Jun 19 '12 at 5:56