Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

I need help with code in discussions.

Hello everyone, Whenever I want to start making discussions, I always face problems writing my code, I've seen the Makrdown Cheatsheet and did as it says but still my code won't show up properly, it shows up like normal texts, please help. Thanks.

12 Answers

I do prefer you use this link as reference: http://daringfireball.net/projects/markdown/basics

Ex: <div>Hello World</div>

<div>Hello World</div>

Let me see:

 <blockquote>
 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
  </blockquote>

Try adding 4 spaces before the div

<div>Hello World</div>

<div>Hello World</div>

update: when reply the message, 4 spaces is not working

The pre tag doesn't work (it's ignored) so just add 4 spaces (or more) at the beginning of every line of code

            <p>Hi</p>

<p>hello world</p>

It doesn't work.

weird, it does work for me

     <p>yes it does</p>

the spaces go at the beginning of your line of code; not before your code (just in case)

Yes i understood that but still it doesn't work,

    <p>no it doesn't</p>

<p>wow it did!</p>

<p> i'm wondering if it still works </p>

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

I find it easiest to do anything that isn't a single word or two in a code block. To make a code block, you need a blank line between the last bit of text and the start of your block. Your block starts and stops with three backticks. A backtick looks like ` and, on US keyboards, is the unshifted version of the ~ and is usually up near the ESC key.

``` this is a code block ```

becomes

this is a code block

You can also syntax highlight the code by putting the language name after the first trio of backticks, like ```javascript.

If you want to use code in a sentence, just a single backtick ` on either side of the bit of code. `Like this` becomes Like this.

For more examples and more explanation, check out this other forum post from Dave.

<p>this is a code block</p>
<p> thank you very much!</p>