Markdown: Markdown Text Styling: Bold, Italic, and Beyond

Text styling is the seasoning of writing — use it right, and readers will spot the key points instantly.

1. What You'll Learn


2. A Technical Writer's Real Story

(1) Pain Point: Formatting Inconsistency Caused Chaos

David was responsible for maintaining the team's internal technical wiki and found that pages written by different people were formatted inconsistently — some used ** for bold, others used __; some used * for italic, others used _. Worse, some people mixed keywords that should be bold with plain text, making it hard to read.

(2) Solution: Unified Style Guidelines

David created team Markdown style guidelines: keywords in **bold**, book titles and technical terms in *italic*, and deprecated content in ~~strikethrough~~. After the guidelines went live, the wiki's readability score jumped from 6.2 to 9.0. New team members no longer had to guess how to format anything.


3. Text Styling Basics

Markdown's text styling syntax is intuitive — you wrap text with paired symbols:

100%
graph LR
    A[Text Styles] --> B[Bold ** **]
    A --> C[Italic * *]
    A --> D[Strikethrough ~~ ~~]
    A --> E[Horizontal Rule ---]
    B --> F[Emphasize keywords]
    C --> G[Terms / book titles]
    D --> H[Deprecated / removed content]
    E --> I[Content separation]
Style Syntax Shortcut (VS Code) Rendered
Bold **text** or __text__ Ctrl+B bold
Italic *text* or _text_ Ctrl+I italic
Bold + Italic ***text*** Ctrl+B + Ctrl+I bold italic
Strikethrough ~~text~~ Alt+Shift+S strikethrough
Horizontal rule --- or *** or ___ No shortcut Horizontal line

(1) Bold

Wrap text with double asterisks ** or double underscores __:

MARKDOWN
This is an **important** concept.

**Note:** This section requires attention.

It's recommended to use asterisks `**` because they stand out more than underscores `__` in plain text.
💡 Tip: Use ** throughout rather than __, because _ can be misinterpreted as italic inside words (e.g., the underscores in some_func(param1, param2)).

(2) Italic

Wrap text with single asterisks * or single underscores _:

MARKDOWN
This is a classic book about *Design Patterns*.

In English, book titles are usually rendered in *italic*.

Note: _this text_ will also be displayed in italic.
⚠️ Note: Italic doesn't stand out as much in non-Latin scripts, but it's quite useful for English text and code snippets.

▶ Example: Combining Bold and Italic

MARKDOWN
**Important:** This feature was deprecated in *v2.0*. Please use the ***new API*** instead.

4. Strikethrough and Horizontal Rules

(1) Strikethrough

Strikethrough uses double tildes ~~ to indicate that text has been removed or deprecated:

MARKDOWN
Original price: ~~$299~~ **$199** (limited-time offer)

The following feature has been deprecated: ~~legacy API~~ — please use the new version.

~~This content is outdated and has been updated.~~
💡 Tip: Strikethrough is commonly used to show price changes, version updates, or outdated content. Don't overuse it, or your document will look cluttered.

(2) Horizontal Rule

A horizontal rule is created with three or more -, *, or _:

MARKDOWN
# Part One

This is the content of part one.

---

# Part Two

This is the content of part two.

---

---

Multiple horizontal rule notations all produce the same result.
⚠️ Note: Leave a blank line above and below a horizontal rule, or it may be misinterpreted as a Setext heading (if the line above has text).

▶ Example: Using Horizontal Rules in Different Contexts

MARKDOWN
# Project Documentation

## Installation Guide
...

---

## Usage Instructions
...

---

## API Reference
...
💡 Tip: Horizontal rules are great for separating major sections, but avoid using them within a single block of text. Three to five rules per article is plenty.


5. Line Breaks and Paragraphs

Markdown's line break rules differ from Word — pay attention:

Action Syntax Rendered
New paragraph Blank line between lines New paragraph (larger spacing)
Line break (soft break) Two spaces at end of line, then Enter New line (smaller spacing)
No break Continuous text Auto-merged into same paragraph
MARKDOWN
This is the first line,  
this is the second line (two trailing spaces).

This is a new paragraph (blank line above).

This is text within the same paragraph —
note that this line break won't take effect (no trailing spaces).
💡 Tip: Most Markdown editors (like Typora) don't require trailing spaces — pressing Enter inserts a line break directly. But on GitHub and in strict CommonMark parsers, two trailing spaces is the standard approach.

▶ Example: Line Break Effects Compared

MARKDOWN
No trailing spaces
Line break not applied (same paragraph)

Two trailing spaces··
Line break applied.

Blank line =
new paragraph.

6. Escaping Special Characters

When you want to display Markdown symbols as literal characters (rather than have them take effect), escape them with a backslash \:

Raw Text Escaped Displayed
**not bold** \*\*not bold\*\* not bold (asterisks shown literally)
# not a heading \# not a heading # not a heading
--- not a rule \-\-\- not a rule --- not a rule
MARKDOWN
Common escaping scenarios:
- Display an asterisk: \*this is not italic\*
- Display a hash sign: \# this is not a heading
- Display a backtick: \` \` (use double backticks)
- Display a backslash itself: \\\\
💡 Tip: Here's the rule of thumb — only escape symbols that have special meaning in Markdown. Regular punctuation (commas, periods, parentheses) doesn't need escaping.


7. Full Example: Formatting a Product Announcement

TEXT 📖 Display only
# Version Update: v3.0 Officially Released

We are excited to announce that Product Pro v3.0 is live today!

New features:
1. Dark Mode — easier on the eyes, longer battery life
2. Smart Recommendations — tailored to your usage habits
3. Legacy dashboard → brand-new interactive dashboard

Install command:
npm install product-pro@latest

Note: v2.x users, please refer to the v3 migration guide

Expected result: A richly formatted product announcement with bold text highlighting key information, strikethrough for deprecated features, and horizontal rules separating sections.


❓ FAQ

Q Which is better for emphasis, bold or italic?
A Bold is for emphasizing keywords and important information; italic is for book titles, technical terms, and subtle distinctions. Don't bold everything — that's the same as emphasizing nothing.
Q Why isn't my horizontal rule working?
A Common causes: ① the line above isn't separated by a blank line (parser treats it as a Setext heading); you used spaces instead of dashes; --- is inside a code block.
Q What if my line break doesn't work?
A Add two spaces at the end of the line, then press Enter. Or just insert a blank line to start a new paragraph. In editors like Typora, Shift+Enter inserts a soft line break.
Q Should I add spaces between different script characters?
A Yes, it's recommended. This is a Markdown tutorial reads better than This is aMarkdown tutorial. It's not a Markdown syntax requirement — it's a typographic convention.
Q Can I use both asterisks and underscores?
A Yes, but mixing them isn't recommended. In a single document, stick with double asterisks for bold and single asterisks for italic to keep your style consistent.

📖 Summary


📝 Exercises

  1. Beginner: Write a short self-introduction in Markdown that includes bold (your name/skills), italic (your motto), strikethrough (an outdated piece of information), and a horizontal rule.

  2. Intermediate: Write a few lines of text to verify the difference between trailing double-space and no-space line breaks. Then escape a ** symbol with \ so it appears as literal asterisks instead of bold.

  3. Challenge: Write a product changelog that includes at least 2 new features (bold), 1 deprecated feature (strikethrough), 1 important note (bold + italic), and 3 horizontal rules. Make sure the formatting is clean and the hierarchy is clear.

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