Difference between revisions of "Wikitext"
m (Mlink-rodrigue moved page Manual:Wikitext to Wikitext without leaving a redirect) |
(Tag: Visual edit) |
Contents
What is Wikitext?[edit | edit source]
Wikitext is a simplified markup language that is used to format and structuretext and other data. While HTML is the most common markup language for web pages, Wikitext is used in wiki systems. Like HTML, it uses tags to mark parts of tags or other data.
How do I use Wikitext?[edit | edit source]
When you edit a page, you can switch between Visual editing and source editing:
Wikitext can be entered in source editing mode. When you are in visual editing mode, VisualEditor inserts Wikitext "behind the scenes". If VisualEditor doesn't format elements on a page correctly, you can always switch to source editing to correct the issues directly in Wikitext.
Examples of Wikitext[edit | edit source]
Here are some typical examples of Wikitext:
Formatting[edit | edit source]
-
This is
'''bold'''
-
This is
''italic''
-
This is
<u>underlined</u>
Structuring[edit | edit source]
This is aHeadings[edit | edit source]
- (1st level): reserved for page title
-
2nd level:
==Section Heading==
-
This is an
*unordered list item (first level)
- Table: Table:
header 1 | header 2 |
---|---|
row 1, cell 1 | row 1, cell 2 |
row 2, cell 1 | row 2, cell 2 |
-
heading==
-
3nd level:
===Section sub-heading===
Lists[edit | edit source]
-
ordered (numbered):
# One ## One-point-one ### One-point-one-point-one # Two
-
unordered (bulleted):
*
-
definition list:
;Fire:provides energy and light
Tables[edit | edit source]
{| class="wikitable"
|-
!header 1
!header 2
|-
|row 1, cell 1
|row 1, cell 2
|-
|row 2, cell 1
|row 2, cell 2
|}
Links[edit | edit source]
Insert a link: [[Wiki internal[edit | edit source]
-
[[Page title]]
-
[[Pancake | Best pancake]]
-- this creates a link to the page "Pancake" with the link description "Best pancake".
- see also the Mediawiki help page for links: https://www.mediawiki.org/wiki/Help:Links and the
- and the help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages
-
links with parameters / links that open in a new tab:
<span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</span>
Wiki external[edit | edit source]
-
[[http://www.hallowelt.com Hallo Welt!]]
-
http://www.hallowelt.com
Files/Images[edit | edit source]
-
Image link:
[[Media:Someimage.png]]
-
Embed an image:
Images[[File:Someimage.png]]
-- This embeds the image
- Someimage.png on the page.
- embedding only happens when a link points to the "File" namespace
- the wiki checks if a preview/thumbnail can be created automatically (e.g. image formats like "png", "jpeg", "gif", "svg") and then embeds a preview into the page
- otherwise a link will be created to the wikipage in the "File" namespace (aka "file description page")
-
Embed a file:
[[Media:SomePDF.pdf]]
- can be embedded: PDF, Tiff (needs extension)
- cannot be embedded: Microsoft Office and Libre Office files; Shell-Scripts, ...
Formatting example: File:Someimage.png|thumb|50px|left|alt=Screenshot of the edit menu|The edit menu
Magic words[edit | edit source]
Magic words are strings of text that Mediawiki associates with a return value or function. Examples are:
-
"Behavior switch", aka "Double underscore", e.g.
__TOC__
-
"Variables", e.g.
{{FULLPAGENAME}}
-
"Tags", e.g.
<gallery>
-
"ParserFunctions", e.g.
{{#ifeq:x|y|true|false}}
External resources[edit | edit source]
For a more complete list of all Wikitext tags, you can refer to the Wikimedia page
Related info
.
==What is Wikitext?== Wikitext is a simplified markup language that is used to format and structuretext and other data. While HTML is the most common markup language for web pages, Wikitext is used in wiki systems. Like HTML, it uses tags to mark parts of tags or other data. ==How do I use Wikitext?== When you edit a page, you can switch between Visual editing and source editing: [[File:Manual:editing.png|alt=Screenshot: Visual Editor switch edit mode|center]] Wikitext can be entered in source editing mode. When you are in visual editing mode, VisualEditor inserts Wikitext "behind the scenes". If VisualEditor doesn't format elements on a page correctly, you can always switch to source editing to correct the issues directly in Wikitext.<br /> ==Examples of Wikitext== Here are some typical examples of Wikitext: ===<span class="mw-headline" id="Formatting">Formatting</span>=== *This is <code><nowiki>'''bold'''</nowiki></code> *This is <code><nowiki>''italic''</nowiki></code> *This is <code><nowiki><u>underlined</u></nowiki></code> ===<span class="mw-headline" id="Structuring">Structuring</span>=== *This is a <code>==Section Heading==</code> *This is an <code>*unordered list item (first level)</code> *Table: Table: {| class="wikitable" === ====Headings==== *(1st level): ''reserved for page title'' *2nd level: <code>==Section heading==</code> *3nd level: <code>===Section sub-heading===</code> ====Lists==== *ordered (numbered):<syntaxhighlight lang="html"> # One ## One-point-one ### One-point-one-point-one # Two</syntaxhighlight> *unordered (bulleted): <code>*</code> *definition list: <code>;Fire:provides energy and light</code> ====Tables==== <br /><syntaxhighlight> {| class="wikitable" |- !header 1 !header 2 |- |row 1, cell 1 |row 1, cell 2 |- |row 2, cell 1 |row 2, cell 2 |} ===<span class="mw-headline" id="Linking_.2F_Embedding"></syntaxhighlight> ===Links / Embedding:</span>=== *'''Insert a link:''' <code><nowiki>[[Pancake|=== ====Wiki internal==== *<code><nowiki>[[Page title]]</nowiki></code> *<code><nowiki>[[Pancake | Best pancake]]</nowiki></code> - **this creates a link to the page "Pancake" with the link description "Best pancake". **see also the Mediawiki help page for links: https://www.mediawiki.org/wiki/Help:Links and **and the the **help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages **links with parameters / links that open in a new tab: <code><nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code> *''' ====Wiki external==== *<code><nowiki>[[http://www.hallowelt.com Hallo Welt!]]</nowiki></code> *<code><nowiki>http://www.hallowelt.com</nowiki></code> ===Files/Images=== *'''Image link:''' <code><nowiki>[[Media:Someimage.png]]</nowiki></code> *'''Embed an image:''' <code>Images<nowiki>[[File:Someimage.png]]</nowiki></code> - **This embeds the image ''someimageSomeimage.png'' on the page. **embedding only happens when a link points to the "File" namespace **the wiki checks if a preview/thumbnail can be created automatically (e.g. image formats like "png", "jpeg", "gif", "svg") and then embeds a preview into the page **otherwise a link will be created to the wikipage in the "File" namespace (aka "file description page") *'''Embed a file:''' <code><nowiki>[[Media:SomePDF.pdf]]</nowiki></code> **can be embedded: PDF, Tiff (needs extension) **cannot be embedded: Microsoft Office and Libre Office files; Shell-Scripts, ... ==='''Formatting example:''' <code>File:Someimage.png|thumb|50px|left|alt=Screenshot of the edit menu|The edit menu</code> ===<span class="mw-headline" id="MagicWords">Magic words</span>=== [[MagicWords|Magic words]] are strings of text that Mediawiki associates with a return value or function. Examples are: *"Behavior switch", aka "Double underscore", e.g. <code><nowiki>__TOC__</nowiki></code> *"Variables", e.g. <code><nowiki>{{FULLPAGENAME}}</nowiki></code> *"Tags", e.g. <code><nowiki><gallery></nowiki></code> *"ParserFunctions", e.g. <code><nowiki>{{#ifeq:x|y|true|false}}</nowiki></code> == External resources == For a more complete list of all Wikitext tags, you can refer to the Wikimedia page {{Box Links-en|Topic1=https://meta.wikimedia.org/wiki/Help:Wikitext_examples. }}<br /> [[en:{{FULLPAGENAME}}]] [[de:Wikitext]]
Line 17: | Line 17: | ||
*This is <code><nowiki><u>underlined</u></nowiki></code> | *This is <code><nowiki><u>underlined</u></nowiki></code> | ||
− | === | + | ===Structuring=== |
− | + | ====Headings==== | |
− | |||
− | |||
− | {| class="wikitable" | + | *(1st level): ''reserved for page title'' |
+ | *2nd level: <code>==Section heading==</code> | ||
+ | *3nd level: <code>===Section sub-heading===</code> | ||
+ | |||
+ | ====Lists==== | ||
+ | |||
+ | *ordered (numbered):<syntaxhighlight lang="html"> | ||
+ | # One | ||
+ | ## One-point-one | ||
+ | ### One-point-one-point-one | ||
+ | # Two</syntaxhighlight> | ||
+ | *unordered (bulleted): <code>*</code> | ||
+ | *definition list: <code>;Fire:provides energy and light</code> | ||
+ | |||
+ | ====Tables==== | ||
+ | <br /><syntaxhighlight> | ||
+ | {| class="wikitable" | ||
|- | |- | ||
!header 1 | !header 1 | ||
Line 34: | Line 48: | ||
|row 2, cell 2 | |row 2, cell 2 | ||
|} | |} | ||
+ | </syntaxhighlight> | ||
+ | ===Links=== | ||
− | === | + | ====Wiki internal==== |
− | * | + | *<code><nowiki>[[Page title]]</nowiki></code> |
− | **see also the Mediawiki help page for links: https://www.mediawiki.org/wiki/Help:Links and | + | *<code><nowiki>[[Pancake | Best pancake]]</nowiki></code> |
− | ** | + | **this creates a link to the page "Pancake" with the link description "Best pancake". |
+ | **see also the Mediawiki help page for links: https://www.mediawiki.org/wiki/Help:Links and the | ||
+ | **help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages | ||
**links with parameters / links that open in a new tab: <code><nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code> | **links with parameters / links that open in a new tab: <code><nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code> | ||
− | *'''Embed an image:''' <code> | + | |
+ | ====Wiki external==== | ||
+ | |||
+ | *<code><nowiki>[[http://www.hallowelt.com Hallo Welt!]]</nowiki></code> | ||
+ | *<code><nowiki>http://www.hallowelt.com</nowiki></code> | ||
+ | |||
+ | ===Files/Images=== | ||
+ | |||
+ | *'''Image link:''' <code><nowiki>[[Media:Someimage.png]]</nowiki></code> | ||
+ | *'''Embed an image:''' <code><nowiki>[[File:Someimage.png]]</nowiki></code> | ||
+ | **This embeds the image ''Someimage.png'' on the page. | ||
**embedding only happens when a link points to the "File" namespace | **embedding only happens when a link points to the "File" namespace | ||
− | **the wiki checks if preview/thumbnail can be created automatically (e.g. image formats like "png", "jpeg", "gif", "svg") and then embeds a preview into the page | + | **the wiki checks if a preview/thumbnail can be created automatically (e.g. image formats like "png", "jpeg", "gif", "svg") and then embeds a preview into the page |
**otherwise a link will be created to the wikipage in the "File" namespace (aka "file description page") | **otherwise a link will be created to the wikipage in the "File" namespace (aka "file description page") | ||
Line 49: | Line 77: | ||
**can be embedded: PDF, Tiff (needs extension) | **can be embedded: PDF, Tiff (needs extension) | ||
**cannot be embedded: Microsoft Office and Libre Office files; Shell-Scripts, ... | **cannot be embedded: Microsoft Office and Libre Office files; Shell-Scripts, ... | ||
+ | |||
+ | '''Formatting example:''' <code>File:Someimage.png|thumb|50px|left|alt=Screenshot of the edit menu|The edit menu</code> | ||
===<span class="mw-headline" id="MagicWords">Magic words</span>=== | ===<span class="mw-headline" id="MagicWords">Magic words</span>=== | ||
Line 58: | Line 88: | ||
*"ParserFunctions", e.g. <code><nowiki>{{#ifeq:x|y|true|false}}</nowiki></code> | *"ParserFunctions", e.g. <code><nowiki>{{#ifeq:x|y|true|false}}</nowiki></code> | ||
− | = | + | |
− | + | {{Box Links-en|Topic1=https://meta.wikimedia.org/wiki/Help:Wikitext_examples}}<br /> | |
− | <br /> | ||
[[en:{{FULLPAGENAME}}]] | [[en:{{FULLPAGENAME}}]] | ||
[[de:Wikitext]] | [[de:Wikitext]] |