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

Jason Smith
Jason Smith
8,668 Points

How do i attach files to the community posts? when i try to copy paste from Visual Studio, i get clunky messages

Any help would be appreciated

5 Answers

you can copy and paste code within a code block, a code block is 3 backticks (`), you can usually find that key at the top left, above the tab and next to the number 1 of a qwerty keyboard.

following the first 3 backticks, you can say what colour syntax it should follow for example html, js, css, etc.

so a HTML code block will look like this

<!-- above this is ```html -->
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>Hello, world!</title>
  </head>
  <body>
    <h1>Hello, world!</h1>
  </body>
</html>

<!-- below this is ``` -->
Jason Smith
Jason Smith
8,668 Points

how will a python code block work? i'm trying to post a block of python to get help with. will the same trick work there?

Yes it will work the exact same

# above this is ```python

print("Hello, World!")

# below this is ```
Jason Smith
Jason Smith
8,668 Points

thanks! i'll try to remember this trick in the future, it'll help alot!

No problem, if you ever forget, underneath the comment textarea it says "Reference this Markdown Cheatsheet for syntax examples for formatting your post.". Clicking on Markdown Cheatsheet shows you how to add code