Writing & StyleStyle guide

Escaping Underscores in Microsoft Learn Image Alt Text

Escaping Underscores in Microsoft Learn Image Alt Text records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.

Quick answer

In Microsoft Learn’s standard conceptual-image Markdown, escape an underscore in alt text with a backslash (`\_`) if the underscore must appear literally.

Key details

Core Issueunderscores in conceptual-image alt text
RegisterMicrosoft Learn technical documentation

Important caveats

Scope Boundary

Microsoft also advises against copying file names into alt text. Prefer meaningful human-readable alt text; escaping an underscore is a syntax fix, not a substitute for a useful description.

Further guidance

Content

In Microsoft Learn’s standard conceptual-image Markdown, escape an underscore in alt text with a backslash (`\_`) if the underscore must appear literally.

Purpose

Keep Microsoft Learn source readable, accessible, reusable, and predictable while following current contributor-platform conventions.

Sources and evidence

Sources are shown with the role they play in this guide. Historical or style-sensitive claims are kept within the evidence boundary described above.

  1. Markdown reference for Microsoft Learn — Contributor guide (opens in a new tab)Microsoft · Current Microsoft Learn contributor reference for Markdown authoring, including headings/navigation, conceptual images and icons, includes, lists/checklists, nonlocalized strings, alerts, comments, tables, and other Learn extensions.

Related guides

Writing & Style

Avoiding HTML Tables in Microsoft Learn Markdown

Avoiding HTML Tables in Microsoft Learn Markdown records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.

Writing & Style

Avoiding Inline HTML in Microsoft Learn

Avoiding Inline HTML in Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.

Writing & Style

Escaping Angle Brackets in Learn Markdown

Escaping Angle Brackets in Learn Markdown records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.

Writing & Style

Limiting Alerts in Microsoft Learn Articles

Limiting Alerts in Microsoft Learn Articles records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.

Writing & Style

Using Capitalized INCLUDE Syntax in Microsoft Learn

Using Capitalized INCLUDE Syntax in Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.

Writing & Style

Using Next-Step Action Buttons in Microsoft Learn

Using Next-Step Action Buttons in Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.

Explore the topic