Jump to content

Help:Formatting

From RetroTechCollection
(Redirected from Help:Link)

More formatting techniques for MediaWiki markup, beyond the basics in Help:Editing and Help:Wikitext.

Section headings

[edit source]

Equals signs make section headings. The number of = signs sets the level:

== Level 2 ==
=== Level 3 ===
==== Level 4 ====

Start at level 2. Level 1 is the page title and is not used inside articles. Do not skip levels, and write headings in sentence case: "Power supply diagnostics", not "Power Supply Diagnostics".

Bold, italics and monospace

[edit source]
  • Bold: '''bold''' gives bold
  • Italic: ''italic'' gives italic
  • Bold italic: '''''bold italic''''' gives bold italic
  • Monospace: use <code></code> inline, or <pre></pre> for a block

In articles, bold only the page subject at its first mention in the opening paragraph. Do not bold phrases for emphasis or as labels at the start of list items.

[edit source]
  • Internal: [[Main Page]] gives Main Page
  • Different text: [[Main Page|home page]] gives home page
  • External: [https://example.com Example] gives Example
  • A file without embedding it: [[:File:Macintosh Plus.pdf]]

Unordered list

[edit source]

Use asterisks:

* Item 1
* Item 2
** Subitem

Ordered list

[edit source]

Use hashes. Use numbered lists for steps that must be done in order:

# First
# Second
## Substep

Definition list

[edit source]
; Term
: Definition

Tables

[edit source]

Data tables on this wiki use the styled-table class, with the TemplateStyles line once before the first table:

<templatestyles src="Template:StyledTable/styles.css" />
{| class="wikitable styled-table" style="width:100%; text-align:center;"
|+ '''Table caption'''
|-
! Header 1 !! Header 2
|-
| Row 1, cell 1 || Row 1, cell 2
|-
| Row 2, cell 1 || Row 2, cell 2
|}

Tips:

  • Use style= for widths and alignment.
  • Use colspan= and rowspan= to merge cells.
  • A table of two or three rows usually reads better as a sentence.

Colours and styling

[edit source]

Inline styles work:

<span style="color: red;">Red text</span>
<div style="background-color:#f0f0f0; padding:10px;">Box</div>

For styling that works in both light and dark mode, put the CSS in a TemplateStyles page and load it:

<templatestyles src="Template:YourTemplate/styles.css" />

Code blocks and escaping wikitext

[edit source]

Wrap text in <nowiki></nowiki> to stop it being read as wiki markup:

[[Page Name]]

For a block of code, use <pre> tags:

<pre>
Line 1
Line 2
</pre>

Horizontal line

[edit source]

---- draws a horizontal line. Do not use it in articles; use a section heading instead.

Categories

[edit source]

Add a page to a category with:

[[Category:Category Name]]

See Help:Categories for which categories to use.

Templates

[edit source]

To include a template:

{{TemplateName}}

With parameters:

{{TemplateName | param1 = value | param2 = value }}

See Help:Templates.

Useful pages

[edit source]