What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

Possible Duplicate:
How do I format my code blocks?

I'm sorry if this question has come up before, but numerous searches proved fruitless.

How do I include a block of HTML markup in a code snippet within a post here, without the post editor trying to render it? I have a PHP/HTML/CSS question and can't for the life of me figure out how to include the relevant code.

share|improve this question
1  
I'm sure this is a dupe. Regardless, select the text you're trying to paste in, then click the {} button in the toolbar, it's to the right of the quote tool and the left of the picture tool. This will mark the text as code by automatically indenting it four spaces. For more help, click the big fat question mark button on the right side of the toolbar. –  Charles Feb 13 '12 at 17:13
    
Wow, I know for a fact I tried that at least once to no avail. Could it have had something to do with the fact that the first line of each snipped was *** filename.php ***, reflecting the name of the file being displayed? Thanks! –  Rich.Carpenter Feb 13 '12 at 17:18
1  
Code formatting can act a bit funny if there's only one newline between it and the preceding line. –  Charles Feb 13 '12 at 17:23
add comment

marked as duplicate by random Feb 13 '12 at 17:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

Indent by four spaces, like with any other code snippet.

<html>
  <head>
    <title>Like this</title>
  </head>
  <body>
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged .