Forum Code Formatting

Forum Code Formatting
0

This post is modeled on http://forum.freecodecamp.com/t/markdown-code-formatting/18391, 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

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

enter image description here

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

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

28 Likes
If-else -help wanted
Menu is not working
What am I am doing wrong with the div element? I suppose to assign the background silver?
Can't save my codepen.. Help please
I am stuck on Random Quote Machine
Word Blanks how does it work excatly?
Problems with coding challange 22
Basic CSS: Improve Compatibility with Browser Fallbacks
Help fix bug please
Error: The a text should be "Jump to Bottom"
Introduction to HTML5 Elements, help
Link to Internal Sections of a Page with Anchor Elements 5
Responsive Web Design: Image Response: Auto Display Probz
Please i need help with this my code is correct and my browser zoom is set at 100% but i can't pass the challenge
7th challenge is not working
Center images in bootstrap
Header and footer help
Project: Check for Palindromes
How do i make jquery run offline? [Solved]
Help needed in sorted union algorithm challenge!
Discussion is about the working of code
Can someone tell me the difference between these?
Falsy bouncer code doesn't work
Outputting JS in Codepen
Help! Basic HTML and HTML5: Link to Internal Sections of a Page with Anchor Elements
I don't understand
Moving code from codepen.io to Netbeans IDE
Tribute Page column Help
Escape Sequences in Strings - Help Please
Create a Set of Radio Buttons, Again!
Render a Class Component to the DOM - fail
I`m get stuck on Mutations
What is the best way to let you see my challenge code and ask for your opinions or suggestions?
Javascript Profile Lookup
Profile Lookup (JavaScript Challenege/Exercise) - Code explanation
Use an equal sign with SLIM Template(HTML)
Tribute Page to "The Office"
jQuery / updating the DOM multiple times / CHAINING
Https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator
Size your image tutorial
What did i do wrong? why dosen't the value not register?
Google web font not working correctly
Issue with parallax in my project
Basic HTML HTML 5
What i do wrong in test "Basic CSS: Import a Google Font"
Product Landing Page: Media Query test fails
React: Add Comments in JSX
Why does the very first test say 82%?
How to set specific border
HTML5 Help required in anchor
Html page have extra width right space
The data from the server doesn t appear in the UI

Thanks!!
I had so much trouble with that

1 Like

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

9 Likes

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

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

@ClaraSais Post a picture of your keyboard and we will try to help you find the backtick key.

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.

1 Like

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: