Wiki-markup is a set of commands to specify how an article should look. This markup is incorporated into the article; it is invisible to readers, but becomes apparent as soon as you click on the edit this page tag. If you wish to contribute to Wikipedia, it is essential that you learn wiki-markup, at least the basic elements.

The following tables are designed to help you learn wiki-markup. The first two tables present the most basic and commonly used wiki-markup, whereas later tables show wiki-markup of ever greater complexity. All the tables highlight the wiki-markup in red, and show examples of the results. They also describe the customary way these markup commands are used on Wikipedia, with links to the Wikipedia's Manual of Style for more details.

Wiki-markup is a shorthand for HTML markup. It replaces HTML tags with punctuation marks that are very rare in normal text, such as a double square bracket, double equal signs, or double single quotes. If you know HTML tags, learning wiki markup should be relatively easy. The HTMl equivalents are also given in the tables below.

A simpler version of this page can be found at WP:CHEAT ("the cheat sheet").

Article basics edit

Article basics
Description Example Wiki HTML tag Usage
Paragraphs blank line <p>text</p> Common
Paragraphs are separated by a exactly one blank line. They are the most common, but most invisible, markup.
Wikilinks
 
DNA [[DNA]] (2 square brackets) <a href="DNA">text</a> Common
Wikilinks (also known as "internal links") are the bread-&-butter of Wikipedia, and part of the reason for its success. They can be used in lieu of a detailed explanation — and to reconcile the sometimes competing needs to be intelligible to lay-people, and yet technically accurate. Thus, if readers wish to know more about the topic, they can click on the link. For more details on the customary usage of wikilinks, please follow this link.
Headings
 
==Section heading== (2 equal signs)
===Subsection heading=== (3 equal signs)
====Subsubsection heading==== (4 equal signs)
<h2>text</h2>
<h3>text</h3>
<h4>text</h4>
Common
Headings are essential for organizing the articles. However, you should never create an H1 heading with one equal sign, e.g., =Subsection heading=.
References
 
Assertion.[1] Assertion.<ref>Text</ref> none Common
References are essential for Wikipedia's reliability. They are placed after the assertion and any adjacent punctuation, such as a period or comma. They appear as superscripted numbers that link to a "References" section at the end of the article.
Images
 
[[DNA_replication.svg|thumb|left|120px|Diagram of DNA replication]]
(2 square brackets + parameters)
<img src="DNA_replication.svg" width="120" /> Common
In this example, "thumb" allows for a caption, "left" aligns the image on the left margin, and "120px" sets the width in pixels. The final parameter is the caption.

Talk-page basics edit

Talk-page basics
Description Example Wiki HTML tag Usage
Signature
 
Proteins (talk) 13:16, 11 July 2009 (UTC) ~~~~ (4 tildes) none Common
You should append your signature to every Talk-page message you write, to identify yourself as the speaker. However, signatures should never appear in an article.
Indentation Previous sentence.
Indented text.
Previous sentence.
:Indented text (1 colon)
::Doubly indented text (2 colons), etc.
Previous sentence.
<dd>Indented text</dd>
Common
Wikipedians often indent their messages on Talk pages when they reply to another person's message. The colons must be the first characters on a new line. There is no limit to the number of colons (indentation levels); in practice, however, it is rare to see more than 10 levels, since people "outdent" to have more space.
Bulleted list
 
  • First list item.
  • Second list item
    • Second-level item
* First list item.
* Second list item
** Second-level item
<ul>
<li>First list item.</li>
<li>Second list item</li>
<ul>
<li>Second-level item</li>
</ul>
</ul>
Common on Talk pages,
relatively rare elsewhere
On Talk pages, bullet points are often used as a cue to indicate a new speaker in a discussion. Indentation (see entry above) is used for the same effect, and the two are often combined.

Font effects edit

A complementary introduction to character formatting can be found here.

Font effects
Description Example Wiki HTML tag Usage
Italics
 
