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

Paul Dietrich
Paul Dietrich
4,557 Points

Forum Code Textbox?

Hello all,

I've seen some people have a section in their post (a slightly different colored region) that contains their code. Is there a feature that allows me to place html (or other) coding language within a textbox?

4 Answers

Alan Johnson
Alan Johnson
7,625 Points

Hi Paul,

Yes! Absolutely. What you'll want to do is include a code fence (``` - three backticks) on the lines before and after your code. Then it'll come out looking like this:

puts "Hello World!"

You can use Markdown syntax.

See below when you are writing a post.

James Barnett
James Barnett
39,199 Points

@Paul - In markdown 4 spaces will format your code block as: code goes here

In a sentence you can also enclose a <tag> with the backticks symbol ` as @Alan previously mentioned