Forum Code Formatting

This post is modeled on Markdown Code Formatting - Guide - The freeCodeCamp Forum, but modified for the slight differences between the Forum and Gitter. If you are interested in using Spoiler blocks, check this post: Spoilers.

You can post code in two ways. Single word/line snippets can be handled inline. Multiple lines should be handled in code blocks:

Inline

Wrap your code in a single back ticks:

Example:

Code Blocks

Wrap your code in triple back ticks, with new lines between the back ticks and code:

Example:

Typing Backticks:arrow_heading_up:

QWERTY and QWERTZ (Key that’s been marked with red border)

AZERTY France (Alt Gr + Key that’s been marked with red border)

AZERTY Belgium (Alt Gr + Key that’s been marked with red border)

QWERTY Estonian (Key’s that have been marked with red border)

Estonian Keyboard layout

QWERTZ ( SHIFT+double press the key that’s been marked with red border)

If it’s not there…

You can use the code Alt+0096 to get a backtick on any keyboard with a numeric pad

43 Likes

Thanks!!
I had so much trouble with that

2 Likes

Thanks for being so kind to teach me this trick.
When you’re knew, the simplest thing can derail you. I was thinking “I clearly should not be a programmer if I can’t even figure out how to post to the forum properly.”

10 Likes

I am having problems with my Windows laptop to make this work. Do you know how to resolve this issue?

2 Likes

Thanks alot sir for teaching me this…its really good

Or for everyone that doesn’t have the backtick in the keyboard (looking at you Italian QWERTY…): ALT + 0096 (Windows)

QWERTZ ( SHIFT+double press the key that’s been marked with red border)

thank you - I am adding this to the top post if you don’t mind

1 Like

Go ahead, I’m just glad it can be useful.

1 Like

I’ve never heard of back ticks before and still slightly unclear about what they are. As a newbie I’m stuck on some code and posted it without these and obviously advised to put them in. I’m working in the UK on a MacBook keyboard, any ideas please where I would find them? TIA

Thank you I will shortly

Thank you for the backtick (ALT+0096) now I can move forward with confidence you are a GREAT HELP!!

You don’t need the backtick key, just hilight the text and press the </> button in the editor. This one:

The standard response really should be changed to that.

2 Likes

Thank you I found the backtick on the internet thank you for your reply.

Hi, what html editor do you use for this example?

do you mean this?

that’s not an html editor, it’s the forum editor and preview, maybe the old version for the colors, but it works the same

Thanks for this post. It s very useful one :slight_smile:
it s very well explained :slight_smile:
:+1:t3:

Thanks for the trick, bro :smiley: :smiley:

i still think though :thinking: am having trouble with the backticks