Wiki markup, also known as wikitext or wikicode, consists of the syntax and keywords used by the MediaWiki software to format a page. To learn how to see this m
Wiki markup, also known as wikitext or wikicode, consists of the syntax and keywords used by the MediaWiki software to format a page. To learn how to see this markup, and to save an edit, see: Help:Editing. There is a short list of markup and tips at Help:Cheatsheet.
Instructions on this page may not work with Wikipedia:VisualEditor. The directions on this page are mainly for manual editing in the Change tab. For instructions on editing with VisualEditor, see that guideline.
Sections in a page will follow the page's lead (introduction section).
Use the == (two equal signs) markup for headings (also called section titles), not the ''' (triple apostrophes) used to make words appear bold in character formatting. Start with ==, add the heading title, then end with ==.
This section’s heading was created by writing:
== Sections and headings ==This subsection’s heading was created by writing:
=== Subsection ===This sub-subsection’s heading was created by writing:
==== Sub-subsection ====When a page has at least four headings, a table of contents (TOC) will automatically appear after the lead and before the first heading. The TOC can be controlled by the following Magic words and templates:
__FORCETOC__ forces the TOC to appear at the normal location regardless of the number of headings.__TOC__ forces the TOC to appear at the point where the magic word is inserted instead of the normal location.__NOTOC__ disables the TOC entirely.Line breaks or newlines are used to add whitespace between lines of text, such as when separating paragraphs.
HTML equivalent: <br> or <br />
Templates:
Indentation as used on Talk pages:
:Each [[Colon (punctuation)|]] at the start of a line
::causes the line to be indented by three more character positions.
:::(The indentation persists
so long as no [[carriage return]] or line break is used.)
:::Repeat the indentation at any line break.
::::Use an extra colon for each response.
:::::And so forth ...
However, the colons do not show in the text and looks like this:
so long as no carriage return or line break is used.)
Templates:
{{od}} returns an outdent (opposite of an indent) response (after the fourth, fifth, or so indent) to start the next response:
:::::And so forth...
{{od}}And so on...
Looks like this:
┌─────────────────────────────────┘
And so on...
Is used when there is a need for separating a block of text (text that is grouped together). This is useful for (as the name says) inserting blocks of quoted (and cited) text. The editor provides any quotation marks.
<blockquote>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</blockquote>
Looks like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Related templates:
Looks like this:
| “ | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum | ” |
You can align content in a separate container:
<div style="text-align: right; direction: ltr; margin-left: 1em;"> You can safely experiment with this markup string in the sandbox
Looks like this:
Do not leave blank lines between items in a list unless there is a good reason to do so. A blank line causes the MediaWiki software to interpret each item as beginning a new list.
An unordered list shows items in no particular order:
* Item1
* Item2
* Item3
* Item4
** Sub-item 4 a)
*** Sub-item 4 a) 1.
**** Sub-item 4 a) 1. i)
**** Sub-item 4 a) 1. ii)
** Sub-item 4 b)
* Item5
Looks like this:
An ordered list shows items numerical order or order of importance:
# Item1
# Item2
# Item3
# Item4
## Sub-item 1
### Sub-sub-item
#### Sub-sub-sub-item
## Sub-item 2
# Item5
Looks like this:
To list terms and definitions, start a new line with a semicolon (;) followed by the term. Then, type a colon (:) followed by a definition. The format can also be used for other purposes, such as make and models of vehicles, etc.
Description lists (formerly definition lists, and a.k.a. association lists) consist of group names corresponding to values. Group names (terms) are in bold. Values (definitions) are indented. Each group must include one or more definitions. For a single or first value, the : can be placed on the same line after ; – but subsequent values must be placed on separate lines.
Do not use a semicolon (;) simply to bold a line without defining a value using a colon (:). This usage renders invalid HTML5 and creates issues with screen readers.
; Term : Definition1
Looks like this:
; Term
: Definition1
: Definition2
: Definition3
: Definition4
Looks like this:
| Description | What you type | What it looks like |
|---|---|---|
|
italics, bold, small capital letters |
To ''italicize text'', put two
consecutive apostrophes on each side
of it.
Three apostrophes each side will
'''bold the text'''.
Five consecutive apostrophes on each
side (two for italics plus three for
bold) produces '''''bold italics'''''.
'''''Italic and bold formatting'''''
only works correctly within a single
line.
For text as {{smallcaps|small caps}},
use the template {{tl|smallcaps}}.
|
To italicize text, put two consecutive apostrophes on each side of it. Three apostrophes each side will bold the text. Five consecutive apostrophes on each side (two for italics plus three for bold) produces bold italics. Italic and bold formatting only works correctly within a single line. For text as small caps, use the template {{smallcaps}}. |
|
Small chunks of source code within a line of normal text. Code is displayed in a monospace font. |
function <code>int m2()</code> is nice. |
function |
|
Syntax highlighting for source code. Computer code has colored text and more stringent formatting. For example, to define a function: |
<syntaxhighlight lang="cpp">
#include <iostream>
int m2 (int ax, char *p_ax) {
std::cout <<"Hello World!";
return 0;
}</syntaxhighlight>
|
#include <iostream>
int m2 (int ax, char *p_ax) {
std::cout <<"Hello World!";
return 0;
}
|
|
Small text |
Use <small>small text</small> only
when necessary.
|
Use small text only when necessary. |
|
a <small> span |
To match, for example, the font-size
used in an [[Help:Visual file
markup#Caption|image caption]],
the "small" tag can also be used to
<small style="font-size:87%;">reduce
a text's font-size to 87%</small>.
|
To match, for example, the font-size used in an image caption, the "small" tag can also be used to reduce a text's font-size to 87%. |
|
Big text |
Better not use <big>big text</big>,
unless <small>it's <big>within</big>
small</small> text.
|
Better not use big text, unless it's within small text. |
|
To prevent two words from becoming separated by a linewrap (e.g. Mr. Smith or 400 km/h) a non-breaking space, sometimes also called a "non-printing character", may be used between them. (For three or more words, the template {{nowrap}} is probably more suitable.) |
Mr. Smith or 400 km/h |
Mr. Smith or 400 km/h |
|
Extra spacing within text is usually best achieved using the {{pad}} template. |
Mary {{pad|4.0em}} had a little lamb.
|
Mary had a little lamb. |
Special characters can often be displayed using numeric character references or character entity references. See Character encodings in HTML for more information. For example À and À both render À (A-grave). Percent-encoding can't be used, as it only works in URLs.
Diacritic marks, using character entity references.
| What you type | What it looks like |
|---|---|
À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö Ø Œ Ù Ú Û Ü Ÿ ß à á â ã ä å æ ç è é ê ë ì í î ï ñ ò ó ô õ ö ø œ ù ú û ü ÿ |
À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö Ø Œ Ù Ú Û Ü Ÿ ß à á â ã ä å æ ç è é ê ë ì í î ï ñ ò ó ô õ ö ø œ ù ú û ü ÿ |
Using character entity references.
| What you type | What it looks like |
|---|---|
¿ ¡ § ¶ † ‡ • – — ‹ › « » ‘ ’ “ ” ' " |
¿ ¡ § ¶ † ‡ • – — ‹ › « » ‘ ’ “ ” ' " |
The <nowiki> and <pre>markup tags are also available, for writing "[", "{", "&", "}", "]" for example. These tags prevent these characters from being recognized as wiki markup. They also prevent templates from running.
An example of <nowiki>...</nowiki>:
A singular <nowiki /> can be used to break wikimarkup.
*, #, ; and : only and always take effect at the beginning of a line. A <nowiki /> before the markup will cause the characters to not parse as markup.<nowiki /> after the link.Using character entity references.
| What you type | What it looks like |
|---|---|
™ © ® ¢ € ¥ £ ¤ |
™ © ® ¢ € ¥ £ ¤ |
Using character entity references.
| What you type | What it looks like |
|---|---|
α β γ δ ε ζ Α Β Γ Δ Ε Ζ η θ ι κ λ μ ν Η Θ Ι Κ Λ Μ Ν ξ ο π ρ σ ς Ξ Ο Π Ρ Σ τ υ φ χ ψ ω Τ Υ Φ Χ Ψ Ω |
α β γ δ ε ζ
Α Β Γ Δ Ε Ζ η θ ι κ λ μ ν Η Θ Ι Κ Λ Μ Ν ξ ο π ρ σ ς Ξ Ο Π Ρ Σ τ υ φ χ ψ ω Τ Υ Φ Χ Ψ Ω |
| Description | What you type | What it looks like |
|---|---|---|
|
Subscripts |
x<sub>1</sub> x<sub>2</sub> x<sub>3</sub> or x₀ x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ |
x1 x2 x3 or x₀ x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ |
|
Superscripts |
x<sup>1</sup> x<sup>2</sup> x<sup>3</sup> or x⁰ x¹ x² x³ x⁴ x⁵ x⁶ x⁷ x⁸ x⁹ |
x1 x2 x3 or x⁰ x¹ x² x³ x⁴ x⁵ x⁶ x⁷ x⁸ x⁹ |
|
Combined |
&epsilon;<sub>0</sub> = 8.85 &times; 10<sup>&minus;12</sup> C&sup2; / J m
1 [[hectare]] = [[1 E+4 m&sup2;]]
|
ε0 = 8.85 × 10−12 C² / J m |
| What you type | What it looks like |
|---|---|
∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ ℵ ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇐ ⇓ ⇑ ⇔ → ↓ ↑ ← ↔ |
∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ ℵ ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇐ ⇓ ⇑ ⇔ → ↓ ↑ ← ↔ |
Lines that start with blank spaces in the editing window are shown in a box, like this:
A line with a blank space in front of it.
Many lines with a space in front will create a table, like this:
line 1 line 2 line 3
A line that contains only a blank space inserts a blank line into the table.
line 1 line 2
For a complete guide to more complex tables see Help:Tables.
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.