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

HTML

mrx3
mrx3
8,742 Points

I would like some help with posting html code please.

I noticed on here some people can post code from code pen. I was wondering how do you do that? I recently made a webpage, and I would like to post the code, and have some people review it. I have tried to use the tick way ''' but still can't get my code to show up correctly. I happened to see some people posting code in what appears to be code pen. Thanks in advance for any help.

7 Answers

Natasha McDiarmid
Natasha McDiarmid
11,400 Points

This is the backtick: http://i.stack.imgur.com/TOn1U.png

No shift. Just hit that key three times.

Natasha McDiarmid
Natasha McDiarmid
11,400 Points

It's likely not codepen if it looks like this:

<body>test</body>

You enclose your code in 3 backticks. These things --> `

Natasha McDiarmid
Natasha McDiarmid
11,400 Points

It doesn't appear until you post it. You want to use the ticks only not the arrow. I just typed that to show you the tick.

This is how you set it up. Try breaking it up to separate lines, too:

[three ticks here] <br /> your code here <br /> [three ticks here] <br />

Submit. It should appear. If it isn't, you are either typing in the wrong type of ticks or not enough.

Bob Sutherton
Bob Sutherton
20,160 Points

I was a little confused at first because I didn't know what a back tick actually was. I confused it with a "regular" tick. The back tick is on the same button as ~. Except to make ~ you have to use the shift button. It's not --->text---> but

Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting
mrx3
mrx3
8,742 Points

yeah that's what it looks like, so I enclose the code in back ticks.
Mine doesn't show up though.

  <body>Text</body>
Bob Sutherton
Bob Sutherton
20,160 Points

What is happening, I think, is that he is probably not putting the back ticks on a separate line. You don't wrap them like quotes, but put them on their own line.

mrx3
mrx3
8,742 Points

Thank you both, I got it. Mine doesn't have the black background but it shows the text. I'm such a dunce. Thank you both again.