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.
ReviewedEvidence1 sourceSectionWriting & Style
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.
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.
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.
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.
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.
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.
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.
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.
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.