Help editing

Help editing
Jump to: navigation, search

Contents

MediaWiki Handbook


Wiki Markup Reference

This Wikitext markup reference is based on meta:Wikitext examples and the Mozilla Center Wiki Markup Reference.

See also:


[edit] Sections, Paragraphs, Newlines

Result Markup
Sections


Section


Sub-section


Sub-sub-section

Sub-sub-sub-section

If your document needs more than four section levels, it is recommended that you break it up into smaller pages and link those together.

= Section =

== Sub-section ==

=== Sub-sub-section ===

==== Sub-sub-sub-section ====
Paragraphs and Newlines

A single carriage-return between lines does nothing.

Leaving a blank line

indicates a new paragraph.

You can
use "br" tags
to force
a newline.

A single carriage-return between
lines does nothing.

Leaving a blank line

indicates a new paragraph.

You can<br />
use "br" tags<br />
to force<br />
a newline.

[edit] Categories

Every page in the wiki should be included in at least one MediaWiki Category. To add a category to a page, use the following syntax:

[[Category:CategoryName]]

These category links should be put at the bottom of the page after the content. Add as many Category links as appropriate. For example, a tutorial about how to use Venkman could be in the "Venkman", "Tools", and "Tutorials" categories.

All categories, in turn, should be put in Category:All Categories.

[edit] Force Ignore of Wiki Markup

If you need a particular piece of wiki markup ignored by the parser, simply enclose it in "nowiki" tags, like so:

<nowiki>'''this wiki markup will not be interpreted'''</nowiki>

'''this wiki markup will not be interpreted'''

[edit] Images

Result Markup
Images

Inline image... Image:MediaWikiLogo.png

[[Image:MediaWikiLogo.png]]

Inline image with alt text... MediaWiki is a free software wiki package originally written for Wikipedia.

[[Image:MediaWikiLogo.png | MediaWiki is a free software
 wiki package originally written for Wikipedia.]]
MediaWiki is a free software wiki package originally written for Wikipedia.
MediaWiki is a free software wiki package originally written for Wikipedia.

Thumbnail image with alt text...

[[Image:MediaWikiLogo.png | thumb | 
 [[MediaWikiWiki:MediaWiki|MediaWiki]]
 is a free software 
wiki package originally written 
for [[Wikipedia:Main Page|Wikipedia]].]]

Link to a picture...

MediaWiki logo

[[media:MediaWikiLogo.png|MediaWiki logo]]

[edit] Tables

Result Markup
Table Markup

You can use regular HTML table markup to do wiki tables, or you can use the wiki markup. The wiki table markup uses fewer characters, but that's the only real advantage. Use what you're most comfortable with.

heading 1 heading 2
cell 1 cell 2
<table class="standard-table">
  <tr>
    <th>heading 1</th>
    <th>heading 2</th>
  </tr>
  <tr>
    <td>cell 1</td>
    <td>cell 2</td>
  </tr>
</table>
heading 1 heading 2
cell 1 cell 2
{| class="standard-table"
|-
|class="header"|heading 1
|class="header"|heading 2
|-
|-
|cell 1
|cell 2
|-
|}


[edit] Lists

Result Markup
Bulleted Lists
  • Manuals
    • Reference
    • Guide
  • Articles
    • Tutorials
      • JavaScript
      • HTML
      • CSS
    • Tips & Tricks
  • FAQs

List bullets, indenting, and so forth can be changed via CSS.

* Manuals
** Reference
** Guide
* Articles
** Tutorials
*** JavaScript
*** HTML
*** CSS
** Tips & Tricks
* FAQs
Numbered Lists
  1. Manuals
    1. Reference
    2. Guide
  2. Articles
    1. Tutorials
      1. JavaScript
      2. HTML
      3. CSS
    2. Tips & Tricks
  3. FAQs

List numbers and styling can be changed via CSS.

# Manuals
## Reference
## Guide
# Articles
## Tutorials
### JavaScript
### HTML
### CSS
## Tips & Tricks
# FAQs
Definition Lists

Here's a definition list:

Word 
Definition of the word
A longer phrase needing definition
Phrase defined
A word 
Which has a definition
Also a second one
And even a third

