Linked Questions
161 questions linked to/from How do I format my code blocks?
329 votes
5 answers
168k views
How to nest code within a list using Markdown [duplicate]
Oftentimes, I want to include code samples in a list, for example: Item One Item Two, for example: private bool ItemTwo() { return this.IFeelLucky; } Item Three The problem is that there isn't a ...
36 votes
4 answers
23k views
Easy way to mark text as code by indenting it [duplicate]
I was wondering if there is an easy way to indent the code in Stack Overflow. Whenever I paste in code, all the code loses its indentation; what I have been doing is manually indenting every line with ...
30 votes
2 answers
16k views
How do I get code to show up with color syntax highlighting? [duplicate]
How do I get the following to show up (on stackoverflow) with color syntax highlighting? class Foo { internal Foo() { for (int i = 0; i < 42; ++i); } }
15 votes
6 answers
94k views
How do I post code in StackOverflow? [duplicate]
Possible Duplicates: How to post code in SO How do I format my code blocks? When I post code here it ends up all mangled. How do I make it look pretty? For example, posting //#include (minus the //) ...
19 votes
3 answers
12k views
How to insert sample XML code in Stack Overflow? [duplicate]
I am trying to ask a question which contains sample XML code but I can't paste sample XML code in the question. How it can be done?
8 votes
3 answers
3k views
How can I format to show text inside "<" and ">"? [duplicate]
I've posted a lot to StackOverflow, and I've noticed something kind of irritating with the formatting in writing questions and comments. If I need to put something inside a < and a >, without ...
20 votes
1 answer
78k views
How to insert code properly on Stack Overflow? [duplicate]
This is a simple question. I'm trying to enter code on Stack Overflow so I can ask people questions about my site. Stack Overflow says I have to indent or something to show my code. I've tried ...
14 votes
4 answers
16k views
How can I paste HTML markup into a Stack Overflow question field? [duplicate]
Possible Duplicate: How do I format my code blocks? When I put HTML into the form field for Stack Overflow questions, it doesn't show up. Why is this, and is there a way to get HTML markup to ...
5 votes
4 answers
3k views
where to paste large blocks of code / text? [duplicate]
Possible Duplicate: How do I get my code blocks formatted? where should we post large chunks of code that we don't want to clog up our posts? Is there a way to make a scrollable code block? Or do ...
2 votes
5 answers
20k views
How to write code in a question or answer? [duplicate]
How to write code in a question/answer on a Stack Exchange site?
3 votes
2 answers
2k views
Why can't I submit this edit? “Body must be at least 30 characters; you entered 0” [duplicate]
I am referring to this Stack Overflow answer where a user gave an answer, but the user has quoted the code instead of using code formatting. But, when I tried to edit it, this is what I got: So, how ...
13 votes
2 answers
18k views
How to format code in posts on Stack Overflow [duplicate]
How to format code in posts on Stack Overflow? I am getting frequent error messages while submitting posts with code. I am getting the following message: Your Post appears to contain code that is not ...
8 votes
2 answers
16k views
Pasting code into the Stack Overflow question textbox [duplicate]
Possible Duplicate: How do I format my code blocks? When adding a code block of several lines, must I indent each line of the code block by fpir spaces, or just the first line? In the following block,...
5 votes
1 answer
2k views
What is the easiest way to post code in Stack Overflow? [duplicate]
Most of the times in order to give an answer or ask a question, I write code. But, writing code directly to the answer's textbox is quite tedious. I have to type too much spaces in order to get the ...
2 votes
2 answers
8k views
How to format text as code by indenting it [duplicate]
To enter code in StackOverflow, I indent each line with 4 spaces. Is there an easier way?