Difference between revisions of "Template:Fake heading/doc"

From blackwiki
Jump to navigation Jump to search
imported>Frungi
(further updating to match the current template)
imported>Gadget850
(update)
Line 2: Line 2:
  
 
==Usage==
 
==Usage==
This template is used to create examples of heading wikimarkup in style guides and in essays such as [[Wikipedia:Verification methods]], and to create examples of the output of code that generates <code>==Headings==</code>, such as at [[Wikipedia:Manual of Style (glossaries)]], so that editors have a clear idea of what they'll get.  
+
This template is used to create examples of section heading wikimarkup in help and similar pages. A fake heading will not appear in the table of contents.
  
A fake heading will not appear in the table of contents, though it's visually identical to a normal heading. The default output is <code>==</code>-level or {{tag|h2}}.
+
==Parameters==
 +
* '''sub''' is the level number: 1 through 6. The default is 2.
 +
* An unnamed parameter is used for the section title.
  
To simulate <code>===Subheadings===</code> ({{tag|h3}} through {{tag|h6}}), use the {{para|sub}} parameter with values 3 through 6.
+
==Example==
 +
{{markup
 +
|<nowiki>{{fake heading|Heading 2}}
 +
{{fake heading|sub=3|Heading 3}}
 +
{{fake heading|sub=4|Heading 4}}
 +
{{fake heading|sub=5|Heading 5}}
 +
{{fake heading|sub=6|Heading 6}}
 +
</nowiki>|{{fake heading|Heading 2}}
 +
{{fake heading|sub=3|Heading 3}}
 +
{{fake heading|sub=4|Heading 4}}
 +
{{fake heading|sub=5|Heading 5}}
 +
{{fake heading|sub=6|Heading 6}}
 +
}}
  
===Example===
+
==HTML==
<br />
+
Section heading wikimarkup is rendered to HTML [[HTML element#h1|heading element]]s, {{tag|h1|o}} through {{tag|h6|o}}, styled as follows:
The code:
 
 
 
 
 
<blockquote><code>{{tnull|fake heading|FooBarBazQuux}}<br />
 
{{tnull|loremipsum}}<br />
 
{{tnull|fake heading|sub&#61;3|QuuxBazBarFoo}}<br />
 
{{tnull|loremipsum}}</code></blockquote>
 
 
 
 
 
results in:
 
 
 
 
 
<blockquote>{{fake heading|FooBarBazQuux}}
 
{{loremipsum}}
 
{{fake heading|sub=3|QuuxBazBarFoo}}
 
{{loremipsum}}<blockquote>
 
  
 +
{| class="wikitable"
 +
|-
 +
! Wikimarkup !! [[HTML]] !! Style
 +
|-
 +
| <code>= Heading =</code> || {{tag|h1|o}} || font size 188%; bottom border
 +
|-
 +
| <code>== Heading ==</code> || {{tag|h2|o}} || font size 150%; bottom border
 +
|-
 +
| <code>=== Heading ===</code> || {{tag|h3|o}} || font size 132%; bold
 +
|-
 +
| <code>==== Heading ====</code> || {{tag|h4|o}} || font size 116%; bold
 +
|-
 +
| <code>===== Heading =====</code> || {{tag|h5|o}} || font size 100%; bold
 +
|-
 +
| <code>====== Heading ======</code> || {{tag|h6|o}} || font size 80%; bold
 +
|-
 +
|}
  
 
<includeonly>
 
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
 
[[Category:Documentation assistance templates]]
 
[[Category:Documentation assistance templates]]
 
 
</includeonly>
 
</includeonly>

Revision as of 02:18, 18 May 2013

Usage

This template is used to create examples of section heading wikimarkup in help and similar pages. A fake heading will not appear in the table of contents.

Parameters

  • sub is the level number: 1 through 6. The default is 2.
  • An unnamed parameter is used for the section title.

Example

Markup Renders as
{{fake heading|Heading 2}}
{{fake heading|sub=3|Heading 3}}
{{fake heading|sub=4|Heading 4}}
{{fake heading|sub=5|Heading 5}}
{{fake heading|sub=6|Heading 6}}
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

HTML

Section heading wikimarkup is rendered to HTML heading elements, <h1> through <h6>, styled as follows:

Wikimarkup HTML Style
= Heading = <h1> font size 188%; bottom border
== Heading == <h2> font size 150%; bottom border
=== Heading === <h3> font size 132%; bold
==== Heading ==== <h4> font size 116%; bold
===== Heading ===== <h5> font size 100%; bold
====== Heading ====== <h6> font size 80%; bold