Begin with a semicolon. One item per line; a newline can appear before the colon, but using a space before the colon improves parsing.

Here's a ''definition list'':
; Word : Definition of the word
; A longer phrase needing definition
: Phrase defined
; A word : Which has a definition
: Also a second one
: And even a third

Begin with a semicolon. One item per line; 
a newline can appear before the colon, but 
using a space before the colon improves 
parsing.


Mixed Lists
  • You can even do mixed lists
    1. and nest them
    2. inside each other
      • or break lines
        in lists.
      definition lists
      can be
      nested 
      too
* You can even do mixed lists
*# and nest them
*# inside each other
*#* or break lines<br>in lists.
*#; definition lists
*#: can be 
*#:; nested : too


[edit] Links

Result Markup
Internal Links

Simple internal link to another page...

April 1st is April Fool's Day.

April 1st is [[April Fool's Day]].

Internal link where the target page title is different than the link text...

April 1st happens to be Dria's birthday.

[[April Fool's Day|April 1st]] happens to be Dria's birthday.

Internal link to a specific section of another page...

Some April Fool Birthdays.

[[April Fool's Day#Birthdays|Some April Fool Birthdays]].

Endings are blended into the link...

In April, the crocuses begin to bloom.

In April, the [[crocus]]es begin to bloom.

Adding a signature that links to your User page...

Dria

or

Dria 13:39, 15 Mar 2005 (EST)

~~~

or

~~~~
External Links

Straight URL linking...

http://www.mozilla.org

http://www.mozilla.org

External Link with different link text...

Mozilla Project

[http://www.mozilla.org Mozilla Project]

Link to bug in Mozilla's Bugzilla...

Template:Bug

{{bug|322603}}
Interwiki Links

An interwiki link links a page to a page on another website, usually a wiki. They are like internal links but take a prefix which specifies the target site.

* afj: [[afj:Main Page | (not the) Apollo 17 Flight Journal]]
* MediaWikiWiki: [[MediaWikiWiki:Main Page]]
* metawikipedia: [[MetaWikiPedia:Main Page]]
* wikipedia: [[Wikipedia:Main Page]]
* commons: [[Commons:Main Page]]

[edit] Footnotes and citations

Result Markup

You can add footnotes to sentences using the ref tag -- this is especially good for citing a source.

There are over six billion people in the world.[1]
References:
  1. CIA World Factbook, 2006.

For details, see Wikipedia:Footnotes and Help:Footnotes.

You can add footnotes to sentences using
the ''ref'' tag -- this is especially good
for citing a source.

:There are over six billion people in the
world.<ref>CIA World Factbook, 2006.</ref>

References: <references/>

For details, see [[Wikipedia:Footnotes]]
and [[Help:Footnotes]].
Citations
The Citation template is a versatile template for citing books, periodicals, contributions in collective works, patents, and web-sites.
Books
{{Citation
 | last =
 | first =
 | author-link =
 | last2 =
 | first2 =
 | author2-link =
 | publication-date =
 | date =
 | year =
 | title =
 | edition =
 | volume =
 | publication-place =
 | place =
 | publisher =
 | id =
 | isbn =
 | doi =
 | oclc =
 | url =
 | accessdate =
 }}
Journals, news
{{Citation
 | last=
 | first=
 | author-link=
 | publication-date=
 | date=
 | year=
 | title=
 | periodical=
 | publication-place=
 | place=
 | publisher=
 | volume=
 | issue=
 | pages=
 | url=
 | issn=
 | doi=
 | oclc=
 | accessdate=
 }}
Edited books, encyclopedias
{{Citation
 | last=
 | first=
 | author-link=
 | last2=
 | first2=
 | author2-link=
 | year=
 | date=
 | publication-date=
 | contribution=
 | contribution-url=
 | editor-last=
 | editor-first=
 | editor-link=
 | editor2-last=
 | editor2-first=
 | editor2-link=
 | title=
 | edition=
 | place=
 | publication-place=
 | publisher=
 | volume=
 | pages=
 | id=
 | isbn =
 | doi=
 | oclc=
 | url=
 }}
Periodical contributions etc.
{{Citation
 | last=
 | first=
 | author-link=
 | last2=
 | first2=
 | author2-link
 | year=
 | date=
 | publication-date=
 | contribution=
 | contribution-url=
 | editor-last=
 | editor-first=
 | editor-link=
 | editor2-last=
 | editor2-first=
 | editor2-link=
 | title=
 | periodical=
 | volume=
 | issue=
 | pages=
 | place=
 | publication-place=
 | publisher=
 | id=
 | issn=
 | doi=
 | oclc=
 | url=
}}

[edit] Comments

Result Markup

Use comments to leave notes and instructions for other writers, editors, and reviewers.

 Use comments to leave notes and
 instructions for other writers,
 editors, and reviewers.

 <!--- The comment here is not shown
 in the result.  It is exactly the
 same as an HTML comment. --->

[edit] HTML in Wikitext

The following tags are currently allowed in wiki markup:

[edit] Parser functions

extensionfunction
standardlc
standarduc
standardlcfirst
standarducfirst
standardurlencode
standardlocalurl
standardfullurl
standard#language
ParserFunctions#expr
ParserFunctions#ifexpr
ParserFunctions#if
ParserFunctions#ifeq
ParserFunctions#ifexist
ParserFunctions#rel2abs
ParserFunctions#switch
ParserFunctions#time
MediaWikiWiki:Extension:ForeachFunction#foreachx
MediaWikiWiki:Extension:ForeachFunction#foreachy
MediaWikiWiki:Extension:AddScriptCss#addscript
MediaWikiWiki:Extension:ImageLink#imagelink
MediaWikiWiki:Extension:InterWikiLinkManager#iwl
MediaWikiWiki:Extension:PageAfterAndBefore#pagebefore
MediaWikiWiki:Extension:PageAfterAndBefore#pageafter
MediaWikiWiki:Extension:PageAfterAndBefore#firstpage
MediaWikiWiki:Extension:PageAfterAndBefore#lastpage
MediaWikiWiki:Extension:PageFunctions#pagetitle
MediaWikiWiki:Extension:PageFunctions#pagesubtitle
MediaWikiWiki:Extension:PageFunctions#pageexists
MediaWikiWiki:Extension:PageFunctions#varset
MediaWikiWiki:Extension:PageFunctions#varget
MediaWikiWiki:Extension:PageFunctions#varcapset
MediaWikiWiki:Extension:PageFunctions#cshow
MediaWikiWiki:Extension:PageFunctions#varaset
MediaWikiWiki:Extension:PageFunctions#varaget
ParserFunctions (extended)#expr (extended)
ParserFunctions (extended)#ifexpr (extended)
ParserFunctions (extended)#min
ParserFunctions (extended)#max
ParserFunctions (extended)#if
ParserFunctions (extended)#ifeq
ParserFunctions (extended)#ifexist
ParserFunctions (extended)#rel2abs
ParserFunctions (extended)#switch
ParserFunctions (extended)#time
MediaWikiWiki:Extension:RegexTools#regex
MediaWikiWiki:Extension:RegexTools#regex_vars
StringFunctions#len
StringFunctions#pos
StringFunctions#rpos
StringFunctions#sub
StringFunctions#pad
StringFunctions#replace
StringFunctions#explode
StringFunctions#urlencode
StringFunctions#urldecode
LoopFunctions#for
LoopFunctions#foreach
Infobox Data Capture#dataentry
Infobox Data Capture#listsplit
MediaFunctions#media..
Labeled Section Transclusion#lst
Labeled Section Transclusion#lstx
Labeled Section Transclusion#lsth
ExpandAfter#expandafter
VariablesExtension#vardefine
VariablesExtension#var
DynamicFunctions#arg
DynamicFunctions#ip
DynamicFunctions#rand
DynamicFunctions#skin
Data#data
Data#sort
DynamicPageList#dpl
Simple Security#security
Tree view#tree
Livelets [1]#live
Secure Properties#pg
Secure Properties#ps
Secure Properties#pf
Secure Properties#gg
Secure Properties#gs