Writing & StyleStyle guide

Using Approved Language Tags in Fenced Code Blocks

Using Approved Language Tags in Fenced Code Blocks records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar rule.

Quick answer

Give fenced code blocks an approved language tag in Microsoft Learn content so the block is identified consistently.

Key details

Core Issueusing approved language tags in fenced code blocks
RegisterMicrosoft Learn technical documentation

Important caveats

Scope Boundary

Use a supported Microsoft Learn language/environment tag; this guide does not define programming-language syntax or replace project-specific linting.

Further guidance

Content

Give fenced code blocks an approved language tag in Microsoft Learn content so the block is identified consistently.

Purpose

Keep programmatic or structural text visually consistent and easier for readers to interpret in Microsoft Learn documentation.

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. Text formatting guidelines — Microsoft Learn Contributor Guide (opens in a new tab)Microsoft · Current Microsoft Learn contributor guidance for Git repository/branch names, code style, package and database names, nonlocalized resource names, fenced code blocks, language tags, headings, and link text.

Related guides

Writing & Style

Using Fenced Code Blocks for Longer Code

Using Fenced Code Blocks for Longer Code records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar rule.

Writing & Style

Avoiding Horizontal Scrollbars in Code Blocks

Avoiding Horizontal Scrollbars in Code Blocks records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar rule.

Writing & Style

Highlighting Key Lines in Code Blocks

Highlighting Key Lines in Code Blocks records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar rule.

Writing & Style

Using Interactive Code Snippets in Documentation

Using Interactive Code Snippets in Documentation records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar rule.

Writing & Style

Using Relative Paths in Code Snippet References

Using Relative Paths in Code Snippet References records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar rule.

Writing & Style

Automating Code Validation in Documentation

Automating Code Validation in Documentation records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar rule.

Writing & Style

Selecting Line Ranges in Referenced Code Snippets

Selecting Line Ranges in Referenced Code Snippets records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal grammar 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.

Explore the topic