Difference between revisions of "Template:Heading"

From GodWiki
Jump to: navigation, search
(Template to create headings with min-width styling)
m (Raise min-width to 15em.)
Line 5: Line 5:
|2|#default=H2}} style="min-width:5em;">{{{text|{{{1|Heading}}}}}}</{{#switch:{{{level|{{{l|}}}}}}
|2|#default=H2}} style="min-width:15em;">{{{text|{{{1|Heading}}}}}}</{{#switch:{{{level|{{{l|}}}}}}

Latest revision as of 09:36, 16 January 2019


[view] [edit] [history] [refresh]
📚 Documentation

Convenience templates

The following templates can be used to create headings with {{heading}}.

Template Notes
{{h1|heading}} Creates a level 1 heading (NOTE: Normally not used)
{{h2|heading}} Creates a level 2 heading
{{h3|heading}} Creates a level 3 heading
{{h4|heading}} Creates a level 4 heading
{{h5|heading}} Creates a level 5 heading
{{h6|heading}} Creates a level 6 heading

Generic template

The generic {{heading}} template creates a heading at the specified |level=n (or |l=n), for n=1 through n=6 — the default is 2. The content of the heading is the value of |text= or the first unnamed parameter. (If neither is specified it will default to "Heading".)

Example of use

Creates a level 2 heading "History"
Creates a level 4 heading "Strengths"


All of these templates apply the following inline styling to the heading: min-width:15em;. This will help prevent the headings from being hidden behind infoboxes and other floated content, on mobile devices.