Template:Ht
From Gentoo Wiki
[edit]
Documentation
Note
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 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 <
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.
Parameters
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;
.
Usage
{{Ht|tag}}
See the template's testcases:
Showing open tag (anonymous parameter)
Wiki code
{{Ht|span}}
Main version
<span>
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
{{Ht|/span}}
Main version
</span>
Sandbox version
Showing only open and close angle-brackets (no parameter)
Wiki code
{{Ht}}
Main version
<>
Sandbox version
See also[edit]
The complete family of templates similar to this one (with example output for each):
Note
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.)
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.)