Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21e26bd2fcccf5e

Jump to content

Template:HTML comment/doc

From Wikipedia, the free encyclopedia

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

Usage

[edit]
{{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 |collapsed=yes 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:<noinclude />HTML comment|...}}.

Notable cases

[edit]

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

[edit]