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

Possible Duplicate:
How do I format my code blocks?

Whatever the link they have here to put before code does not work, it always tries to execute it. How can I post some code so it just displays?

share|improve this question

migrated from stackoverflow.com Jan 26 '11 at 16:50

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

marked as duplicate by Michael Mrozek, Grace Note, jjnguy, ChrisF, Jon Seigel Jan 26 '11 at 18:06

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.

    
Try clicking on the yellow question mark rectangle and read it. If you still have questions and problems understanding what it says don't hesitate to ask them on meta.stackoverflow.com –  Darin Dimitrov Jan 26 '11 at 16:44
    
I'm not sure how much of that was actual edit collisions and how much of it was just sequential editing. Somehow, I managed to start both of my edits after the previous submission, though, so there was no overwrite. –  Grace Note Jan 26 '11 at 16:57
    
@Grace I collided with yours, but we both deleted the second half of the post so my revision didn't bring it back. Looks like you tried to edit your revision within the window to change tags, so it pushed with the same revision message –  Michael Mrozek Jan 26 '11 at 17:00
    
@Michael That indeed happened - I was trying to pretend that I included the markdown tag in the first place. I somehow did that while unknowingly retaining your title and post body, which is the more humorous point. Talk about exact timing. –  Grace Note Jan 26 '11 at 17:01

2 Answers 2

Highlight your code, and then press the {} image for code sample (or ctrl+k).

Your code will appear in the bottom of your screen (the preview) in a grey box, then you know you did it correctly. That box is above the "Post your answer" button. Like this:

<?php

echo "hello stackoverflow";

?>

Sounds like you're having a bad day, and I hope it improves. :)

share|improve this answer
    
protip: use <kbd>{}</kbd> to further illustrate it's a button above the body element. –  Brad Christie Jan 26 '11 at 17:23

Hi,

Enter your code, select it and then press Ctrl-K

share|improve this answer