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

45 Likes

Thanks!!
I had so much trouble with that

3 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.”

11 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

1 Like

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

1 Like

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

1 Like

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

2 Likes

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

2 Likes

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

1 Like

Thank you I will shortly

1 Like

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

1 Like

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.

4 Likes

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

1 Like

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

1 Like

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

1 Like

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

1 Like

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

1 Like

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

1 Like