text ''text'' (2 single quotes) <em>text</em> Rare
Italics are used mainly in references such as Journal of Molecular Biology, in taxonomic names such as Vibrio cholerae. In general, italics should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow this link to our Manual of Style.
Bold
 
text '''text''' (3 single quotes) <b>text</b> Rare, usually once per article
Boldface text is generally used only once in an article, to highlight the article topic in the first sentence of the lead. In general, boldface type should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow this link to our Manual of Style.
Superscript
Subscript
  
atext
btext
a<sup>text</sup> (enclose in sup tags)
b<sub>text</sub> (enclose in sub tags)
identical Rare, except for math
Super- and subscripts are used mainly in mathematical formulae. They are preferable to math mode (see below) because they do not require ALT text.
Strike
 
text <s>text</s> (enclose in s tags) identical Never, except on Talk pages
Strikethrough text is almost never used in articles. It is used on Talk pages mainly when reviewing articles on Wikipedia, to show that a criticism has been satisfied.
Small
 
Normal text small text <small>text</small> (enclose in small tags) identical Never, except on Talk pages
Small font is almost never used on articles. It is used on Talk pages mainly to indicate that the text describes a minor detail.

Links and lists edit

Lists and links
Description Example Wiki HTML tag Usage
External links
 
Home page for the NIH [http://www.nih.gov Home page for the NIH] (1 square bracket) none Common
In articles, external links are found almost exclusively two places: (1) links to the cited references and (2) in the final section entitled appropriately "External links". For the rest of the article, external links should not be used. For further details of the customary usage on Wikipedia, please follow this link.
Section links DNA#Replication [[DNA#Replication]]
(2 square brackets with # sign before section name)
Rare
This special case of wikilinks allows the reader to be directed to a specific section or subsection of an article. This can also be used for navigation within an article, e.g., when referring the reader to a passage above or below. An example: "As discussed above, wikilinks are the hallmark of a Wikipedia article."
Redirect
 
#REDIRECT [[Article to which the reader should be redirected]] none Rare
This markup sends the reader directly to another article, or to a specific section of another article. This is useful for synonyms and common misspellings of the main article name, or when the topic has been covered within another article of larger scope.
Bulleted list
 
  • First list item.
  • Second list item
    • Second-level item
* First list item.
* Second list item
** Second-level item
<ul>
<li>First list item.</li>
<li>Second list item</li>
<ul>
<li>Second-level item</li>
</ul>
</ul>
Common on Talk pages,
relatively rare elsewhere
On Talk pages, bullet points are often used as a cue to indicate a new speaker in a discussion. Otherwise, they're used relatively rarely. The bullet points are created by beginning a line with an asterisk.
Numbered list
 
  1. First list item.
  2. Second list item
    1. 2nd-level item
# First list item.
# Second list item
## 2nd-level item
<ol>
<li>First list item.</li>
<li>Second list item</li>
<ol>
<li>2nd-level item</li>
</ol>
</ol>
Rare
Numbered lists are used relatively rarely on Wikipedia. The numbering is created by adding a pound sign # to beginning of any line.
Definition list
 
Adenosine
Adenosine is...
Alanine
Alanine is...
; Adenosine
: Adenosine is...
; Alanine
: Alanine is...
<dl>
<dt>Adenosine</dt>
<dd>Adenosine is...</dd>
<dt>Alanine</dt>
<dd>Alanine is...</dd>
</dl>
Rare
Definition lists are used relatively rarely on Wikipedia. The boldface terms are created by beginning the line with a semicolon; the subsequent definitions are created by starting the line with a colon, as in indentation.

Templates and tables edit

Complex wiki-markup
Description Example Wiki HTML tag Usage
Templates {{page being transcluded}} (2 curly braces) none Common
Templates are used to include the same material in multiple pages; this is called transcluding. The advantage is that this material is stored only once, but appears on many pages. Thus, a change to the master copy appears immediately on all of the transcluding pages. Templates are often used to establish a common format across many articles.
Tables
 
Table caption
Heading 1 Heading 2 etc.
Row 1, column 1 Row 1, column 2 etc.
Row 2, column 1 Row 2, column 2 etc.
{| class="wikitable sortable"
|+Table caption
! Heading 1 !! Heading 2 !! etc.
|-
| Row 1, column 1 || Row 1, column 2 || etc.
|+
| Row 2, column 1 || Row 2, column 2 || etc.
|}
<table>
<caption>Table caption</caption>
<tbody>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
<th>etc.</th>
</tr>
<tr>
<td>Row 1, column 1</td>
<td>Row 1, column 2</td>
<td>etc.</td>
</tr>
<tr>
<td>Row 2, column 1</td>
<td>Row 2, column 2</td>
<td>etc.</td>
</tr>
</tbody>
</table>
Rare
Although far simpler than the corresponding HTML code, the wiki markup for tables is probably the most difficult to learn. It may be simplest just to learn to click on the toolbar button (shown here in the leftmost column under Tables). Tables are powerful tools for presenting information, but they should be used sparingly, since Wikipedia favors prose explanations. Table markup symbols generally consist of vertical bars | (also called "pipes") combined with other punctuation.

Miscellany edit

Miscellaneous wiki-markup
Description Example Wiki HTML tag Usage
No wiki
 
<nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.
Hidden comment
 
<!-- Hidden comment --> identical Rare
Hidden comments are visible to editors but not to readers of the article. They're used mainly to explain why certain editorial choice were made. They are also used to dissuade new editors from making common mistakes.
Math mode
 
  <math>\sin\theta = \frac{a}{\sqrt{a^{2} + b^{2}}}</math> none Rare
Beautifully formatted mathematical formulae can be obtained by enclosing LaTeX commands in <math> tags. To make these formulae accessible to visually impaired readers, the math tag should have ALT text enclosed in double quotes, e.g., <math alt="The sine of theta equals a divided by the square root of a squared plus b squared.">\sin\theta = \frac{a}{\sqrt{a^{2} + b^{2}}}</math>.
Footnotes Assertion.[note 1] Assertion.<ref group=note>Explanatory text.</ref> none Common
Footnotes are not citations to the scholarly literature, but rather explanatory notes that would otherwise interrupt the flow of the writing. Similar to references, they are placed after the assertion being clarified and any adjacent punctuation, such as a period or comma. They appear as superscripted numbers that link to a "Footnotes" section at the end of the article.

Special text formatting edit

Special text formatting
Description Example Wiki HTML tag Usage
Blockquotes
 
<blockquote>text</blockquote>
(enclose in <blockquote> HTML tags)
identical Rare
Blockquotes are used for long quotations.
Preformatted <pre>text</pre>
(initial space on line, or enclose in <pre> HTML tags)
identical Rare
Preformatted text is quite rare, but can be used to get specific layout effects, or to distinguish a section of text.
Poem <poem>text</poem>
(enclose in <poem> tags)
none Very rare
As expected, used only for poetry.

Multimedia edit

Multimedia
Description Example Wiki HTML tag Usage
Galleries
 
Common
Galleries...
Audio Common
Audio...
Video Common
Video...
Imagemaps
 South DerbysDerbyErewashAmber ValleyDerbyshire DalesHigh PeakNorth East Derbys.ChesterfieldBolsoverNottinghamshireLeicestershireStaffordshireSouth YorksManchester
Click on image
Common
Image maps....
Timelines Common
Timelines...

Deprecated edit

Although wiki-markup allows for them, these HTML elements should not be used on Wikipedia.

Deprecated wiki-markup
Description Example Wiki HTML tag Usage
H1 headings =H1 heading= (1 equal sign) <h1>text</h1> NEVER
H1 headings should never be used on Wikipedia because the article name at the top of the page is the H1 heading.
Horizontal rule ---- (4 hyphens) <hr> NEVER
Horizontal rules should never be used on Wikipedia.

Footnotes edit

  1. ^ Explanatory text.

References edit

  1. ^ Text