Mediawiki is an open source wiki software environment, originally used by Wikipedia, and is currently used by many wikis across the web. It allows for very complicated amounts of formatting and design while still allowing for the flexibility to show information in a clean and simple manner. Mediawiki has its own formatting language that can be used within pages to format and display information.
Basics
Mediawiki automatically parses text into HTML to show pages. Different kinds of formatting can be specified with various tags, similar to HTML, but also uses groups of symbols to dictate tags as well. In general, most basic HTML tags can be used within pages to accomplish similar things to Mediawiki formatting. You can preview your formatting by clicking "Show preview" at the bottom of the editing window. It's recommended that you preview your changes before you save the page, just to make sure you haven't made a mistake.
Formatting
Description | Code | Results | When to Use | ||||
---|---|---|---|---|---|---|---|
Italic text | ''Italic'' |
Italic | For emphasis, notes, or titles of works. | ||||
Bold text | '''Bold''' |
Bold | For introductions and important words. | ||||
Bold and Italic text | '''''Bold and italic''''' |
Bold and italic | For greater emphasis, or when a particular work is important to the section. | ||||
Markup Escape | <nowiki>Not '''bold'''</nowiki> |
Not '''bold''' | To use formatting symbols in text. | ||||
Internal Links | [[Dota 2]] |
Dota 2 | When linking to a page on the Dota 2 Wiki. | ||||
Wikipedia Link | [[w:Dota 2|Dota 2]] |
Dota 2 | For inserting a link to a Wikipedia article. | ||||
External Links | [http://www.playdota.com/ Playdota] |
Playdota | When linking to other pages on the internet. | ||||
At the start of a line | |||||||
Section Headers | ==Level 2== ===Level 3=== ====Level 4==== |
Level 2Level 3Level 4 |
When starting a new section.
Note: Section headers are added to the Table of Contents if a page has more than 4 section headers. | ||||
Horizontal Rule | Text A ---- Text B |
Text A
Text B |
Rarely to separate groups of information. | ||||
Bulleted List | * A * B * C |
|
When creating a list. | ||||
Numbered List | # A # B # C |
|
When creating a list where order matters. | ||||
Indentation | : Indented Text :: More indentation :::: Very indented! |
|
When information below is relevant specifically to information above. | ||||
"Loose" Preformatting | Start each line with a space. The information is ''still'' formatted, but is placed in a '''neat box''' |
Start each line with a space. The information is still formatted, but is placed in a neat box |
When providing code where indentation is important. <pre></pre> is recommended, because it ignores formatting. | ||||
Images | |||||||
An inline image | [[File:Drow Ranger icon.png]] |
For certain symbols, or adding an image into an article. | |||||
A bordered image | [[File:Drow Ranger icon.png|border]] |
Draws a thin line around the image. For highlighting images on a dark background. | |||||
Image resized to width | [[File:Drow Ranger icon.png|100px]] |
Resizes the image so that its width matches the given size. Height is adjusted proportionally. For resizing larger images (the full size image can be viewed by clicking on it.) | |||||
Image resized to height | [[File:Drow Ranger icon.png|x100px]] |
Resizes the image so that its height matches the given size. Width is adjusted proportionally. For resizing images where the height is important. | |||||
Thumbnail image | [[File:Drow Ranger icon.png|thumb|caption]] |
For most images that are related to articles, but would not fit inline. | |||||
Framed image | [[File:Drow Ranger icon.png|frame|caption]] |
For images that do not fit inline, but where size is important. | |||||
Floating image | TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT [[File:Drow Ranger icon.png|100px|left]]TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT |
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXTTEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT | For inserting images and having text flow around them. "left" can be changed to "right to display on the right side of the screen. | ||||
Non-floating image | TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT [[File:Drow Ranger icon.png|100px|none]]TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT |
TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXTTEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT | For preventing an image from being inserted inline. "none" can be changed to "center" to center the image. | ||||
Image that links to a page | [[File:Drow Ranger icon.png|link=Drow Ranger]] |
For linking to articles and pages via an image. | |||||
Image that links to a website | [[File:Drow Ranger icon.png|link=http://www.playdota.c om/heroes/drow-ranger]] |
For linking to an external site via an image. | |||||
Image that doesn't link anywhere | [[File:Drow Ranger icon.png|link=]] |
For when images are used for decoration and should not be clicked on. | |||||
Tables | |||||||
A basic table | {| | An item || An item <!-- Header --> |- | An item || An item <!-- Content --> |} |
|
For positioning information.
Note: due to the nature of this page, this table is formatted wrong. | ||||
Wikitables | {| class = "wikitable" ! class = "header" | An item || An item <!-- Header --> |- | An item || An item <!-- Content --> |} |
|
For organizing information in a table. | ||||
For more about tables, see Mediawiki, Help:Tables. | |||||||
Templates | |||||||
Template Link | {{tl|Hero infobox}} |
{{Hero infobox}} |
For inserting a link to a Template without transclusion. | ||||
Comment | {{c|This is my comment}} |
This is my comment | For inserting a weighted comment to an open discussion. | ||||
Hero image | {{Hero|Drow Ranger}} |
For inserting an inline hero image that links to the hero's page. | |||||
{{Hero|Drow Ranger|25px}} |
For inserting a resized hero image. | ||||||
Image Tables | For information on using image tables, see {{img table el}} .
| ||||||
Video embedding | {{#ev:youtube|-cSFPIwMEq4}} |
For embedding a video |