Help:Formatting
Most formatting changes can be made using VisualEditor. The much of the information below is aimed at those using enhanced editor, primarily editing the wikitext rather than using the Editing Toolbar. The wikitext consists of normal characters like asterisks, single quotes or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in italic, you include it in two pairs of single quotes like ''this''
.
For a more detailed explanation of formatting options, see Wikipedia:Manual of Style.
Text formatting markup
Please note, the table below is aimed at those using Enhanced editor. The wikitext should be hidden for those using VisualEditor. |
Description | You type | You get | |
---|---|---|---|
character (inline) formatting – applies anywhere | |||
Italic text | ''italic''
|
italic | |
Bold text | '''bold'''
|
bold | |
Bold and italic | '''''bold & italic'''''
|
bold & italic | |
Strike text | <strike>strike text</strike>
|
||
Show wiki text | <nowiki>show '''wikitext'''</nowiki>
|
show '''wiki text'''
apply wiki text | |
No space after link | [[Acronym S]]<nowiki/>& [[Acronym T]] & [[Acronym U]]
|
||
section formatting – only at the beginning of the line | |||
Headings of different levels | == Heading / Level 2 == === Sub-heading 1 / Level 3 === ==== Sub-heading 2 / Level 4 ==== ===== Sub-heading 3 / Level 5 ===== ====== Sub-heading 4 / Level 6 ====== [[#ref_
|
^]] | |
Horizontal rule | Text above ---- Text below |
Text above Text below | |
Bullet list | * Start each line * with an asterisk (*). ** More asterisks gives deeper *** and deeper levels. * Line breaks |
Any other start ends the list. | |
Numbered list | # Start each line # with a number sign (#). ## More number signs gives deeper ### and deeper ### levels. # Line breaks |
Any other start also ends the list. | |
Definition list | ;item 1: definition 1 ;item 2 : definition 2-1 : definition 2-2 |
| |
Indent text | : Single indent :: Double indent ::::: Multiple indent |
| |
Mixture of different types of list | # one # two #* two point one #* two point two # three #; three item one #: three def one # four #: four def one #: this looks like a continuation #: and is often used #: instead <span class="citation wikicite" id="endnote_The usage of |
| |
Preformatted text | Start each line with a space. Text is '''preformatted,''' but ''character formatting markups'' '''''can''''' be done. |
Start each line with a space. Text is preformatted, but character formatting markups can be done. | |
Preformatted text blocks | <nowiki>Start with a space in the first row (before a <nowiki>), and your block format will be maintained without needing spaces at the start of every line. This is good for copying in code blocks: def function(): """documentation string""" if True: print True else: print False</nowiki> |
Start with a space in the first row (before a <nowiki>), and your block format will be maintained without needing spaces at the start of every line. This is good for copying in code blocks: def function(): """documentation string""" if True: print True else: print False | |
Editor comments | <!-- Comment text only appears when you are editing the page. --> Comments are visible only in edit mode. {{comment|You can also put comments in wiki markup using the {{comment}} template.}} |
Comments are visible only in edit mode. |
Paragraphs
MediaWiki ignores single line breaks. To start a new paragraph,
- In VisualEditor, just use the ↵ Enter key one time
- In Enhanced editor, leave an empty line between text (use the ↵ Enter key two times). You can force a line break within a paragraph with the HTML tag
<br/>
, which is an option on it's Editing toolbar.
Lists
These details relate to editors using Enhanced editor. Both Editing toolbars have options for many of the lists For a more detailed coverage of this topic, see Help:Lists.
Description | You type | You get |
---|---|---|
No extra lines between items | White rose Yellow rose Pink rose Red rose |
White rose Yellow rose Pink rose Red rose |
Extra lines between items | White rose Yellow rose Pink rose Red rose |
White rose Yellow rose Pink rose Red rose |
Bulleted list | * White rose * Yellow rose * Pink rose * Red rose |
|
Numbered list | # White rose # Yellow rose # Pink rose # Red rose |
|
Line breaks (Accessibility problems - See Unbulleted vertical lists for other options) | White rose<br /> Yellow rose<br /> Pink rose<br /> U.S. Department of Energy |
White rose |
Unbulleted list | {{unbulleted list | White rose | Yellow rose | Pink rose | Red rose }} |
|
Inserting symbols
Symbols and other special characters not available on your keyboard can be inserted through
- Special character insertion (VisualEditor)
- Special Characters (Enhanced editor) or
- a special sequence of characters called HTML entities. For example, the following sequence (entity) → when inserted will be shown as right arrow HTML symbol → and — when inserted will be shown as an em dash HTML symbol —
HTML symbol entities | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Á | á | Â | â | ´ | Æ | æ | À | à | ℵ | Α | α | & | ∧ | ∠ | Å | å | ≈ | Ã | ã | Ä | ä | „ | Β | β | ¦ | • | ∩ | Ç | ç | ¸ | ¢ |
Χ | χ | ˆ | ♣ | ≅ | © | ↵ | ∪ | ¤ | † | ‡ | ↓ | ⇓ | ° | Δ | δ | ♦ | ÷ | É | é | Ê | ê | È | è | ∅ | Ε | ε | ≡ | Η | η | ||
Ð | ð | Ë | ë | € | ∃ | ƒ | ∀ | ½ | ¼ | ¾ | ⁄ | Γ | γ | ≥ | > | ↔ | ⇔ | ♥ | … | Í | í | Î | î | ¡ | Ì | ì | ℑ | ∞ | ∫ | Ι | ι |
¿ | ∈ | Ï | ï | Κ | κ | Λ | λ | ⟨ | « | ← | ⇐ | ⌈ | “ | ≤ | ⌊ | ∗ | ◊ | | ‹ | ‘ | < | ¯ | — | µ | · | − | Μ | μ | ∇ | – | |
≠ | ∋ | ¬ | ∉ | ⊄ | Ñ | ñ | Ν | ν | Ó | ó | Ô | ô | Œ | œ | Ò | ò | ‾ | Ω | ω | Ο | ο | ⊕ | ∨ | ª | º | Ø | ø | Õ | õ | ⊗ | Ö |
ö | ¶ | ∂ | ‰ | ⊥ | Φ | φ | Π | π | ϖ | ± | £ | ′ | ″ | ∏ | ∝ | Ψ | ψ | " | √ | ⟩ | » | → | ⇒ | ⌉ | ” | ℜ | ® | ⌋ | Ρ | ρ | |
› | ’ | ‚ | Š | š | ⋅ | § | | Σ | σ | ς | ∼ | ♠ | ⊂ | ⊆ | ∑ | ⊃ | ¹ | ² | ³ | ⊇ | ß | Τ | τ | ∴ | Θ | θ | ϑ | Þ | þ | ˜ | |
× | ™ | Ú | ú | ↑ | ⇑ | Û | û | Ù | ù | ¨ | ϒ | Υ | υ | Ü | ü | ℘ | Ξ | ξ | Ý | ý | ¥ | ÿ | Ÿ | Ζ | ζ | | |
Description | You type | You get |
---|---|---|
Copyright symbol | &copy;
|
© |
Greek delta letter symbol | &Delta;
|
Δ |
Euro currency symbol | &euro;
|
€ |
See the list of all HTML entities on the Wikipedia article List of HTML entities. Additionally, MediaWiki supports two non-standard entity reference sequences: &רלמ;
and &رلم;
which are both considered equivalent to ‏
which is a right-to-left mark. (Used when combining right to left languages with left to right languages in the same page.)
Columns
When using VisualEditor, columns force individuals to make changes to the page using Enhanced editor. |
The {{col-begin}}
, {{col-break}}
and {{col-end}}
templates control columns of text on a page:
{{col-begin}}
: starts a table (followed by{{col-break}}
for 1st column){{col-break}}
: triggers the start of each column{{col-end}}
: ends the multi-column table.
See Template:Column templates for more details.
{{Div col}}, together with {{div col end}}, is used to make a list into columns. It automatically breaks each column into an equal space, meaning, for instance, it isn't necessary to work out the halfway point between two columns. The template also offers options to set a smaller (90%) font-size (|small=yes
), place vertical lines ("rules") between the columns (|rules=
) and to add other custom styling (|style=
).
See Template:Div col/doc for more information. Template:Columns-list is an alternative.
Table of Contents
For each page with more than three headings, a table of contents (TOC) is automatically generated from the section headings. By default, it appears below the lead section, however it can be manually positioned at another location on the page. By default it also includes all section heading levels. This can be changed as well by limiting the depth of the table of contents.
Collapsing
Collapsable
<div id="mw-customcollapsible-0" class="mw-collapsible mw-notcollapsed"> </div>
Collapse by default
<div id="mw-customcollapsible-0" class="mw-collapsible mw-collapsed"> </div>
Callout
When using VisualEditor, callout force individuals to make changes to the page using Enhanced editor. |
The {{Callout}}
template is used as a way of emphasizing a piece of text that comes from an email announcement or other vehicle, which is not intended to be altered because it reflects official communication. When used, the text should include enough detail to understand who it came from and when. This is especially used on Inside Saintapedia.
Example
{{Callout|title=hi|text=blah, blah, blah}}
hi |
---|
blah, blah, blah |
Tab templates
Tabs have primarily been used on Portals. This section is being developed as we explore adding them to individual pages. |
Common formatting issues
There are many common formatting issues that can be easily resolved.
Box around text
This formatting should be appear as normal text.
If you add a space in front, a box is put around the text.
Other formatting
Beyond the text formatting markup shown above, here are some other formatting references:
You can find more references at Help:Contents.
HTML tags
Some HTML tags are allowed in MediaWiki, for example <code>
, <div>
, <span>
and <font>
when using Enhanced editor. These apply anywhere you insert them.
Description | You type | You get |
---|---|---|
Inserted (Displays as underline in most browsers.) |
<ins>Inserted</ins> or <span style="text-decoration: underline;">Underline</span> |
Inserted or Underline |
Deleted (Displays as strikethrough in most browsers.) |
<del>Deleted</del> or <span style="text-decoration:line-through;">Deleted</span> |
or Deleted |
Fixed width text | <code>Source code</code> or <tt>Fixed width text</tt> |
or Fixed width text |
Blockquotes | text above text above <blockquote>blockquote</blockquote> text below text below |
text above text above
text below text below |
Comment | <!-- This is a comment --> Comments are only visible in the edit window. |
Comments are only visible in the edit window. |
Completely preformatted text | <pre> Text is '''preformatted''' and ''markups'' '''''cannot''''' be done</pre> |
Text is '''preformatted''' and ''markups'' '''''cannot''''' be done |
Customized preformatted text | <pre style="color:red"> Text is '''preformatted''' with a style and ''markups'' '''''cannot''''' be done </pre> <span class="citation wikicite" id="endnote_A CSS style can be named within the |
Text is '''preformatted''' with a style and ''markups'' '''''cannot''''' be done |
Customized preformatted text with text wrap according to screen width | <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word"> This longer sentence is used to demonstrate text wrapping. </pre> |
This longer sentence is used to demonstrate text wrapping. |
Preformatted text with text wrap according to screen width | <code> This longer sentence is used to demonstrate text wrapping. </code> |
|
HTML tags and symbol entities displayed themselves (with and without interpreting them)
- &euro; → €
- <span style="color: red; text-decoration: line-through;">Typo to be corrected</span> → Typo to be corrected
- <span style="color: red; text-decoration: line-through;">Typo to be corrected</span> → <span style="color: red; text-decoration: line-through;">Typo to be corrected</span>
Nowiki for HTML
<nowiki /> can prohibit (HTML) tags:
- <<nowiki />pre> → <pre>
But not & symbol escapes:
- &<nowiki />amp; → &