Writing & StyleStyle guide

Keeping Sensitive Information Out of HTML Comments

Keeping Sensitive Information Out of HTML Comments 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

Do not put private or sensitive information in Microsoft Learn HTML comments because the comments are carried into the published public HTML even though readers do not see them on the rendered page.

Key details

Core IssueHTML comment privacy
RegisterMicrosoft Learn technical documentation

Important caveats

Scope Boundary

This guidance concerns Microsoft Learn publication behavior and does not claim that every publishing system preserves comments in the same way.

Further guidance

Content

Do not put private or sensitive information in Microsoft Learn HTML comments because the comments are carried into the published public HTML even though readers do not see them on the rendered page.

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.

Explore the topic