Writing & StyleStyle guide

Using Selectors From Include Files

Using Selectors From Include Files 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

When the same Microsoft Learn selector is used across multiple articles, place the selector Markdown in an include file and reference that include from each article.

Key details

Core Issuereusing selector Markdown through includes
RegisterMicrosoft Learn technical documentation

Important caveats

Scope Boundary

Microsoft presents this as a recommendation for repeated selector markup; it does not make every one-off selector invalid when written directly in an article.

Further guidance

Content

When the same Microsoft Learn selector is used across multiple articles, place the selector Markdown in an include file and reference that include from each article.

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 Nested Include Files

Avoiding Nested Include Files 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

Linking From Microsoft Learn Selectors

Linking From Microsoft Learn Selectors 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 Multi-Selectors in Learn Markdown

Using Multi-Selectors 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

Using Relative Paths in Learn Include Directives

Using Relative Paths in Learn Include Directives 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 Single Selectors in Learn Markdown

Using Single Selectors 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

Writing Self-Contained Include Files

Writing Self-Contained Include Files 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