Writing & StyleStyle guide

Formatting Markup-Language Elements in Technical Documentation

Formatting Markup-Language Elements in Technical Documentation records a distinct source-supported procedure or technical-formatting task while keeping adjacent UI behavior, accessibility concerns, and implementation mechanics outside the page.

Quick answer

Use code style for markup-language elements such as tags, and preserve the capitalization required by the language or example.

Key details

Core Issueformatting markup-language elements in technical documentation
Registertechnical and professional writing

Important caveats

Scope Boundary

The guidance concerns markup-language elements in documentation; it does not define the syntax or capitalization rules of a particular markup language.

Further guidance

Content

Use code style for markup-language elements such as tags, and preserve the capitalization required by the language or example.

Purpose

This separates literal markup syntax from surrounding explanatory prose.

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. Formatting text in instructions — Microsoft Style Guide (opens in a new tab)Microsoft · Current Microsoft technical-style conventions for formatting UI references, user input, commands, code-related elements, and other text in instructions.

Related guides

Writing & Style

Formatting XML Schema Elements in Technical Documentation

Formatting XML Schema Elements in Technical Documentation records a distinct source-supported procedure or technical-formatting task while keeping adjacent UI behavior, accessibility concerns, and implementation mechanics outside the page.

Writing & Style

Formatting AI Prompts in Technical Documentation

Formatting AI Prompts in Technical Documentation records a distinct Microsoft Style Guide authoring convention and keeps it explicitly scoped to technical documentation rather than presenting it as a universal grammar rule.

Writing & Style

Formatting Attributes in Technical Documentation

Formatting Attributes in Technical Documentation records a distinct Microsoft Style Guide authoring convention and keeps it explicitly scoped to technical documentation rather than presenting it as a universal grammar rule.

Writing & Style

Formatting Classes in Technical Documentation

Formatting Classes in Technical Documentation records a distinct Microsoft Style Guide authoring convention and keeps it explicitly scoped to technical documentation rather than presenting it as a universal grammar rule.

Writing & Style

Formatting Code Keywords in Technical Documentation

Formatting Code Keywords in Technical Documentation records a distinct Microsoft Style Guide authoring convention and keeps it explicitly scoped to technical documentation rather than presenting it as a universal grammar rule.

Writing & Style

Formatting Code Samples in Technical Documentation

Formatting Code Samples in Technical Documentation records a distinct Microsoft Style Guide authoring convention and keeps it scoped to technical instructions rather than presenting it as a universal grammar rule.

Writing & Style

Formatting Constants in Technical Documentation

Formatting Constants in Technical Documentation records a distinct Microsoft Style Guide authoring convention and keeps it explicitly scoped to technical documentation rather than presenting it as a universal grammar rule.

Writing & Style

Formatting Control Classes in Technical Documentation

Formatting Control Classes in Technical Documentation records a distinct Microsoft Style Guide authoring convention and keeps it explicitly scoped to technical documentation rather than presenting it as a universal grammar rule.

Explore the topic