Help:Wikitext: Difference between revisions

27,822 bytes added ,  5 years ago
+{{Seo}}
No edit summary
(+{{Seo}})
 
(8 intermediate revisions by the same user not shown)
Line 1:
{{Help page}}
{{Tip|You can view a simplified version of this page at [[Help:Cheatsheet]] that lists the most commonly used wiki formatting codes you need to know.}}
''Page is a WIP''
 
'''Wikitext''', also known as '''wiki markup''', refers to the syntax, keywords, and punctuation marks used by {{SITENAME}} to format a page. For example, to make text italicized, you would type <code><nowiki>''text to be italicized''</nowiki></code> into the page when [[Help:Editing|editing]] it. You will see wikitext if you click on '{{int:visualeditor-ca-editsource}}' to edit a page. If you use the new [[Help:VisualEditor|VisualEditor]] to edit a page, you will not see wikitext when editing, and will instead edit the page like you would a Word document.
 
Line 189 ⟶ 187:
Lists can be used as a way of organizing content. Each entry of the list should be preceded by a <code>*</code> (for bulleted lists) or <code>#</code> (for numbered lists), and each entry should be separated by one line break. A line that doesn't start with a <code>*</code> or <code>#</code> is not considered to be part of the list.
 
====Bulleted lists====
Bulleted, or unordered lists, are marked with a standard "bullet" character.
{| style="width:100%;"
Line 223 ⟶ 221:
|}
 
====Numbered lists====
Numbered, or ordered lists, are numbered on the side. Numberings will continue past sub-items, but a line that doesn't start with a <code>#</code> is not considered part of the list, and the numbering will be reset on the next list.
{| style="width:100%;"
Line 429 ⟶ 427:
 
If you link to a page that doesn't exist yet, it will turn red, [[Intentionally permanent red link|like this]]. If you click on a red link, you'll be taken to a page where you can create that page. If you link to the current page, it will be shown as '''bold text''' instead.
 
You can also link to a [[Help:Section|section]] of a page by adding a hash symbol (''#'') and then specifying the name of the section you want to link to after it. For example, <code><nowiki>[[The Sims 2#Tutorial]]</nowiki></code> would link to the [[The Sims 2#Tutorial|Tutorial]] section of [[The Sims 2]],
 
{| style="width:100%;"
Line 445:
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
Linking to the current page, like [[Help:Wikitext]], will display as '''bold text''' instead.
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
''The Sims 3'' has an [[The Sims 3#Open neighborhood|open world]] playstyle.
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
''The Sims 3'' has an [[The Sims 3#Open neighborhood|open world]] playstyle.
|-
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|}
 
====Blend links====
You can have the text immediately after a link "blend" into the link without having to use the vertical bar character above. This can make it easier to link some of the most commonly used words, like words that end in "s". Trailing apostrophes (and anything after said apostrophe) are not blended.
 
If you need to suppress blending, you can use a single <code><nowiki><nowiki /></nowiki></code> tag to disable it.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
John owned several [[car]]s, but still took [[taxi]]s and [[subway]]s to get to work.
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
John owned several [[car]]s, but still took [[taxi]]s and [[subway]]s to get to work.
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[Pleasantview]]'s public transport system is virtually non-existent. Everyone needs to get around in [[Sim-]]owned vehicles.
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[[Pleasantview]]'s public transport system is virtually non-existent. Everyone needs to get around in [[Sim-]]owned vehicles.
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[Pleasantview]]'s public transport system is virtually non-existent. Everyone needs to get around in [[Sim-]]<nowiki />owned vehicles.
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[[Pleasantview]]'s public transport system is virtually non-existent. Everyone needs to get around in [[Sim-]]<nowiki />owned vehicles.
|-
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|}
 
====Pipe trick====
The "pipe trick" is a quick and easy way to create a renamed link without going through the hassle of specifying another page name. To do this, simply add the vertical bar ({{!}}) character immediately after the link, within the square brackets. This will automatically create a link to the specified page without text in parenthesis, [[Help:Namespace|namespace]] prefixes, commas and text following commas, and some other elements.
 
The changes made by the pipe trick are applied when you click the '{{int:Savearticle}}' button and serves merely as an aid to editing. It doesn't work in [[Help:Edit summary|edit summaries]], [[Help:Cite|footnotes]], or section links.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
''[[The Sims 3 (console)|]]'' is the third iteration of console games in the series. It was released around the same time as ''[[The Sims 3: Late Night|]]''.
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
''[[The Sims 3 (console)|The Sims 3]]'' is the third iteration of console games in the series. It was released around the same time as ''[[The Sims 3: Late Night| Late Night]]''.
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[Pleasantview, Strangetown, and Melbourne|]].
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[[Pleasantview, Strangetown, and Melbourne|Pleasantview]].
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[The Sims Wiki:Be bold|]].
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[[The Sims Wiki:Be bold|Be bold]].
|-
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|}
 
