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?

Hello all,

Sorry for putting this insane question but I am stuck on this since long time. Whenever I put code on stack overflow I always use "'" (single quotes) at the start and end of each line of code which is tedious and probability wrost of all available option. How can we format multiple lines of code together instead of using "'" on every line ?

I observed many other newbies also facing this same issue. Most of the time other experienced users edits the question.



share|improve this question

migrated from May 21 '11 at 13:41

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

marked as duplicate by ChrisF, Kev, Cody Gray, Jon Seigel, John Saunders May 22 '11 at 1:15

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.

Welcome to Stack Overflow! Please check out our FAQ ( for information on posting questions. Short answer: indent each line of code by two spaces, and it will be automatically formatted for you. – Bob Kaufman May 21 '11 at 13:30
@bob: sorry it was pre copied text which got pasted in between. – Ajinkya May 21 '11 at 13:32
@Bob should be 4, not two. – vcsjones May 21 '11 at 13:38
@vcsjones -- I know it's four spaces! I have no idea why I wrote two! :) – Bob Kaufman May 21 '11 at 17:31
up vote 3 down vote accepted

Surround inline code with back-ticks, begin blocks of code with 4 spaces or a tab. Done!


Surround inline code with `back-ticks`,...

(Preceding line begins with four spaces.)

share|improve this answer

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