{{Wiki markup}}
{{shortcut|H:MARKUP|WP:MARKUP}}
[[File:Learning WikiCode.ogv|thumb|A video about wikicode and how to use it.]]
**Wiki markup** is 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]].
{{TOC limit}}
===== Layout =====
==== Sections ====
=== Section headings ===
{{Further2|[[Help:Section]]}}
Use headings to split articles into sections. Put a heading on
a separate line. A level-two heading ("==") is the highest level editors use in an article.
{| class="wikitable"
! style="width: 50%" | What you type
! style="width: 50%" | What it looks like
|-
|
==Section headings =====
//Headings// organize your writing
into sections. The wiki software
can automatically generate a
[[Help:Section|table of contents]]
from them. Start with 2 'equals'
("==") characters.
==== Subsection ====
Using more 'equals' characters
creates a subsection.
=== A smaller subsection ===
Don't skip levels, like from two
("==") to four ("====") 'equals'
characters.
;A defined term: A semicolon at the
start of a line is a way of making
a definition where the word being
defined appears in bold.
The definition itself follows the
colon and is not rendered bold by
default. It is not a heading and
does not appear in the table of
contents.
|
**Horizontal line**
Separating with a horizontal
dividing line:
>this is above it...
----
>...and this is below it.
If you don't use a section header,
you don't get a TOC entry.
|
**Horizontal line**
Separating with a horizontal
dividing line:\\ element. The HTML tag
will be converted to the XHTML
tag by [[HTML Tidy]] in most instances. The
tag is not converted when used in [[Wikipedia:Editnotice|editnotices]] or in the [[Help:MediaWiki namespace|MediaWiki namespace]] — it will render invalid XHTML and will break tools such as [[Wikipedia:Twinkle|Twinkle]].
* Please use these sparingly.
* Close markup between lines; do not start a [[Help:link|link]] or //italics// or **bold** on one line and close it on the next.
* When used in a list, a newline //does// affect the layout (see [[Help:List]]).
{| class="wikitable"
! style="width: 50%" | What you type
! style="width: 50%" | What it looks like
|-
|
A single newline has no
effect on the layout.
But an empty line starts a new
paragraph, or ends a list or
an indented part.
|
A single newline has no
effect on the layout.
But an empty line starts a new
paragraph, or ends a list or
an indented part.
|-
|
You can break lines\\
without starting a new paragraph.
|
You can break lines\\
without starting a new paragraph.
|}
==== Indent text ====
{| class="wikitable"
! What you type
! What it looks like
|-
| colspan="2"|
**Left indent**
|-
|
>A colon at the start of a line
>>causes the line to be indented,
>>>most commonly used on Talk pages.
|
>A colon at the start of a line
>>causes the line to be indented,
>>>most commonly used on Talk pages.
|-
| colspan="2"|
**Blockquote**
When there is a need for separating a block of text. This is useful for (as the name says) inserting blocks of quoted (and cited) text.
|-
|
The **blockquote** tag will indent both margins when needed instead of the left margin only as the colon does.
|
The **blockquote** tag will indent both margins when needed instead of the left margin only as the colon does.|} ==== Center text ==== {| class="wikitable" ! style="width: 50%" | What you type ! style="width: 50%" | What it looks like |- |
Centered text
|* //Unordered [[Help:List|list]]s// are easy to do:
* Start every line with a star.
* More stars indicate a deeper level.
* : Previous item continues.
* A new line
* in a list
marks the end of the list.
* Of course you can start again.
|
* //Unordered [[Help:List|list]]s// are easy to do:
* Start every line with a star.
* More stars indicate a deeper level.
* : Previous item continues.
* A new line
* in a list
marks the end of the list.
* Of course you can start again.
|-
|
# //Numbered lists// are:
- Very organized
- Easy to follow
- : Previous item continues
A new line marks the end of the list.
- New numbering starts with 1.
|
- //Numbered lists// are:
- Very organized
- Easy to follow
- : Previous item continues
A new line marks the end of the list.
- New numbering starts with 1.
|-
|
;Definition lists: Terms and their definitions.
;Hamlet: Also useful for texts of plays.
|
;Definition lists: Terms and their definitions.
;Hamlet: Also useful for texts of plays.
|}
==== Retaining newlines and spaces ====
{{shortcut|H:POEM}}
The MediaWiki software suppresses single newlines and converts lines starting with a space to preformatted text in a dashed box. HTML suppresses multiple spaces. It is often desirable to retain these elements for poems, lyrics, mottoes, oaths and the like. The [[mw:Extension:Poem|Poem]] extension adds HTML-like {{tag|poem}} tags to maintain newlines and spaces. These tags may be used inside other tags such as {{tag|blockquote}}. [[H:CSS|CSS styles]] may be applied to this tag, e.g.: .
{| class=wikitable style="margin-right:0em;"
! style="width: 50%" | What you type
! style="width: 50%" | What it looks like
|-
|
In Xanadu did Kubla Khan
A stately pleasure-dome decree:
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
So twice five miles of fertile ground
With walls and towers were girdled round:
And there were gardens bright with sinuous rills,
Where blossomed many an incense-bearing tree;
And here were forests ancient as the hills,
Enfolding sunny spots of greenery.
|
A stately pleasure-dome decree:
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
So twice five miles of fertile ground
With walls and towers were girdled round:
And there were gardens bright with sinuous rills,
Where blossomed many an incense-bearing tree;
And here were forests ancient as the hills,
Enfolding sunny spots of greenery.
In Xanadu did Kubla Khan
A stately pleasure-dome decree:
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
|
A stately pleasure-dome decree:
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
To //italicize text//, just put
2 apostrophes on each side.
3 apostrophes will **bold the text**
5 apostrophes for **//bold italics**//
For text as {{Smallcaps|small caps}},
that uses a [[Help:Template|template]].
|
To //italicize text//, just put
2 apostrophes on each side.
3 apostrophes will **bold the text**
5 apostrophes for **//bold italics**//
For text as {{Smallcaps|small caps}},
that uses a [[Help:Template|template]].
|- valign=top
|
Small chunks of source code within a line of normal text.
Code is displayed in a monospace font.
|
function int m2() is nice
|
function int m2() is nice
|- valign="top"
|
[[mw:Extension:SyntaxHighlight GeSHi|Syntax highlighting]] for source code.
Computer code has colored text and more stringent formatting.
For example, to define a function: int m2(), with highlights.
|
- include
int m2 (int ax, char *p_ax) {
std::cout <<"Hello World!";
return 0;
}
|
std::cout <<"Hello World!";
return 0;
}Use small text if needed.
A span tag can set text font-size as
being 87%
of prior size, to match an
image caption.
|
Use small text if needed.
A span tag can set text font-size as
being 87%
of prior size, to match an
image caption.
|- valign="top"
|
Big text.
|
Better not use big text,
unless it's within
small text.
|
Better not use big text,
unless it's within
small text.
|-
|
You can include a **non-breaking space** (sometimes called **non-printing character**) where you require two words to always appear together on the same line, such as //Mr. Smith// or //400 km/h//, using ** ** in place of a regular space between the two "words" that need to behave as a single word (never be separated on different lines).
|
Mr. Smith or 400 km/h.
|
Mr. Smith or 400 km/h.
|-
|
**Extra spacing** within text can best be achieved using the [[Template:Pad|pad]] template.
|
Mary {{pad|4em}} had a little lamb.
|
Mary {{pad|4em}} had a little lamb.
|-
|
**Typewriter font**.
(Also works beyond the end of a paragraph.)
|
arrow →
//italics//, **bold**
[[link]]
New paragraph started here.
|
arrow →
//italics//, **bold**
[[link]]
New paragraph started here.
|}
==== Special characters ====
=== Egyptian Hieroglyphs ===
{{main|Help:WikiHiero syntax}}
WikiHiero is a software extension that renders [[Egyptian hieroglyphs]] as PNG images using {{xtag|hiero}} tags.
Example:
{{markup
|À Á Â Ã Ä Å Æ
Ç È É Ê Ë
Ì Í Î Ï Ñ
Ò Ó Ô Õ Ö Ø
Ù Ú Û Ü ß
à á â ã ä å æ ç
è é ê ë
ì í î ï ñ
ò ó ô õ ö ø œ
ù ú û ü ÿ
|
À Á Â Ã Ä Å Æ
Ç È É Ê Ë
Ì Í Î Ï Ñ
Ò Ó Ô Õ Ö Ø
Ù Ú Û Ü ß
à á â ã ä å æ ç
è é ê ë
ì í î ï ñ
ò ó ô õ ö ø œ
ù ú û ü ÿ
|}
=== Punctuation ===
{| class="wikitable"
! What you type
! What it looks like
|-
|
¿ ¡ § ¶
† ‡ • – —
‹ › « »
‘ ’ “ ”
' "
|
¿ ¡ § ¶
† ‡ • – —
‹ › « »
‘ ’ “ ”
' "
|}
=== Other punctuation ===
The ‹[[HTML_element#Other_block_elements|pre]]› and ‹[[Help:Wiki_markup#Limiting_formatting_.2F_escaping_wiki_markup|nowiki]]› markup tags are also available. (Permits **
™ © ® ¢ € ¥
£ ¤
|
™ © ® ¢ € ¥
x1 x2 x3 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//
|
x1 x2 x3 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//
|
ε0 = 8.85 × 10−12 C² / J m
1 [[hectare]] = [[1 E4 m²]]
|
ε0 = 8.85 × 10−12 C² / J m
1 [[hectare]] = [[1 E4 m²]]
|}
=== Greek characters ===
{| class="wikitable"
! What you type
! What it looks like
|-
|
α β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Α Β Γ Δ Ε Ζ
Η Θ Ι Κ Λ Μ
Ν Ξ Ο Π Ρ Σ
Τ Υ Φ Χ Ψ Ω
|
α β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Α Β Γ Δ Ε Ζ
Η Θ Ι Κ Λ Μ
Ν Ξ Ο Π Ρ Σ
Τ Υ Φ Χ Ψ Ω
|}
=== Mathematical characters ===
* See also [[Wikipedia:WikiProject Mathematics|WikiProject Mathematics]] and [[TeX]].
{| class="wikitable"
! What you type
! What it looks like
|-
|
∫ ∑ ∏ √
− ± ∞
≈ ∝ ≡ ≠
≤ ≥
× · ÷ ∂
′ ″
∇ ‰ ° ∴ ℵ
ø
∈ ∉ ∩ ∪
⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀
⇒ ⇐ ⇓ ⇑ ⇔
→ ↓ ↑ ← ↔
|
∫ ∑ ∏ √
− ± ∞
≈ ∝ ≡ ≠
≤ ≥
× · ÷ ∂
′ ″
∇ ‰ ° ∴ ℵ
ø
∈ ∉ ∩ ∪
⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀
⇒ ⇐ ⇓ ⇑ ⇔
→ ↓ ↑ ← ↔
|}
=== Mathematical formulae ===
{{main|Help:Displaying a formula}}
* Formulae that include mathematical letters, like {{math|x}}, and operators like × should not use the plain letter x. See [[MOS:MATH#Font_formatting|math font formatting]]. For a comprehensive set of symbols, and comparison between {{tag|math|o}} tags and the {{tl|math}} template see section [[Help:Displaying_a_formula#TeX_vs_HTML|//TeX vs HTML//]].
* The {{tag|math|o}} tag typesets using [[MOS:MATH#Typesetting_of_mathematical_formulae|LaTeX markup]], which may render as an image or as HTML, depending on environmental settings. The <math> tag is best for the complex formula on its own line in an image format. If you use this tag to put a formula in the line with text, put it in the {{tl|nowrap}} template.
* The {{tl|math}} template [[MOS:MATH#Using_HTML|uses HTML]], and will size-match a serif font, and will also prevent line-wrap. All templates are sensitive to the = sign, so remember to replace = with {{tl|{{=}}}} in template input. Use wikimarkup // and ** inside the {{tl|math}} template, as well other [[Wikipedia:Mathematical_symbols|HTML entities]]. The {{tl|math}} template is best for typeset formulas in line with the text.
{{markup
|
|y|z2}} {{=}} 0}}
{{math|sin 2π//x// + ln //e//}}
|y|z2}} {{=}} 0}}
{{crlf|
}}
{{crlf|
}}
{{math|sin 2π//x// + ln //e//}}
}}
=== Spacing in simple math formulae ===
* Using ** ** to prevent line break is not needed; the {{tl|math}} template will prevent line breaks anyway; you can use <br/> if you need an explicit line break inside a formula.
{| class="wikitable"
! What you type
! What it looks like
|-
|
It follows that {{math
|//x//2 ≥ 0}} is true when {{math|x}} is a real number.
|
It follows that {{math
|//x//2 ≥ 0}} is true when {{math|x}} is a real number.
|}
=== Complicated formulae ===
* See [[Help:Displaying a formula]] for how to use <math>.
* A formula displayed on a line by itself should probably be indented by using the colon (:) character.
{| class="wikitable"
! What you type
! What it looks like
|-
|
>
|
>
|}
===== Links and URLs =====
==== Free links ====
In [[Wikipedia]] and some other [[wiki]]s, **free links** are used in [[wikitext]] markup to produce [[internal link]]s between pages, as opposed to the concept of [[CamelCase]] for the same purpose, which was used in the early days of Wikipedia — see [[Wikipedia:CamelCase and Wikipedia|CamelCase and Wikipedia]].
In [[Wikipedia:How to edit a page#Wiki markup|Wikipedia's markup language]], you create free links by putting double square brackets around text designating the title of the page you want to link to. Thus, [[Texas]] will be rendered as [[Texas]]. Optionally, you can use a [[vertical bar]] (|) to customize the link title. For example, typing [[Texas|Lone Star State]] will produce [[Texas|Lone Star State]], a link that is displayed as "Lone Star State" but in fact links to [[Texas]].
=== Link to another wiki article ===
* Internally, the first letter of the target page is automatically capitalized and spaces are represented as underscores (typing an underscore in the link has the same effect as typing a space, but is not recommended).
* Thus the link hereafter is to the Web address en.wikipedia.org/wiki/Public_transport, which is the Wikipedia article with the name "Public transport". See also [[Help:Link#Conversion to canonical form|Canonicalization]].
* [[Intentionally permanent red link|A red link]] is a page that doesn't exist yet; it can be created by clicking on the link.
* [[Help:Self link|A link to its own page]] will appear only as bold text.
{| class="wikitable"
! What you type
! What it looks like
|-
|
London has [[public transport]].
|
London has [[public transport]].
|-
|
Link to this own article: "[[Help:Wiki markup]]" will appear only as bold text.
|
Link to this own article: "[[Help:Wiki markup]]" will appear only as bold text.
|}
=== Renamed link ===
* Same target, different name.
* The target ("piped") text must be placed **first**, then the text to be displayed **second**.
{| class="wikitable"
! What you type
! What it looks like
|-
|
New York also has [[public transport|public transportation]].
|
New York also has [[public transport|public transportation]].
|}
=== Automatically rename links ===
* Simply typing the pipe character (|) after a link will automatically rename the link in certain circumstances. The next time you open the edit box you will see the expanded piped link. When [[Help:Show preview|previewing]] your edits, you will not see the expanded form until you press **Save** and **Edit** again. The same applies to [[#link-to-section|links to sections within the same page]].
* See [[Help:Pipe trick|Pipe trick]] for details.
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
|
//Automatically hide stuff in parentheses//
|
[[kingdom (biology)|]]
|
[[kingdom (biology)|kingdom]]
|-
| //Automatically hide the comma and following text//
| [[Seattle, Washington|]]
| [[Seattle, Washington|Seattle]]
|-
|
//Automatically hide namespace//
|
[[Wikipedia:Village pump|]]
|
[[Wikipedia:Village pump|Village pump]]
|-
|
//Or both//
|
[[Wikipedia:Manual of Style (headings)|]]
|
[[Wikipedia:Manual of Style (headings)|Manual of Style]]
|-
|
//But this doesn't work for section links//
|
[[Wikipedia:Manual of Style#Links|]]
|
[[Wikipedia:Manual of Style#Links|]]
|}
=== Blend link ===
* Endings are blended into the link.
* //Exception//: a trailing [[apostrophe]] (') and any characters following the apostrophe are //not// blended.
* Preferred style is to use this instead of a piped link, if possible.
* Blending can be suppressed by using the {{tag|nowiki|s}} tag, which may be desirable in some instances.
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
|
//Blending active.//
|
San Francisco also has [[public transport]]ation. Examples include [[bus]]es, [[taxicab]]s, and [[tram]]s.
|
San Francisco also has [[public transport]]ation. Examples include [[bus]]es, [[taxicab]]s, and [[tram]]s.
|-
|
//Blending suppressed.//
|
A [[micro-]] second.
|
A [[micro-]][[Wikipedia:Manual of Style#Italics]] is a link to a section within another page.
|
[[Wikipedia:Manual of Style#Italics]] is a link to a section within another page.
|-
|
[[#Links and URLs]] is a link to another section on the current page. [[#Links and URLs|Links and URLs]] is a link to the same section without showing the # symbol.
|
[[#Links and URLs]] is a link to another section on the current page. [[#Links and URLs|Links and URLs]] is a link to the same section without showing the # symbol.
|-
|
[[Wikipedia:Manual of Style#Italics|Italics]] is a piped link to a section within another page.
|
[[Wikipedia:Manual of Style#Italics|Italics]] is a piped link to a section within another page.
|}
=== Create page link ===
* To create a new page:
* # Create a link to it on some other (related) page.
* # Save that page.
* # Click on the link you just made. The new page will open for editing.
* For more information, see [[Wikipedia:Starting an article|starting an article]] and check out Wikipedia's [[Wikipedia:Naming conventions|naming conventions]].
* Please do not create a new article without linking to it from at least one other article.
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
|
//Links to pages that don’t exist yet look red.//
|
The article about [[cardboard sandwiches]] doesn't exist yet.
|
The article about [[cardboard sandwiches]] doesn't exist yet.
|}
==== Redirects ====
* [[Wikipedia:Redirect|Redirect]] one article title to another by placing a directive like the one shown to the right on the //first// line of the article (such as at a page titled "[[USA]]").
* It is possible to redirect to a section. For example, a redirect to [[United States#History]] will redirect to the History section of the [[United States]] page, if it exists.
{| class="wikitable"
! Description
! What you type
|-
|
//Redirect to an article.//
|
#REDIRECT [[United States]]
|-
|
//Redirect to a section.//
|
#REDIRECT [[United States#History]]
|}
==== Link to another [[Help:namespace|namespace]] ====
{| class="wikitable"
! What you type
! What it looks like
|-
|
See the [[Wikipedia:Manual of Style]].
|
See the [[Wikipedia:Manual of Style]].
|}
==== Link to the same article in another language (interlanguage links) ====
* To link to a corresponding page in another language, use the form: [[ language code>Foreign title]] .
* It is recommended interlanguage links be placed at the very end of the article.
* Interlanguage links are not visible within the formatted article, but instead appear as language links on the sidebar (to the left) under the menu section "languages".
* For further help, please see [[Help:Interlanguage links|Interlanguage links]] and the [[Wikipedia:Complete list of language wikis available|complete list of language wikis available]].
**NOTE:** To create an **//inline link**// (a clickable link within the text) to //any// foreign language article, see [[Help:Interlanguage links#Inline interlanguage links|Inline interlanguage links]] and consider the usage notes.{| class="wikitable" ! Description ! What you type |- | //Link from English article "Plankton" to the Spanish article [[:es:Plancton|"Plancton"]].// //"es" is the language code for "{{lang|es|español}}" (the [[Spanish language]]).// |
[[es:Plancton]]
|-
|
//Other examples: German (de for {{lang|de|Deutsch}}), Russian (ru), and simple English (simple).//
|
[[de:Plankton]]
[[ru:Планктон]]
[[simple:Plankton]]
|}
==== [[InterWiki|Interwiki]] link ====
* Link to any page on other Wikimedia wikis.
* Note that interwiki links use the //internal// link style.
* See [[MetaWikiPedia:Interwiki_map]] for the list of shortcuts; if the site you want to link to is not on the list, use an external link ([[#External links|see hereafter]]).
* See also [[Wikipedia:Wikimedia sister projects|Wikimedia sister projects]].
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
| colspan="3"|
Linking to a page on another wiki in English.
All of these forms lead to the URL http://en.wiktionary.org/wiki/Hello.
|-
|
//Simple link.//
//Without prefix.//
//Named link.//
|
[[Wiktionary:Hello]]
[[Wiktionary:Hello|]]
[[Wiktionary:Hello|Wiktionary definition of "Hello"]]
|
[[Wiktionary:Hello]]
[[Wiktionary:Hello|Hello]]
[[Wiktionary:Hello|Wiktionary definition of "Hello"]]
|-
| colspan="3"|
Linking to a page on another wiki in another language.
All of these forms lead to the URL http://fr.wiktionary.org/wiki/bonjour.
|-
|
//Simple link.//
//Without prefix.//
//Named link.//
|
[[Wiktionary:fr:bonjour]]
[[Wiktionary:fr:bonjour|]]
[[Wiktionary:fr:bonjour|bonjour]]
|
[[Wiktionary:fr:bonjour]]
[[Wiktionary:fr:bonjour|fr:bonjour]]
[[Wiktionary:fr:bonjour|bonjour]]
|}
==== Categories ====
* To put an article in a [[Wikipedia:Categorization|category]], place a link like the one to the right anywhere in the article. As with interlanguage links, placing these links at the end of the edit box is recommended.
* To link to a category page without putting the article into the category, use a colon prefix (":Category") in the link.
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
|
//Categorize an article.//
|
[[Category:Character sets]]
|
|-
|
//Link to a category.//
|
[[:Category:Character sets]]
|
[[:Category:Character sets]]
|-
|
//Without prefix.//
|
[[:Category:Character sets|]]
|
[[:Category:Character sets|Character sets]]
|}
==== External links ====
* Square brackets indicate an external link. Note the use of a //space// (not a pipe) to separate the URL from the link text in the "named" link. Square brackets may be used as normal when not linking to anything — [[like this]].
* An [[Uniform Resource Locator|URL]] must begin with a supported [[URI scheme]]: http:// and https:// will be supported by all browsers; irc://, ircs://, ftp://, news://, mailto: and gopher:// will require a plugin or an external application. IPv6 addresses in URLs are currently not supported.
* An URL containing certain characters will display and link incorrectly unless those characters are encoded. For example, a space must be replaced by %20. Encoding can be achieved by:
>*Use the link button [[File:Vector toolbar insert link button.png]] on the enhanced editing toolbar to encode the link; this tool will add the bracket markup and the linked text, which may not always be desirable.
>*Or manually encode the URL by replacing these characters:
{| class="wikitable" style="margin-left: 5em"
! sp !! " !! , !! ' !! ; !! < !! > !! ? !! [[ !! ]]
|-
| %20 || %22 || %2c || %3a || %3b || %3c || %3e || %3f || %5b || %5d
|}
>*Or use the [[http://www.wikipedia.org|Wikipedia]]
|
[[http://www.wikipedia.org|Wikipedia]]
|-
|
//Unnamed link//
//(Only used within article body for footnotes)//
|
[[http://www.wikipedia.org]]
|
[[http://www.wikipedia.org]]
|-
|
//Bare URL//
//(Bad style)//
|
http://www.wikipedia.org
|
http://www.wikipedia.org
|-
|
//Link without arrow//
//(Not often used)//
|
[[http://www.wikipedia.org|Wikipedia]]
|
[[http://www.wikipedia.org|Wikipedia]]
|}
==== Miscellaneous ====
=== "As of" tag ===
* "[[Wikipedia:As of|As of]]" tags like "As of April 2009" and "as of April 2009" categorize info that will need updating.
For an explanation of the parameters see [[Template:As_of|template documentation]].
{| class="wikitable"
! What you type
! What it looks like
|-
|
{{As of|2009|4|df=us}}
|
{{As of|2009|4|df=us}}
|-
|
{{As of|2009|4|df=us|lc=on}}
|
{{As of|2009|4|df=us|lc=on}}
|}
=== Media link ===
* To include links to non image uploads such as sounds, use a "media" link. For images, [[#Images|see next section]].
* Some uploaded sounds are listed at [[Commons:Sound]].
{| class="wikitable"
! What you type
! What it looks like
|-
|
[[media:Classical guitar scale.ogg|Sound]]
|
[[media:Classical guitar scale.ogg|Sound]]
|}
=== Links directly into edit mode ===
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
|
//Full URL.//
|
{{fullurl:Help:Wiki markup|action=edit}}
|
{{fullurl:Help:Wiki markup|action=edit}}
|-
|
//"Edit" label.//
|
[[template:edit|{{edit}} ]]
|
{{edit}}
|}
=== Automatic links ===
== Book sources ==
* Link to books using their [[Wikipedia:ISBN|ISBN]]. This is preferred to linking to a specific online bookstore, because it gives the reader a choice of vendors. However, if one bookstore or online service provides additional free information, such as table of contents or excerpts from the text, then a link to that source will aid the user and is recommended. ISBN links do not need any extra markup, provided you use one of the indicated formats.
* To create a link to [[Special:BookSources|Book Sources]] using alternative text (e.g. the book's title), use the internal link style with the appropriate namespace.
{| class="wikitable"
! What you type
! What it looks like
|-
|
ISBN 012345678X
|
ISBN 012345678X
|-
|
ISBN 0-12-345678-X
|
ISBN 0-12-345678-X
|-
|
Link to a book using [[Special:BookSources/0670037818|alternative text, such as its title]]
|
Link to a book using [[Special:BookSources/0670037818|alternative text, such as its title]].
|}
== RFC number ==
* Link to an [[Internet Engineering Task Force]] [[Request for Comments|Request for Comments (RFC)]].
{| class="wikitable"
! What you type
! What it looks like
|-
|
Text mentioning an RFC number anywhere, e.g. RFC 4321.
|
Text mentioning an RFC number anywhere, e.g. RFC 4321.
|}
===== Pronunciation aids =====
It is often desirable to provide an aid to pronunciation for a word. The [[Template:IPAc-en|//IPAc-en//]] and [[Template:Respell|//Respell//]] templates can be of assistance.
{| class="wikitable"
! What you type
! What it looks like
|-
|
**Konjac** ({{IPAc-en|lang|pron|ˈ|k|oʊ|n|j|æ|k}})
|
**Konjac** ({{IPAc-en|lang|pron|ˈ|k|oʊ|n|j|æ|k}})
|-
|
**Konjac** ({{IPAc-en|lang|pron|ˈ|k|oʊ|n|j|æ|k}} {{respell|KOHN|yak}})
|
**Konjac** ({{IPAc-en|lang|pron|ˈ|k|oʊ|n|j|æ|k}} {{respell|KOHN|yak}})
|
|-
|
//Konjac// is pronounced {{IPAc-en|ˈ|k|oʊ|n|j|æ|k}} in English.
|
//Konjac// is pronounced {{IPAc-en|ˈ|k|oʊ|n|j|æ|k}} in English.
|}
Refer to [[Wikipedia:Manual of Style (pronunciation)]] for more information.
===== Images =====
Only images that have been uploaded to Wikipedia can be used. To upload images, use the [[Special:Upload|upload page]]. You can find the uploaded image on the [[Special:Imagelist|image list]].
{| class="wikitable"
|-
! What you type
! What it looks like
! Notes
|- valign="top"
| A picture:
[[File:wiki.png]]
| A picture:
[[File:wiki.png]]
|
|- valign="top"
| With alternative text:
[[File:wiki.png|alt=Puzzle globe logo]]
| With alternative text:
[[File:wiki.png|alt=Puzzle globe logo]]
|
* Alternative text, used when the image is unavailable or when the image is loaded in a text-only browser, or when spoken aloud, is **strongly** encouraged. See [[Wikipedia:Alternative text for images|Alternative text for images]] for help on choosing it.
|- valign="top"
| With link:
[[File:wiki.png|link=Wikipedia]]
| With link:
[[File:wiki.png|link=Wikipedia]]Floating to the right side of the page using the //frame// attribute and a caption:
[[File:wiki.png|frame|alt=Puzzle globe|Wikipedia logo]]
| Floating to the right side of the page using the //frame// attribute and a caption:
[[File:wiki.png|frame|alt=Puzzle globe|Wikipedia logo]]Floating to the right side of the page using the //thumb// attribute and a caption:
[[File:wiki.png|thumb|alt=Puzzle globe|Wikipedia logo]]
| Floating to the right side of the page using the //thumb// attribute and a caption:
[[File:wiki.png|thumb|alt=Puzzle globe|Wikipedia logo]]Floating to the right side of the page //without// a caption:
[[File:wiki.png|right|Wikipedia encyclopedia]]
| Floating to the right side of the page //without// a caption:
[[File:wiki.png|right|Wikipedia encyclopedia]]
|
* The [[WP:PIC|picture tutorial]] explains more options.
|- valign="top"
| A picture resized to 30 pixels...
[[File:wiki.png|30 px|Wikipedia encyclopedia]]
| A picture resized to 30 pixels...
[[File:wiki.png|30 px|Wikipedia encyclopedia]]
|
* The [[WP:PIC|picture tutorial]] explains more options.
|- valign="top"
| Linking directly to the description page of an image:
[[:File:wiki.png]]
| Linking directly to the description page of an image:
[[:File:wiki.png]]
|
* Clicking on an image displayed on a page (such as any of the ones above) also leads to the description page.
|- valign="top"
| Linking directly to an image without displaying it:
[[Media:wiki.png|Image of jigsaw globe]]
| Linking directly to an image without displaying it:
[[Media:wiki.png|Image of jigsaw globe]]
|
* To include links to images shown as links instead of drawn on the page, use a "media" link.
|- valign="top"
|
Example:
Place images here
|
Example:
span or div elements]] to separate images from text (note that this may allow images to cover text).
|- valign="top"
|
Example:
{| align=right
|-
|
Place images here
|}
|
Example:
{| align=right
|-
|
Place images here
|}
|
Using wiki markup to make a table in which to place a vertical column of images (this helps edit links match headers, especially in Firefox browsers).
|}
See the Wikipedia's [[Wikipedia:Image use policy|image use policy]] as a guideline used on Wikipedia.
For further help on images, including some more versatile abilities, see the [[WP:PIC|picture tutorial]].
===== Tables =====
There are two ways to build tables:
* In special wiki-markup (see [[Help:Table|Table]]).
* Using HTML elements: <table>, <tr>, <td> or <th>.
See also [[Wikipedia:Manual_of_Style_(tables)#When_tables_are_appropriate|When tables are appropriate]].
===== References and citing sources =====
{{main|Wikipedia:Citing_sources}}
{{see also|APA style|Chicago style|Harvard style|MLA style}}
Making a reference citing a printed or online source can be accomplished by using the ref tag. Inside the reference tag details about the reference are added.
You can add additional attributes to add detail about the source and reference, a pipe (|) precedes each reference, each attribute goes inside the cite portion of the tag.
{| class="wikitable"
|-
! What it's for !! What you type
|-
| For creating the reference || Use a closing tag
|-
| When you cite a book || {{cite book}}
|-
| To cite a web source || {{cite web}}
|-
| Book ISBN || |isbn=0-8018-6646-4 (ISBN of the book)
|-
| Web URL || |url=http://www.wikipedia.org
|-
| Title || |title=title of source
|-
| Author || |author=authors, use commas for multiple
|-
| First name || |first=first name
|-
| Last name || |last=last name
|-
| Location || |location=location of occurrence
|-
| Publisher || |publisher=who published the source
|-
| Date || |date=2007-03-04 (date of source)
|-
| Year || |year=year of source
|-
| Accessed date || |accessdate=2008-12-07
|-
| A complete reference tag || {{cite web |url=http://en.wikipedia.org/w/index.php?title=Help:Wiki_markup |title=Help:Wiki markup |publisher=Wikimedia Foundation}}
|-
| Referencing this again ||
|-
| Citation needed || {{citation needed}}
|}
===== Templates and transcluding pages =====
{{main|Wikipedia:Transclusion}}
{{see also|Help:Template#Noinclude, includeonly, and onlyinclude}}
Examples for templates: {{Transclusion demo}}
|
{{Transclusion demo}}
|-
|
{{Help:Transclusion demo}}
|
{{Help:Transclusion demo}}
|-
|
This template takes two parameters,
and creates underlined text with a
hover box for many modern browsers
supporting CSS:
{{H:title|This is the hover text|
Hover your mouse over this text}}
Go to this page to see the H:title
template itself: {{tl|H:title}}
|
This template takes two parameters,
and creates underlined text with a
hover box for many modern browsers
supporting CSS:
{{H:title|This is the hover text|
Hover your mouse over this text}}
Go to this page to see the H:title
template itself: {{tl|H:title}}
|}
===== Talk and project pages =====
==== Signing comments ====
* The character **tilde** (~) is used when adding a comment to a Talk page.
* Your username provides a link to your [[Wikipedia:user page|user page]].
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
|
//You should sign your comments by appending four tildes to the comment, which adds your user name plus date/time.//
|
~~~~
|
[[Special:Mypage|Username]] ([[Special:Mytalk|talk]]) {{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)
|-
|
//Adding three tildes will add just your user name.//
|
~~~
|
[[Special:Mypage|Username]] ([[Special:Mytalk|talk]])
|-
|
//Adding five tildes gives the date/time alone.//
|
~~~~~
|
{{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)
|}
==== What links here and related changes ====
{| class="wikitable"
! What you type
! What it looks like
|-
|
[[http://en.wikipedia.org/w/index.php?title=Help:Wiki_markup&diff=330350877&oldid=330349143|previous edit]]
|
[[http://en.wikipedia.org/w/index.php?title=Help:Wiki_markup&diff=330350877&oldid=330349143|previous edit]]
|}
==== User edits ====
* Link to a user's **Contributions** page.
{| class="wikitable"
! Description
! What you type
! What it looks like
|-
| //Username (registered users).//
| [[Special:Contributions/UserName]]
| [[Special:Contributions/UserName]]
|-
| //[[IPv4]] address (unregistered users).//
| [[Special:Contributions/192.0.2.0]]
| [[Special:Contributions/192.0.2.0]]
|-
| //[[IPv6]] address (unregistered users).//
| [[Special:Contributions/2001:0db8:0000:0000:0000:ff00:0042:8329]]
| [[Special:Contributions/2001:0db8:0000:0000:0000:ff00:0042:8329]]
|}
==== Coloring text ====
{| class="wikitable"
! What you type
! What it looks like
|-
|
I will change the color in {{color|red|the middle part of}} this sentence.
|
I will change the color in {{color|red|the middle part of}} this sentence.
|}
==== Show deleted or inserted text ====
* When editing regular Wikipedia articles, just make your changes and do not mark them up in any special way.
* When editing your own previous remarks in talk pages, it is sometimes appropriate to mark up deleted or inserted material.
* For striking out material, the {{tag|s|content=}} markup is a less semantic element than {{tag|del|content=}}.
{| class="wikitable"
! What you type
! What it looks like
|-
|
You can {{tag|del|content=strike out deleted material}} and {{tag|ins|content=underline new material}}. {{tlx|du|Double underlining}} is also possible.
|
You can Alternative markup:
You can {{tag|s|content=strike out deleted material}} and {{tag|u|content=underline new material}}.
|
Alternative markup:
You can **&<nowiki&> tag:**
<nowiki>
The nowiki tag ignores [[wiki]]
//markup//. It reformats text by
removing newlines and multiple
spaces. It still interprets
special characters: →
</nowiki>
|
**<nowiki> tag:**
**&<pre&> tag:**
<pre>The <pre> tag ignores [[wiki]]
//markup// as does the <nowiki>
tag. Additionally, <pre> displays
in a mono-spaced font, and does
not reformat text spaces.
It still interprets special
characters: →
</pre>
|
**<pre> tag:**
The <pre> tag ignores [[wiki]]
//markup// as does the <nowiki>
tag. Additionally, <pre> displays
in a mono-spaced font, and does
not reformat text spaces.
It still interprets special
characters: →
|-
|
**[[Text without a URL]]:**
Single square brackets holding
[[text without a HTTP URL]] are
preserved, but single square
brackets containing a URL are
treated as being an external
[[http://www.google.com|Web link]].
|
**[[Text without a URL]]:**
Single square brackets holding
[[text without a HTTP URL]] are
preserved, but single square
brackets containing a URL are
treated as being an external
[[http://www.google.com|Web link]].
|-
|
**Leading space:**
Leading spaces are another way
to preserve formatting.
Putting a space at the
beginning of each line
stops the text from
being reformatted.
It still interprets [[wiki]] //markup// and special characters: →
|
**Leading space:**
Leading spaces are another way
to preserve formatting.
Putting a space at the
beginning of each line
stops the text from
being reformatted.
It still interprets [[wiki]] //markup// and special characters: →
|}
==== Nowiki ====
{{shortcut|WP:NOWIKI}}
In some instances, it is not desirable to parse markup nor to format it using {{tag|pre|o}}. {{tag|nowiki|o}} is a parser tag that causes the included content to not be parsed as wikimarkup, except for HTML entities. It is very useful in documentation to display markup.
{{markup
|{{tl|cite book}} to create a link: {{tl|cite book}})
A singular {{tag|nowiki|s}} can be used to break wikimarkup.
* Markup such as {{code|*}}, {{code|#}}, {{code|;}} and {{code|:}} only and always take effect at the beginning of a line. A {{tag|nowiki|s}} before the markup will cause the characters to not parse as markup.
* An internal link immediately followed by characters are blended to form a single link. Where this is not desired, add a {{tag|nowiki|s}} after the link.
{{markup|title={{tag|nowiki|o}} examples
|& with &.
{{markup
|&
|<
|&
|<
}}
**Use in templates**
When used in a template, {{tag|nowiki|o}} simply does not work as you may expect.
* Including {{tag|nowiki|o}} immediately acts upon the enclosed markup. Attempting to escape or transclude the brackets causes {{tag|nowiki|s}} to not work at all.
* Using {{code|#tag:nowiki}} works, but has major limitations:
* Templates, parameters, parser functions, and parser magic such as signatures are parsed, not nowikied.
* Included {{tag|ref|o}} tags will expose the [[Help:strip markers|strip markers]].
{{markup
|
[[wiki]] markup &
[[wiki]] markup &
}}
{{tag|pre|o}} formatted text does not wrap, thus text may extend past the browser window:
Lorem ipsum dolor sit amet, consectetur adipisicing 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.
To resolve this, {{tag|pre|o}} may use CSS styling to add wrapping or a horizontal scrollbar:
* {{tag|pre|o|params=style="overflow:auto; width:auto; white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"}}
* {{tag|pre|o|params=style="scroll white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"}}
Since this involves quite a bit of markup, the template {{tl|pre2}} is useful.
===== Invisible text (comments) =====
{{Merge to|Help:HTML in wikitext#Comments|date=June 2012|Reason=Not wikimarkup; see talk}}
{{see also|Help:Hidden text}}
It's uncommon{{spaced ndash}}but on occasion acceptable for notes to other editors{{spaced ndash}}to add a hidden comment within the text of an article. These comments are only visible when editing or viewing the source of a page. Most comments should go on the appropriate [[Wikipedia:Talk page|Talk page]]. The format is to surround the hidden text with "<!--" and "-->" and may cover several lines, e.g.:
Another way to include a comment in the wiki markup uses the {{tl|Void}} template, which can be abbreviated as {{tl|^}}. This template "expands" to the empty string, generating no html output; it is visible only to people editing the wiki source. Thus {{tlp|^|A lengthy comment here}} operates similarly to the comment <!-- A lengthy comment here-->. The main difference is that the template version can be nested, while attempting to nest HTML comments produces odd results.
===== Variables =====
{{seealso| Help:Magic_words#Variables}}
{{namespaces}}
{| style="text-align:center"
|-
! Code
! Effect
! Notes
|-
| {{grammar:case|word}} to convert a word from the nominative case to some other case. For example, {{grammar:genitive|{{CURRENTMONTHNAME}}}} means the same as {{CURRENTMONTHNAMEGEN}} .
===== HTML =====
{{main|Help:HTML in wikitext}}
Many [[HTML]] tags can be used in wiki markup. You can check your HTML by using [[Help:Markup validation|markup validation]].
[[Category:Wikipedia how-to]]
[[Category:Wikipedia editor help]]
[[Category:Wikipedia text help]]
[[ko:위키백과:위키 문법]]
[[es:Ayuda:Edición]]
[[it:Aiuto:Markup]]
[[ru:Википедия:Викификация]]
[[ml:സഹായം:എഡിറ്റിങ് വഴികാട്ടി]]