From Gentoo Wiki
Jump to:navigation Jump to:search


This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.

As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

This template can be used to quickly refer to an HTML-style tag (displayed inside <angle-brackets>), without having to use a <nowiki> element or &lt; to suppress wiki-parsing.

The tag is not displayed using any special formatting. Other similar templates that do provide additional formatting are listed below.

The name of this template is based on the fact that it shows an HTML-style tag.


Parameter name Required? Default value Description
Anonymous parameter 1 No (n/a) Name of the tag to display

Note: The tag need not be legal HTML (or XML, SGML, etc.). To show = in an attribute (as shown below), use {{=}}. To show |, use {{!}} or &124;.



See the template's testcases:

Showing open tag (anonymous parameter)
Wiki code
Main version
Sandbox version

Showing open tag with attribute (anonymous parameter)
Wiki code
{{Ht|span style{{=}}"color:red"}}
Main version
<span style="color:red">
Sandbox version

Showing open tag with attribute containing a pipe character (anonymous parameter)
Wiki code
{{Ht|span title{{=}}"this{{!}}that"}}
Main version
<span title="this|that">
Sandbox version

Showing close tag (anonymous parameter)
Wiki code
Main version
Sandbox version

Showing only open and close angle-brackets (no parameter)
Wiki code
Main version
Sandbox version

See also[edit]

The complete family of templates similar to this one (with example output for each):

  • {{Ht}} – show HTML-style tag → <fubar>
  • {{Htc}} – show HTML-style tag using <code> element → <fubar>
  • {{Htm}} – show HTML-style tag using a monospace font → <fubar>
The above documentation is transcluded from Template:Ht/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)