Template:Headline
This template formats text in a style somewhat similar to a section heading (but not defining a separately editable section, and also not in a serif font as with normal section headings). It is intended mainly to provide “welcome” messages on pages such as Commons:Village pump. When given empty or non-visible text (see examples below), only a horizontal rule (possibly colored) is shown.
Usage
{{Headline |1= |2= }}
Colors can be specified with three or six hexadecimal digits. Be careful to avoid colors that make the text hard to read.
Template parameters
- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1
or useTemplateData=only
on the /doc
subpage and transcluding it with {{Documentation}} into the template. <nowiki>
-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>
-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
This template formats text in a style somewhat similar to a section heading (but not defining a separately editable section, and also not in a serif font as with normal section headings). It is intended mainly to provide “welcome” messages on pages such as Commons:Village pump. When given empty or non-visible text, only a horizontal rule (possibly colored) is shown.
Parameter | Description | Type | Status | |
---|---|---|---|---|
text | 1 | The text of the headline, can be empty | Content | suggested |
color | 2 | The color of the underline; defaults to text color | Line | suggested |
background | background | Style (usually color) of the background
| Line | optional |
text color | color | Color of the text
| Line | optional |
font family | font-family | Font family of the text, can be a comma-separated list
| Line | optional |
font size | font-size | Size of the font, avoid setting size in “px”
| Line | optional |
additional style | style | Additional CSS style settings (it can even override the settings provided by the parameters listed above) | Line | optional |
Additional information
The template is intended to be used in the following namespaces: the Commons namespace
The template is intended to be used by the following user groups: all users
See also
- Template:Portal-head2, upon which this template was originally based
Localization
This template is not intended to be localized.
Examples
{{Headline|Using defaults}}
results in:{{Headline|Colored underline|#a00}}
results in:{{Headline|Colored text and underline|color=#802000}}
results in:{{Headline|Colored background|background=#09c|color=#fff}}
results in:{{Headline|Additional style|style=font-weight:bold}}
results in:{{Headline||#a00}}
(no text) results in:{{Headline| |#a00}}
(space character for text) results in:{{Headline| |#a00}}
(non-breaking space for text) results in: