Code·12 / 19

Inline Code

Highlight code words within your text.

Inline Code

Use backticks to highlight code, commands, or technical terms within a sentence.

Syntax

Use the \`console.log()\` function to print output.

Renders as: Use the console.log() function to print output.

When to Use Inline Code

  • Function names: useState(), map(), filter()
  • Variable names: userName, isActive
  • Commands: npm install, git commit
  • File names: package.json, index.html
  • Keyboard shortcuts: Ctrl+C, Cmd+V
  • Technical terms: API, HTTP, JSON

Backticks Inside Inline Code

To include a backtick inside inline code, use double backticks:

``Use \`code\` here``

Don't Overuse It

Inline code is for technical terms and code references. Don't use it for regular emphasis — use bold or italic for that.

💡 Inline code uses a monospace font, making it stand out from regular text.

Practice

Markdown Input
Live Preview

Inline Code Practice

To start a React project, run npx create-next-app in your terminal.

The useState hook returns a state variable and a setState function.

Press Ctrl+S to save your file.