===Interlanguage links===
{{Main|Help:Interlanguage links}}
Use the code <code><nowiki>[[</nowiki>''language code'':'''Foreign title''']]</code> at the bottom of the page to link to a page on another language wiki on {{SITENAME}} (if the two are connected). These links do not appear in the article, but instead appear in the sidebar under the menu section "Languages".
 
<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[de:Plankton]]
[[es:Plancton]]
[[fr:Plancton]]
[[ru:Планктон]]
</pre>
 
===Interwiki links===
{{Main|Help:Interwiki links}}
If set on [[Special:Interwiki]], you can link to many other sites without having to use external link syntax by using an interwiki link. This involves writing the link like any other internal link, but beginning the link with the interwiki prefix for the site.
 
====Linking to another Miraheze wiki====
The syntax is <code><nowiki>[[</nowiki>mh:''link prefix'':''name of page'']]</code>. The ''link prefix'' is the part of the URL that precedes the <code>.miraheze.org</code> part in the URL. For example, <code>meta</code> would be the link prefix for <code>meta.miraheze.org</code>.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[mh:meta:FAQ]]
[[mh:meta:FAQ|]]
[[mh:meta:FAQ|Meta Wiki's FAQ]]
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[[mh:meta:FAQ]]<br />
[[mh:meta:FAQ|meta:FAQ]]<br />
[[mh:meta:FAQ|Meta Wiki's FAQ]]
|}
 
====Linking to a Wikimedia wiki====
Virtually all Wikimedia sites are listed in the interwiki table and can be linked to using interwiki links.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[wikipedia:Train|Train]]
[[wiktionary:train|train]]
[[wikimediacommons:Category:Trains|Train pictures]]
[[wikisource:The Cask of Amontillado|The Cask of Amontillado by Edgar Allan Poe]]
[[wikiquote:Jimmy Wales|Quotes by Jimbo]]
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[[wikipedia:Train|Train]]<br />
[[wiktionary:train|train]]<br />
[[wikimediacommons:Category:Trains|Train pictures]]<br />
[[wikisource:The Cask of Amontillado|The Cask of Amontillado by Edgar Allan Poe]]<br />
[[wikiquote:Jimmy Wales|Quotes by Jimbo]]
|}
 
===Categories===
{{Main|Help:Category}}
To add a category, simply add <code><nowiki>[[</nowiki>Category:''Category name]]</code> to the article, preferably at the bottom of the page.
 
You can define a sort key for the category (which will affect how it's sorted on the category page) by writing the category link as a piped link.
 
To link to a category without adding it to the page, add a colon prefix to the link.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[[Category:Sims]]
[[Category:Sims by game|Game]]
[[:Category:Sims]]
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
 
 
[[:Category:Sims]]
|}
 
===External links===
Use a single square bracket (as opposed to double brackets) to indicate an external link. Spaces are used to separate URLs from displayed text, not vertical bars. URLs need to begin with a supported [[w:en:Uniform Resource Identifier|URI scheme]], such as <code>http://</code> and <code>https://</code>.
 
External links are also created when a bare URL is simply pasted into the text. Try to avoid doing this, since this is considered bad form.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
https://www.miraheze.org
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
https://www.miraheze.org
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[https://www.miraheze.org]
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[https://www.miraheze.org]
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
[https://www.miraheze.org Miraheze]
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
[https://www.miraheze.org Miraheze]
|}
 
URLs containing certain characters, such as spaces, will not link and display correctly unless those characters are properly encoded. If you use the link button [[File:OOjs UI icon link-ltr.svg]] to create external links, the links will be encoded for you; otherwise, you will need to encode them manually. Usually, simply copying the URL from your browser's address bar should get you the correct URL, as most modern browsers automatically encode URLs. You can also choose to use the <code><nowiki>{{urlencode:}}</nowiki></code> [[Help:Magic words|magic word]] to encode URLs.
 
You may also choose to encode these characters manually.
 
{| class="wikitable" style="margin-left: 5em"
! ''space'' !! " !! ' !! , !! ; !! < !! > !! ? !! [ !! ]
|-
| %20 || %22 || %27 || %2c || %3b || %3c || %3e || %3f || %5b || %5d
|}
 
===Redirects===
{{Main|Help:Redirect}}
You can redirect a page to another page by adding <code><nowiki>#REDIRECT [[</nowiki>''Target page name'']]</code> to the very first line of the page, with nothing else on the same line. When the edit is saved, the page will automatically redirect users that visit it.
 
You can redirect to a section of a page by adding <code><nowiki>#REDIRECT [[</nowiki>''Target page name''#''Target section]]</code>.
 
<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
#REDIRECT [[Africa]]
 
#REDIRECT [[Africa#Culture]]
</pre>
 
==Musical notation==
Use the <code><nowiki><score> ... </score></nowiki></code> syntax to add musical notes.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| <pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;"><score>\relative c' { fis d fis a d f e d c cis d e a g f ees }</score></pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
<score>\relative c' { fis d fis a d f e d c cis d e a g f ees }</score>
|-
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|}
 
==Files==
{{Main|Help:Files}}
You can add files, such as images and videos, to pages by using a similar syntax to regular links and categories. The file must have already been uploaded to the wiki first; you can check to see if it exists either by [[Help:Searching|searching]] for it, or by going through the [[Special:ListFiles|list of files]]. Files from the [[c:|Wikimedia Commons]] may also be used on this wiki. To use the file, link to the full name of the file as it appears on the wiki or on Wikimedia Commons.
 
{| class="wikitable"
!style="width:34%;"| Description
!style="width:33%;"| You type
!style="width:33%;"| You get
|-
|Using an image at its full size and resolution
|<pre>
[[File:Wikipedia-logo-v2-en.png]]
</pre>
|[[File:Wikipedia-logo-v2-en.png]]
|-
|Using an image in a "thumbnail" format. Basic markup for most images.
|<pre>
[[File:Wikipedia-logo-v2-en.png|thumb]]
</pre>
|[[File:Wikipedia-logo-v2-en.png|thumb]]
|-
|Using an image in a "thumbnail" format with a caption, resizing, and [[wikipedia:alt attribute|alt text]] for use by screen readers.
|<pre>
[[File:Wikipedia-logo-v2-en.png|thumb|250px|The Wikipedia logo|alt=The Wikipedia logo, which consists of a puzzle-piece globe with the words "Wikipedia: The Free Encyclopedia" underneath it.]]
</pre>
|[[File:Wikipedia-logo-v2-en.png|thumb|250px|The Wikipedia logo|alt=The Wikipedia logo, which consists of a puzzle-piece globe with the words "Wikipedia: The Free Encyclopedia" underneath it.]]
|-
|Using an image in a "thumbnail" format, left aligned instead of being right aligned.
|<pre>
[[File:Wikipedia-logo-v2-en.png|thumb|left]]
</pre>
|[[File:Wikipedia-logo-v2-en.png|thumb|left]]
|-
|Linking to an image or file description page without displaying it on the page
|<pre>
[[:File:Wikipedia-logo-v2-en.png]]
[[:File:LotusBud0048a.jpg|Lotus bud]]
</pre>
|
[[:File:Wikipedia-logo-v2-en.png]]<br />
[[:File:LotusBud0048a.jpg|Lotus bud]]
|-
|Linking to an image or file directly without displaying it on the page
|
<pre>
[[Media:Wikipedia-logo-v2-en.png]]
[[Media:LotusBud0048a.jpg|Lotus bud]]
</pre>
|
[[Media:Wikipedia-logo-v2-en.png]]<br />
[[Media:LotusBud0048a.jpg|Lotus bud]]
|}
 
==Templates==
{{Main|Help:Template|Help:Transclusion}}
A template is a page containing text or other forms of wiki markup that are meant to be copied onto other pages automatically. The act of automatically displaying the contents of a page on another page is called "transclusion". Template pages begin with '''Template:''' (note the colon) in their page titles, and are added onto pages by adding the name of the template, surrounded by curly brackets. For example, to transclude the contents of '''Template:Foo bar''' onto a page, edit the page you want to add the template to and add <code><nowiki>{{Foo bar}}</nowiki></code> to the page.
 
Many templates contain parameters which lets you customize how the template appears on the page. Parameters are called by using a vertical bar ({{!}}). If the parameter is unnamed, then you can simply specify the values for the parameter after the vertical bar. Otherwise, if the parameters are named, you must first specify the name of the parameter after the vertical bar, followed by an equal sign ({{=}}), and then the values for the parameter. For example,
 
You can usually find a description of a template's parameters on a template's documentation page, which is usually found when viewing a template page directly. For example, to view the documentation on how to use [[Template:FontColor]] correctly, simply visit that template's page and then scroll to the bottom. The template's documentation is usually contained in a box titled "Template documentation" and contains instructions on how to use the template.
 
{| class="wikitable"
!style="width:34%;"| Description
!style="width:33%;"| You type
!style="width:33%;"| You get
|-
|Transcluding a template, without any parameters
|<pre>
{{Transclusion demo}}
</pre>
|{{Transclusion demo}}
|-
|Transcluding a template using unnamed parameters (see [[Template:FontColor/doc]] for template documentation)
|<pre>
{{FontColor|blue|Text in blue!}}
</pre>
|{{FontColor|blue|Text in blue!}}
|-
|Transcluding a template using named parameters (see [[Template:Wayback/doc]] for template documentation)
|<pre>
{{Wayback |url = http://www.wikipedia.org/ |title = Wikipedia |date = 20010727112808 }}
</pre>
|{{Wayback |url = http://www.wikipedia.org/ |title = Wikipedia |date = 20010727112808 }}
|}
 
==Escaping wikitext==
In situations where you need to display the raw wiki markup codes on the page without rendering them, such as for demonstration purposes or when they conflict with a character you want to use on the page, you can "escape" them by using the following methods.
 
===Nowiki tags===
The <code><nowiki><nowiki></nowiki></nowiki></code> tags can be used to tell the wiki software not to convert wiki markup into HTML, instead displaying them in their raw form on the page. For example, <code><nowiki>'''Bold text'''</nowiki></code> would be rendered as <nowiki>'''Bold text'''</nowiki>, rather than as '''Bold text''' like it normally would. Anything placed between these tags will not have their wiki markup processed, and new lines and multiple spaces will be stripped. It will still interpret HTML character codes.
 
You can also use a single <code><nowiki><nowiki /></nowiki></code> to "break" certain interpretations. For example, placing <code><nowiki><nowiki /></nowiki></code> before a list entry (either <code>#</code> or <code>*</code>) will cause that entry to not be considered part of the list.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
!scope="col" style="width:50%;"| You get
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
<nowiki><nowiki>[[Example]]</nowiki></nowiki>
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<nowiki>[[Example]]</nowiki>
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
# Ordered list
<nowiki><nowiki /></nowiki># Ordered list
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
# Ordered list
<nowiki /># Ordered list
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
A [[micro-]]second.
 
A [[micro-]]<nowiki><nowiki /></nowiki>second.
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
A [[micro-]]second.
 
A [[micro-]]<nowiki />second.
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
'<nowiki><nowiki /></nowiki>'Italics' markup'<nowiki><nowiki /></nowiki>'
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
'<nowiki />'Italics' markup'<nowiki />'
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
a<nowiki><nowiki></nowiki>
 
b</nowiki>
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
a<nowiki>
 
b</nowiki>
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
<nowiki><nowiki></nowiki><!-- revealed --></nowiki>
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
<nowiki><!-- revealed --></nowiki>
|-
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;">
<nowiki><nowiki></nowiki>&amp;rarr;</nowiki>
</pre>
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|
<nowiki>&rarr;</nowiki>
|-
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|}
 
===Preformatted text block===
The <code><nowiki><pre></pre></nowiki></code> tag ignores wiki markup like the &lt;nowiki&gt; tag. It will also display the text in a monospace font, and does not reformat text and spaces. It will still interpret HTML character codes.
 
{| style="width:100%;"
!scope="col" style="width:50%;"| You type
Line 458 ⟶ 822:
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|{{#tag:pre|
<nowiki><pre></nowiki>
Wiki markup, like '''bold''', ''italics'', and [[link]]s are not followed, and spaces will not be reformatted. However, some HTML entities are kept, like &amp;amp;.<nowiki>
</pre></nowiki>|style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;"}}
|style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|<pre>Wiki markup, like '''bold''', ''italics'', and [[link]]s are not followed, and spaces will not be reformatted. However, some HTML entities are kept, like &amp;.</pre>
|-
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
|}
 
Preformatted text blocks do not wrap, so text may extend off-screen past the browser window. To resolve this, you can use CSS styling to add wrapping or a horizontal scrollbar.
 
* Wrapping: <code><nowiki><pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"></nowiki></code>
* Scrollbar: <code><nowiki><pre style="overflow:auto; width:auto;"></nowiki></code>
 
==Hidden text (comments)==
{{Main|Help:Hidden text}}
Hidden comments can be inserted into the text by surrounding them with <code><nowiki><!-- --></nowiki></code>. Any text entered between these tags will be visible when editing the page, but not when the page is rendered. For example:
 
<pre><nowiki><!-- An example of hidden comments
This won't be visible except in "edit" mode. --></nowiki></pre>
 
Comments can be used to leave notes for other editors, or to explain what bits of code does when editing complex [[Help:Template|templates]].
 
==See also==
* [[w:en:Help:Wikitext|Help:Wikitext]] on the English Wikipedia
* [[mw:Help:Formatting|Help:Formatting]] on MediaWiki.org
{{Seo
|keywords = sims, the sims, the sims wiki, wiki, mediawiki, wikipedia, miraheze, wikitext
|description = Wikitext, also known as wiki markup, refers to the syntax, keywords, and punctuation marks used by The Sims Wiki to format a page. It is meant to be a simpler alternative to HTML. You will see wikitext if you click on 'Edit source' to edit a page. If you use the new VisualEditor, you will not need to learn wikitext before editing.
}}