defzone.net@gmail.comLiên hệ
DZ
DefZone.Net

Kien thuc cong nghe & giai tri

Bai vietDia diemAlbum anhGameCua hang
  1. Home
  2. Wiki
Template documentation[view] [edit] [history] [purge]
This template should always be substituted – use {{subst:HTML comment}}.
Shortcut
  • {{hcmtTemplate:Hcmt}}
Not to be confused with {{Example HTML comment}}.

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]
  • {{Example HTML comment}}
  • {{Comment}}
The above documentation is transcluded from Template:HTML comment/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
DZ
DefZone.Net

Noi chia se kien thuc, huong dan va kham pha cong nghe.

Lien ket nhanh

Trang chủBài viếtWikiCửa hàngLiên hệ

Liên hệ

Email: defzone.net@gmail.com
Điện thoại: +84 762 559 696
Địa chỉ: Thiên Hương, Thủy Nguyên, Hải Phòng

Đăng ký nhận tin

Nhận bài viết và cập nhật mới nhất qua email.

© 2025 DefZone.Net. All rights reserved.
PrivacyTermsSitemap