Template:Element cell/doc
![]() | This is a documentation subpage for Template:Element cell. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
The template produces a content in formatted CSS style for a single element cell (to be used in a periodic table). It is part of a series.
... cell-named See {{PT}} |
cell | cell property |
cell image |
/navbox {{/navbox}} |
/isotopes {{isotopes (navbox)}} | ||||||
|
|
|
|
|
| ||||||
Used in wikitable pattern: {| |- | {{element cell-abc|80|Hg}} |}
| |||||||||||
All cell templates produce a table cell output in pattern: style="background:#12abdf;" | [[Gold]] Note that there is the pipe symbol (|) in the middle (added by the template), separating cell style and cell content. | |||||||||||
<syntaxhighlight lang="wikitext">
title="" style="text-align:center; color:; background-color:; border:; ;"| </syntaxhighlight> |
<syntaxhighlight lang="wikitext">
title="Mousehover text (overrides title composed from 2, 3, ...)" style="text-align:center; color:transparent; background-color:Background color (overrides 6; can look like bg=#aabbcc); border:Sets border style (overrides 7. Like: border=3px solid red); Adds or overrides style settings (do not add the "" quotes);"| Atomic number |
- Specials
- Asterisks {{Element cell-asterisk}}
![]() |
![]() |
![]() |
![]() |
- PyMOL colors {{Element cell-PyMOL}}
- Simplified Chinese characters {{Element cell property/Hans}}
- Not mainspace
- {{element cell/aq}}, see {{Periodic table by article quality}}
- {{Element cell/blind}}
- {{Element cell/index/pt-cell}}
- {{Element cell/period}} → ①
- (more)
Parameters
All parameters are optional. <syntaxhighlight lang="wikitext">
80 Hg |
</syntaxhighlight>
80 Hg |
- Top row
Parameter 1, usually the atomic number, is put in the top row unlinked. If this parameter is present, a <br/> is added. The font color is set by parameter 5, usually the state of matter key.
- Asterisk (*)
To add a plain asterisk, as is done to mark lanthanides and actinides, add them in <syntaxhighlight lang="text" class="" style="" inline="1"><nowiki></syntaxhighlight> tags in parameter #1 like this: <syntaxhighlight lang="wikitext">
| title=", Lanthanides" style="text-align:center; color:#000000; background-color:#ffffff; border:none; ;"| <nowiki>*</nowiki>
Lanthanides
</syntaxhighlight>
- Page link
The cell links to parameter 2, usually the element name. If the page name is not the element name, as with <syntaxhighlight lang="text" class="" style="" inline="1">[[Mercury (element)]]</syntaxhighlight>, the correct pagename can be set through <syntaxhighlight lang="text" class="" style="" inline="1">link=Mercury (element)</syntaxhighlight>.
- Label
The link is labeled with parameter 3 (usually the symbol): <syntaxhighlight lang="text" class="" style="" inline="1">link=[[Aluminium|Al]]</syntaxhighlight>. If there is no link provided (no parameter 2, no link=), parameter 3 will show as unlinked text.
- Background
The background color is set by parameter 6, usually the category name. It can be set by parameter bg: <syntaxhighlight lang="text" class="" style="" inline="1">bg=#aabbcc</syntaxhighlight>. Parameter bg is used for just a color, with no legend meaning (no text in the title).
- Frame (cell border)
The frame style is set via parameter 7, usually the occurrence. It can be overridden by using <syntaxhighlight lang="text" class="" style="" inline="1">{{{1}}}</syntaxhighlight>. This sets the border (frame), but does not have a legend meaning (no text in the title).
- Style
All style can be set (and overridden) by using the style parameter: <syntaxhighlight lang="text" class="" style="" inline="1">style=width:5em;</syntaxhighlight>. Do not add quotes ("").
- Title
The title (mousehover text) is created from params 1: 6; 7; 5. (name: category; occurrence; state of matter).
The emercury example will give: <syntaxhighlight lang="text" class="" style="" inline="1">Mercury: transition metals; primordeal; liquid</syntaxhighlight>
When parameters <syntaxhighlight lang="text" class="" style="" inline="1">bg</syntaxhighlight> or <syntaxhighlight lang="text" class="" style="" inline="1">border</syntaxhighlight> are used, their setting is not added to the title (they are meaningless).
The title can be set (overridden) to any text, including a blank, by using <syntaxhighlight lang="text" class="" style="" inline="1">title=...</syntaxhighlight>
- Legend
The legend is composed from parameters 6, 5 and 7. It can be overridden by using <syntaxhighlight lang="text" class="" style="" inline="1">legend=Special meaning</syntaxhighlight>. (This can be useful in combination with setting <syntaxhighlight lang="text" class="" style="" inline="1">bg=...</syntaxhighlight>).
- Example using parameters
<syntaxhighlight lang="wikitext">
one three |
</syntaxhighlight>
one three |
Deprecated
Deprecated parameters: unnamed parameter number 8, unnamed parameter number 9.
See also