Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 06:53, 9 February 2024 by 1F616EMO (talk | contribs) (1 revision imported: subst family)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Use this substitution to insert HTML comments (<!-- ... -->) – hidden to readers – into Wikipedia pages.

Usage

{{subst:html comment|Lorem ipsum dolor sit amet}}
<!-- Lorem ipsum dolor sit amet -->

By default a space will be added before and after the given text. Use Template:Tjp to remove it (useful in vertical comments). For example,

{{subst:html comment|collapsed=yes|

Lorem ipsum dolor sit amet

}}

will generate

<!--
	
	
Lorem ipsum dolor sit amet
	
	
-->

In substitutable templates, use {{{{{|safesubst:}}}HTML comment|...}}.

Notable cases

Using this substitution allows the expansion of MediaWiki commands inside HTML comments, where they would be preserved verbatim otherwise. Compare:

{{subst:html comment|{{subst:FULLPAGENAME}}}}
<!-- Template:HTML comment -->

and:

<!-- {{subst:FULLPAGENAME}} -->
<!-- {{subst:FULLPAGENAME}} -->

See also