Help:Wikitext: Difference between revisions

Content deleted Content added
 
(46 intermediate revisions by the same user not shown)
Line 5:
{{Wikipedia how to}}
{{Wikitext navbox}}
'''Wikitext''', also known as '''Wiki markup''' or '''Wikicode''', consists of the syntax and keywords used by the [[wikipedia:MediaWiki|MediaWiki]] software to format a page. To learn how to see this [[wikipedia:hypertext markup|hypertext markup]], and to save an edit, see [[wikipedia:Help:Editing|Help:Editing]]. Generally, coding can be copied and pasted, without writing new code. There is a short list of markup and tips at [[Help:Cheatsheet]].
 
In addition to Wikitext, some [[Wikipedia:HTML element|HTML element]]s are also allowed for presentation formatting. See [[Help:HTML in wikitext]] for information on this.
{{TOC limit}}
 
Line 26:
* Do not use <em>any</em> markup after the final heading markup – this will either break the heading, or will cause the heading to not be included in an edit summary.
 
{{#lst:wikipediaHelpwikipedia:Help:HTML in wikitext|WIKI_section}}
 
Templates: {{tl|fake heading}} for use in documentation.
Line 51:
* <code><nowiki>__NOTOC__</nowiki></code> disables the TOC entirely.
* {{tl|TOC limit}} can be used to control the depth of subsections included in the TOC. This is useful where the TOC is long and unwieldy.
* [[:Category:Wikipedia table of contents templates]] contains a number of specialized TOC templates.
 
===Line breaks===
<!--[[wikipedia:Help:Breaks]] links directly here.-->
{{see|wikipedia:Help:Line-break handling|Wikipedia:Line breaks usage}}
 
Line breaks or newlines are used to add whitespace between lines, such as separating paragraphs.
Line 130 ⟶ 129:
 
===Center text===
{{See also|wikipedia:Span and div|wikipedia:HTML tag|wikipedia:Template:Align}}
{{markup
|<syntaxhighlight lang="html" inline style="border:none; background:transparent;"><div class="center" style="width: auto; margin-left: auto; margin-right: auto;">Centered text</div></syntaxhighlight>
Line 216 ⟶ 215:
 
===={{Anchor|DL}}Description lists====
{{anchors|Definition lists|Association lists|H:DL}}
{{Shortcut|H:DL}}
 
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.
Line 223 ⟶ 221:
''Description lists''<!--HTML5 name--> (formerly ''definition lists''<!--HTML4 name-->, and a.k.a. ''association lists''<!--draft HTML5 name-->) consist of group names corresponding to values. Group names (terms) are in bold. Values (definitions) are indented. Each group <em>must</em> include one or more definitions. For a single or first value, the <code>:</code> can be placed on the same line after <code>;</code> – but subsequent values must be placed on separate lines.
 
{{hatnote-inline|Do not use a semicolon (;) simply to bold a line without defining a value using a colon (:). This usage renders invalid [[Wikipedia:HTML5]] and creates issues with [[wikipedia:screen reader|screen reader]]s.}}
 
{{markup
Line 249 ⟶ 247:
{{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}}; the template {{tlx|poemquote}} provides a convenient shorthand. [[wikipedia:H:CSS|CSS styles]] may be applied to this tag, e.g.: <code><nowiki><poem style="margin-left: 2em;"></nowiki></code>.
 
{{markup
Line 345 ⟶ 343:
|-
|
Small chunks of [[wikipedia:source code|source code]] within a line of normal text.
 
Code is displayed in a [[wikipedia:Monospaced font|monospace]] font.
|
<pre><nowiki>function <code>int m2()</code> is nice.</nowiki></pre>
Line 394 ⟶ 392:
|
<syntaxhighlight lang="html">
To match, for example, the font-size used in an [[wikipedia: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>.
</syntaxhighlight>
|
To match, for example, the font-size used in an [[wikipedia: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>.
 
<!----------------- <big> text ------------------>
Line 414 ⟶ 412:
|-
|
To prevent two words from becoming separated by a [[wikipedia:linewrap|linewrap]] (e.g. ''Mr.&nbsp;Smith'' or ''400&nbsp;km/h'') a '''[[wikipedia:non-breaking space|non-breaking space]]''', sometimes also called a "non-printing character", may be used between them. (For three or more words, the template {{tl|nowrap}} is probably more suitable.)
|
<pre>Mr.&amp;nbsp;Smith or 400&amp;nbsp;km/h</pre>
Line 440 ⟶ 438:
<kbd>''italics'', '''bold'''</kbd>
 
<kbd>[[wikilinkwikipedia:Wikilink]]
 
New paragraph </kbd>started here.</nowiki></pre>
Line 448 ⟶ 446:
<kbd>''italics'', '''bold'''</kbd>
 
<kbd>[[wikilinkwikipedia:Wikilink]]
 
New paragraph </kbd>started here.</pre>
Line 456 ⟶ 454:
 
===Special characters===
{{See also|Wikipedia:Help:Special characters|Wikipedia:List of XML and HTML character entity references}}
Special characters can often be displayed using [[Wikipedia:Numeric character reference|numeric character references]] or [[Wikipedia:List of XML and HTML character entity references|character entity references]]. See [[Wikipedia:Character encodings in HTML|Character encodings in HTML]] for more information. For example, <code>&amp;Agrave;</code> and <code>&amp;#xC0;</code> both render [[Wikipedia:&Agrave|;]] (A-[[Wikipedia:Grave accent|grave]]). [[Wikipedia:Percent-encoding|Percent-encoding]] can't be used, as it works only in [[Wikipedia:URL|URL]]s.
 
====Diacritical marks====
[[Wikipedia:Diacritic|Diacritic]] marks, using character entity references.
{| class="wikitable"
! What you type
Line 576 ⟶ 574:
|Τ Υ Φ Χ Ψ Ω
|}
 
====Egyptian hieroglyphs====
{{main|Help:WikiHiero syntax}}
 
WikiHiero is a software extension that renders [[Egyptian hieroglyphs]] as PNG images using {{xtag|hiero}} tags.
 
Example:
{{markup
|<nowiki><hiero>P2</hiero></nowiki>
|<hiero>P2</hiero>
}}
 
====Chess symbols====
{{main|Chess symbols in Unicode}}
 
For example, &amp;#9812; displays &#9812;
 
====Subscripts and superscripts====
* The [[Wikipedia:Manual of Style (mathematics)#Superscripts and subscripts|Manual of Style]] prefers the {{tag|sub|o}} and {{tag|sup|o}} formats, for example <code>x{{tag|sub|content=1}}</code>. So this should be used under most circumstances.
* The latter methods of sub/superscripting cannot be used in the most general context, as they rely on [[wikipedia:Unicode|Unicode]] support that may not be present on all users' machines.
 
{| class="wikitable"
Line 652 ⟶ 634:
&epsilon;<sub>0</sub> = 8.85 &times; 10<sup>&minus;12</sup> C&sup2; / J m
 
1 [[wikipedia:hectare|hectare]] = [[wikipedia:1 E+4 m&sup2;|1 E+4 m&sup2;]]
 
|}
Line 659 ⟶ 641:
{{main|wikipedia:MOS:TEXT#PUA and RTL}}
 
Invisible and [[wikipedia:Private Use Areas|PUA (Private Use Areas)]] characters should be avoided where possible. When needed, they should both be replaced with their (hexa)decimal code values (as "&#(x)...;"). This renders invisible characters visible, for manual editing, and allows [[Wikipedia:AutoWikiBrowser|AWB]] to process pages with PUA characters. The latter should also be tagged with the {{tl|PUA}} template for tracking and future maintenance.
 
===Mathematical characters and formulae===
Line 665 ⟶ 647:
====Mathematical characters====
 
* See also [[Wikipedia:Mathematical symbols]], [[Wikipedia:WikiProject Mathematics|WikiProject Mathematics]] and [[wikipedia:TeX|TeX]].
 
{| class="wikitable"
Line 701 ⟶ 683:
{{main|Help:Displaying a formula}}
 
* Formulae that include mathematical letters, like {{math|x}}, and operators like <code>×</code> should not use the plain letter <code>x</code>. See [[wikipedia: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 [[wikipedia:Help:Displaying_a_formula#TeX_vs_HTML|''TeX vs HTML'']].
 
* The {{tag|math|o}} tag typesets using [[wikipedia:MOS:MATH#Typesetting_of_mathematical_formulae|LaTeX markup]],{{efn|The version of LaTeX used is a subset of AMS-LaTeX markup; see [[wikipedia:Help:Displaying a formula]] for details.}} which may render as an image or as HTML, depending on environmental settings. The {{tag|math|o}} 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 [[wikipedia: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 <code>=</code> sign, so remember to replace <code>=</code> with <code>{{tl|{{=}}}}</code> in template input, or start the input with <code>1=</code>. Use wikimarkup <code><nowiki>''</nowiki></code> and <code><nowiki>'''</nowiki></code> inside the {{tl|math}} template, as well as other [[Wikipedia:Mathematical_symbols|HTML entities]]. The {{tl|math}} template is best for typeset formulas in line with the text.
Line 746 ⟶ 728:
====Complicated formulae====
 
* See [[wikipedia:Help:Displaying a formula]] for how to use {{tag|math|o}}.
* A formula displayed on a line by itself should probably be indented by using the colon (:) character.
 
Line 758 ⟶ 740:
 
==Links and URLs==
{{Note|This whole section on links is better read on wikipedia, as the original links are there, here we had to prepend <code>Wikipedia:</code> to avoid many broken links. Original here: [[Wikipedia:Help:Wikitext#Links and URLs|Links and URLs]]}}
{{main|Wikipedia:Help:Link}}
 
===Free links===
 
In [[wikipedia:Wikipedia|Wikipedia]] and some other [[wikipedia:wiki|wiki]]s, '''free links''' are used in [[wikipedia:wikitext|wikitext]] markup to produce [[wikipedia:internal link|internal link]]s between pages, as opposed to the concept of [[wikipedia:CamelCase|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, <code><nowiki>[[Texas]]</nowiki></code> will be rendered as [[wikipedia:Texas|Texas]]. Optionally, you can use a [[wikipedia:vertical bar|vertical bar]] (|) to customize the link title. For example, typing <code><nowiki>[[Texas|Lone Star State]]</nowiki></code> will produce [[wikipedia:Texas|Lone Star State]], a link that is displayed as "<u>Lone Star State</u>" but in fact links to [[wikipedia:Texas|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 <code>en.wikipedia.org/wiki/Public_transport</code>, which is the Wikipedia article with the name "Public transport". See also [[Wikipedia:Help:Link#Conversion to canonical form|Canonicalization]].
* [[wikipedia:Intentionally permanent red link|A red link]] is a page that doesn't exist yet; it can be created by clicking on the link.
* [[wikipedia:Help:Self link|A link to its own page]] will appear only as bold text.
 
{{markup
|<nowiki>London has [[public transport]].</nowiki>
|London has [[Wikipedia:public transport]].
 
|<nowiki>Link to this article: "[[Help:Wikitext]]" will appear only as bold text.</nowiki>
Line 792 ⟶ 775:
|-
|
<code><nowiki>New York also has [[Wikipedia:public transport|public transportation]].</nowiki></code>
|
New York also has [[Wikipedia: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 [[Wikipedia: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 [[Wikipedia:Help:Pipe trick|Pipe trick]] for details.
 
{| class="wikitable"
Line 812 ⟶ 795:
<code><nowiki>[[kingdom (biology)|]]</nowiki></code>
|
[[Wikipedia:kingdom (biology)|kingdom]]
|-
| ''Automatically hide the comma and following text''
| <code><nowiki>[[Seattle, Washington|]]</nowiki></code>
| [[Wikipedia:Seattle, Washington|Seattle]]
|-
|
Line 823 ⟶ 806:
<code><nowiki>[[Wikipedia:Village pump|]]</nowiki></code>
|
[[Wikipedia:Wikipedia:Village pump|Village pump]]
|-
|
Line 843 ⟶ 826:
 
* Endings are blended into the link.
** ''Exception'': a trailing [[wikipedia:apostrophe|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 [[#Nowiki|{{tag|nowiki|s}}]] tag, which may be desirable in some instances.
Line 855 ⟶ 838:
|
<code><nowiki>San Francisco also has [[public transport]]ation. Examples include [[bus]]es, [[taxicab]]s, and [[tram]]s.</nowiki></code>
| San Francisco also has [[Wikipedia:public transport]]ation. Examples include [[Wikipedia:bus]]es, [[Wikipedia:taxicab]]s, and [[Wikipedia:tram]]s.
|-
| <code><nowiki>A [[micro-]]second</nowiki></code>
| A [[Wikipedia:micro-]]second
|-
|
Line 865 ⟶ 848:
<code><nowiki>A [[micro-]]<nowiki />second.</nowiki></code>
|
A [[Wikipedia:micro-]]<nowiki />second
|}
 
====Link to a section of a page====
 
* The part after the hash sign (#) must match a [[Wikipedia:Section_editing#Creation_and_numbering_of_sections|section heading]] on the page. Matches must be exact in terms of spelling, case, and punctuation. Links to non-existent sections are not broken; they are treated as links to the beginning of the page.
* Include "| link title" to create a stylish ([[wikipedia:WP:Piping|piped]]) link title.
* If sections have the same title, add a number to link to any but the first. [[#Example section 3]] goes to the third section named "Example section". You can use the pipe and retype the section title to display the text without the # symbol.
Line 917 ⟶ 900:
 
===Redirects===
{{main|Wikipedia:Help:Redirect}}
 
* [[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 "[[Wikipedia:US|US]]").
* It is possible to redirect to a section. For example, a redirect to [[Wikipedia:United States#History]] will redirect to the History section of the [[Wikipedia:United States|United States]] page, if it exists.
 
{| class="wikitable" border=1
Line 937 ⟶ 920:
|}
 
===Link to another [[Wikipedia:Help:namespace|namespace]]===
 
*The full page name should be included in double square brackets.
Line 946 ⟶ 929:
|-
|
<code><nowiki>See the [[WikipediaHelp:ManualProtecting ofand Styleunprotecting pages]].</nowiki></code>
|
See the [[Wikipedia:ManualHelp:Protecting ofand Styleunprotecting pages|Help:Protecting and unprotecting pages]].
|}
 
===Link to the same article in another language (interlanguage links)===
{{main|Wikipedia:Help:Interlanguage links|Wikipedia:Complete list of language wikis available}}
{{notice|After the launch of [[Wikipedia:Wikidata|Wikidata]], interlanguage links are now added through it. Links in articles should exist only in special cases, for example when an article in one language has two articles in another language.}}
 
Line 959 ⟶ 942:
* 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".
 
* '''NOTE:''' To create an '''''inline link''''' (a clickable link within the text) to ''any'' foreign language article, see [[Wikipedia:Help:Interlanguage links#Inline interlanguage links]] and consider the usage notes.
 
{| class="wikitable"
Line 966 ⟶ 949:
|-
|
''Link from English article "Plankton" to the Spanish article [[Wikipedia:es:Plancton|"Plancton"]].''
 
''"es" is the language code for "{{lang|es|español}}" (the [[Wikipedia:Spanish language|Spanish language]]).''
|
<pre>
Line 989 ⟶ 972:
===Interwiki link===
 
* [[Wikipedia:Interwiki links|Interwiki links]] link to any page on other wikis. [[Wikipedia:Help:Interwikimedia links|Interwikimedia links]] link to other Wikimedia wikis.
* Note that interwikimedia links use the internal link style, with double square brackets.
* See [[MetaWikiPediaMetaWikimedia:Interwiki_map]] for the list of shortcuts; if the site you want to link to is not on the list, use an [[#External links|external link]].
* See also [[Wikipedia:Wikimedia sister projects|Wikimedia sister projects]].
 
Line 1,083 ⟶ 1,066:
 
*Single square brackets indicate an external link. Note the use of a ''space'' (not a pipe |) to separate the URL from the link text in a named link. Square brackets may be used as normal punctuation when not linking to anything – [like this].
*A [[Wikipedia:Uniform Resource Locator|URL]] must begin with a supported [[Wikipedia:URI scheme|URI scheme]]: <code>http://</code> and <code>https://</code> will be supported by all browsers; <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <syntaxhighlight lang="text" inline>news://</syntaxhighlight>, <code>mailto:</code>, and <code>gopher://</code> will require a plugin or an external application. IPv6 addresses in URLs are currently not supported.
*A URL containing certain characters will display and link incorrectly unless those characters are [[Wikipedia:Percent-encoding|percent encoded]]. For example, a space must be replaced by <code>%20</code>. Encoding can be achieved by:
:*Use the link button [[File:OOjs UI icon link-ltr.svg]] 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:
Line 1,093 ⟶ 1,076:
| %20 || %22 || %27 || %2c || %3b || %3c || %3e || %3f || %5b || %5d
|}
:*Or use the <code><nowiki>{{urlencode:}}</nowiki></code> magic word. See [[:mw:Help:Magic words#URL data|Help:Magic words]] in the MediaWiki documentation for more details.
 
* See [[Wikipedia:External links]] for style issues, and [[:Category:External link file type templates]] for indicating the file type of an external link with an icon.
Line 1,103 ⟶ 1,086:
|-
|
''Named link'' with an [[Wikipedia:Help:external link icons|external link icon]]
|
<code><nowiki>[http://www.wikipedia.org Wikipedia]</nowiki></code>
Line 1,140 ⟶ 1,123:
 
===Automatic links===
{{main|Wikipedia:Help:Magic links}}
 
Magic links are automatic links for certain unique identifiers that require no markup. They can be used for ISBN numbers, RFC numbers, and PMID numbers.
Line 1,171 ⟶ 1,154:
====RFC number====
 
* Link to an [[Wikipedia:Internet Engineering Task Force|Internet Engineering Task Force]] [[Wikipedia:Request for Comments|Request for Comments (RFC)|]].
 
{| class="wikitable"
Line 1,243 ⟶ 1,226:
====Links partially italicized====
 
*Linking to a page with a title containing words that are usually italicized, such as the [[Wikipedia:Hindenburg disaster|''Hindenburg'' disaster]] article.
 
{| class="wikitable"
Line 1,252 ⟶ 1,235:
<code><nowiki>[[Hindenburg disaster|''Hindenburg'' disaster]]</nowiki></code>
|
[[Wikipedia:Hindenburg disaster|''Hindenburg'' disaster]]
|}
 
Line 1,280 ⟶ 1,263:
 
Refer to [[Wikipedia:Manual of Style (pronunciation)]] for more information.
 
==Musical notation==
{{main|Help:Score}}
Musical notation is added by using the {{xtag|score|p}} extension tag. For example:
:
{{markup
|<nowiki><score>\relative c' { fis d fis a d f e d c cis d e a g f ees }</score></nowiki>
|<score>\relative c' { fis d fis a d f e d c cis d e a g f ees }</score>
}}
 
==Images==
{{Main page|Wikipedia:Help:Visual file markup|Wikipedia:Images}}
Only images that have been uploaded to Wikipedia or [[support-commons:Main Page|WikimediaSupport Commons]] can be used. To upload images, use the [[:support-commons:Special:UploadWizard|Commons upload wizard]] for photos you have taken, and thethis [[Special:Upload|Wikipediawiki's upload page]] if there may be copyright issues. You can find the uploaded image on the [[Special:Imagelist|image list]].
 
See the Wikipedia's [[Wikipedia:Image use policy|image use policy]] for the policy used on Wikipedia.
Line 1,473 ⟶ 1,447:
 
==Columns==
{{main|Wikipedia:Help:Columns}}
Use {{tl|colbegin}} and {{tl|colend}} to produce columns.
 
==References and citing sources==
{{main|Wikipedia:Citing sources|Wikipedia:Help:Footnotes}}
{{see also|Wikipedia:APA style|Wikipedia:The Chicago Manual of Style{{!}}Chicago style|Wikipedia:Harvard style|Wikipedia:MLA style}}
 
Making a reference citing a printed or online source can be accomplished by using the {{tag|ref}} tags. Inside these tags details about the reference are added.
Line 1,525 ⟶ 1,499:
==Templates and transcluding pages==
{{main|Wikipedia:Transclusion}}
{{see also|Wikipedia:Help:Template#Noinclude,|Wikipedia:Help:Template#includeonly|Wikipedia:Help:Template#onlyinclude |l2 = includeonly,|l3 and= onlyinclude}}
 
Examples for templates: <nowiki>{{pad|...}}, {{math|...}}, {{as of|...}}, {{edit}}</nowiki>
 
'''[[Wikipedia:Help:TemplateTemplate‏‎ |Templates]]''' are segments of wiki markup that are meant to be copied automatically ("transcluded") into a page.
They are specified by putting the template's name in <nowiki>{{double braces}}</nowiki>. Most templates are pages in the [[wikipedia:WP:Template namespace|Template namespace]], but it is possible to transclude mainspace pages (articles) by using <nowiki>{{:colon and double braces}}</nowiki>.
 
There are three pairs of [[Wikipedia:html element|tags]] that can be used in [[Wikipedia:wikitext|wikitext]] to control how transclusion affects parts of a template or article.
They determine whether or not wikitext renders, either in its own article, which we will call "'''here'''", or in another article where it is transcluded, which we will call "'''there'''".
* '''<nowiki><noinclude></nowiki>: ''' the content '''will not be rendered ''there'''''. These tags have no effect ''here''.
* '''<nowiki><includeonly></nowiki>: ''' the content '''will render only ''there''''', and '''will not render ''here''''' (like [[Wikipedia:invisible ink|invisible ink]] made visible by means of transclusion).
* '''<nowiki><onlyinclude></nowiki>: ''' the content '''will render ''here''''' and '''will render ''there''''', but it will only render ''there'' what is between these tags.
There can be several such section "[[Wikipedia:HTML#Elements|elements]]". Also, they can be nested. All possible renderings are achievable. For example, to render ''there'' one or more sections of the page ''here'' use '''<nowiki><onlyinclude></nowiki>''' tags. To append text ''there'', wrap the addition in '''<nowiki><includeonly></nowiki>''' tags before, within, or after the section. To omit portions of the section, nest '''<nowiki><noinclude></nowiki>''' tags within it.
 
If a page is transcluded without transclusion markup, it may cause an unintentional [[Wikipedia:Help:Category#Putting_pages_in_categories|categorization]]. Any page transcluding it will contain the same category as the original page. Wrap the category markup with '''<nowiki><noinclude></nowiki>''' tags to prevent incorrect categorization.
{{anchor|hovertext}}
Some templates take ''parameters'', as well, which you separate with the pipe character <code>|</code>.
Line 1,586 ⟶ 1,560:
 
==Talk and project pages==
{{Note|Everything in this section is copied from wikipedia and is best viewed on that page: [[Wikipedia:Help:Wikitext#Talk and project pages]] as all the diff examples relay on existing Wikipedia page histories}}
These are likely to be helpful on [[Help:Using talk pages|talk]] and [[Wikipedia:Project namespace|project pages]].
 
 
These are likely to be helpful on [[Wikipedia:Help:Using talk pages|talk]] and [[Wikipedia:Project namespace|project pages]].
 
===Signing comments===
 
*The ''[[Wikipedia:tilde|tilde]]'' character (~) is used when signing a comment on a talk page. Your username provides a link to your [[Wikipedia:user page|user page]].
 
{| class="wikitable"
Line 1,621 ⟶ 1,598:
===Linking to old revisions of pages, diffs, and specific history pages===
 
*The external link function is mainly used for these. Open an old revision or diff, and copy the [[Wikipedia:URL|URL]] from the address bar, pasting it where you want it.
 
{| class="wikitable"
Line 1,633 ⟶ 1,610:
|}
 
*You can also use an [[Wikipedia:Help:Diff#Internal links|internal diff link]]. '''Unlike the template {{tl|diff}}, this kind of link can even be used in edit summaries.'''
 
{| class="wikitable"
Line 1,657 ⟶ 1,634:
|}
 
*For an old revision, you can also use a [[Wikipedia:Help:Permanent link|permalink]]. Though here only the main text is guaranteed to be retained (images and templates will be shown as they are today, not as they were at the time).
 
{| class="wikitable"
Line 1,671 ⟶ 1,648:
===What links here, and recent changes linked===
 
*The following markup can be used. For example, for the article [[Wikipedia:Beetroot]]:
{| class="wikitable"
! What you type
Line 1,689 ⟶ 1,666:
===User edits===
 
*Link to a user's [[Wikipedia:Help:User contributions|contributions page]].
 
{| class="wikitable"
Line 1,901 ⟶ 1,878:
{{anchor|NOWIKI}}
{{redirect|wikipedia:WP:NOWIKI|the essay about the name "Wiki"|Wikipedia:Don't abbreviate "Wikipedia" as "Wiki"!}}
{{shortcut|H:NOWIKI|wikipedia:WP:NOWIKI}}
 
In order for the software to interpret wiki markup, its parser first scans the page. When it sees its nowiki tags
:{{tag|nowiki}} ([[Wikipedia:escape character|escape]]s all contained wiki markup), and
:{{tag|nowiki|s}} (escapes the interpretations it is designed to "break"),
it escapes its wikicode, so editors can document its markup ''using'' its markup.
Line 1,910 ⟶ 1,886:
Article editors can normalize the font of characters trailing <code>[<nowiki />[...]]outside</code> a wikilink, which would otherwise adhere to the wikilink font. They can also add line-spacing in the wikitext. Template editors: tag {{tag|nowiki|o}} works only on its source page, not the target; also <code>{{#tag<nowiki />:nowiki&nbsp;|&nbsp;''content''}}</code>, although it wraps that content in nowiki tags, it also does a [[mw:Manual:Tag extensions#How do I render wikitext in my extension?|pre-save transform]] on that content, which is entirely at odds with the intended purpose of nowiki for templates, subst, signatures, and the pipe-trick.
 
The two kinds of nowiki operate in different ways to target content, but they both remove meaning (subtract rendering) of wiki markup, then disappear into the background font. Nowiki does nothing toward rendering, but it can add newlines to wikitext (for readability), just like the HTML comment (the preferred method) can. Unlike wiki markup, nowiki does not remove the meaning of ''character entities'', either [[Wikipedia:HTML character entities|HTML]] or MediaWiki [[#Special characters|special ''characters'']].
 
There is only one meaning for what {{tag|nowiki}} contains, so it needs few examples; but the singular {{tag|nowiki|s}} tag "contains" ''many'' linkage structures, where it is expected between bracketing-pair characters or in the keyword area. So this section has ''many'' examples and few mis-examples.
Line 1,924 ⟶ 1,900:
<nowiki /># Ordered list
|<nowiki>A [[micro-]]second.</nowiki>
|A [[Wikipedia:micro-|micro-]]second.
|<nowiki>A [[micro-]]<nowiki />second.</nowiki>
|A [[Wikipedia:micro-|micro-]]<nowiki />second.
|<nowiki>a<nowiki>
 
Line 1,949 ⟶ 1,925:
:{{ ''pagename'' <nowiki />| {{ ''pagename'' }<nowiki />} }}
 
Unless you use the two "balanced" nowiki tags, troubleshooting [[Wikipedia:help:strip markers|strip marker]] errors and template parameter-handling inconsistencies is a risk. Also, a rendering error may arise when two <kbd>[<nowiki />[...]]</kbd> square brackets are on the same line, or two <kbd>{<nowiki />{...}}</kbd> curly brackets are in the same section, but only when the two have the nowiki markup placed inconsistently.
 
====Displaying wikilinks====
Line 2,020 ⟶ 1,996:
 
====Displaying magic words====
{{Further|Wikipedia:Help:Magic words|Wikipedia:Help:Parser function}}
 
For input '''parameters''', {{{1}}}, {{{2}}}, just write them out, unless they have a default (which goes behind their pipe):
Line 2,156 ⟶ 2,132:
 
==Invisible text (comments)==
{{see also|Wikipedia:Help:Hidden text|l1=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 visible only when editing or viewing the source of a page. Most comments should go on the appropriate [[Wikipedia:Talk page|Talk page]]. <!-- This is an example of text that is not visible except in "edit" mode. --> The format is to surround the hidden text with "<code>&lt;!--</code>" and "<code>--&gt;</code>" and may cover several lines, e.g.:
Line 2,266 ⟶ 2,242:
{{main|Help:HTML in wikitext}}
 
Many [[Wikipedia:HTML]] tags can be used in wiki markup. You can check your HTML by using [[Wikipedia:Help:Markup validation|markup validation]].
 
==Common templates==
{{quicktemplates |state=expanded}}
 
==Notes==