Help:Formatting: Difference between revisions

From MediaWiki-1.39
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
{{PD Help Page}}
{{PD Help Page}}
{{see also|Help:Advanced editing}}
{{see also|Help:Advanced editing}}
<translate>
 
<!--T:1-->
You can format your text by using wiki markup. This consists of normal characters like asterisks, apostrophes, or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in ''italic'', you include it in two pairs of apostrophes like <code><nowiki>''this''</nowiki></code>.
You can format your text by using wiki markup. This consists of normal characters like asterisks, apostrophes, or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in ''italic'', you include it in two pairs of apostrophes like <code><nowiki>''this''</nowiki></code>.


{| class="wikitable"
{| class="wikitable"
! Description
! Description
! style="width: 40%;" | You type
! style="width:40%;" | You type
! style="width: 40%;" | You get
! style="width:40%;" | You get
|-
|-
! colspan="3" style="color:#202122; background:#b6d4fb;" |
! colspan="3" style="color:#202122; background:#b6d4fb;" |
Line 34: Line 33:
|-
|-
| Section Headings of different levels
| Section Headings of different levels
| {{anchor|headings}}<pre><nowiki>
| <pre><nowiki>
== Level 2 ==
== Level 2 ==
=== Level 3 ===
=== Level 3 ===
Line 96: Line 95:
|-
|-
| Numbered list
| Numbered list
| {{anchor|numbered-list}}<pre><nowiki>
| <pre><nowiki>
# Start each line
# Start each line
# with a number sign (#).
# with a number sign (#).
Line 213: Line 212:
<!-- OPTIONAL: SIMPLE client‑side syntax checker ------------------------------------------------------->
<!-- OPTIONAL: SIMPLE client‑side syntax checker ------------------------------------------------------->
<script>
<script>
/* Tiny MediaWiki markup validator – runs entirely in the browser.
/* Tiny MediaWiki markup validator – runs entirely in the browser.
    It checks:
  It checks:
      • balanced italics (''…'')
    • balanced italics (''…'')
      • balanced bold ('''…''')
    • balanced bold ('''…''')
      • proper heading delimiters (=…=)
    • proper heading delimiters (=…=)
    Add more checks if you wish. */
  Add more checks if you wish. */
(function(){
(function(){
     var container = document.createElement('div');
     var container = document.createElement('div');
Line 226: Line 225:
         <textarea id="mw‑checker‑src"
         <textarea id="mw‑checker‑src"
                   rows="6"
                   rows="6"
                   style="width:100font-family:monospace;"
                   style="width:100%;font-family:monospace;"
                   placeholder="Paste your wikitext here…"></textarea>
                   placeholder="Paste your wikitext here…"></textarea>
         <
         <br><button id="mw‑checker‑run">Check syntax</button>
        <pre id="mw‑checker‑out"
            style="background:#f8f8f8;padding:0.5em;margin-top:0.5em;display:none;"></pre>
    `;
    document.querySelector('table.wikitable').parentNode.appendChild(container);


== Paragraphs == <!--T:78-->
    function count(str, pat){ return (str.match(pat)||[]).length; }
</translate>
{{anchor|&lt;br&gt;|.3Cbr.3E}}
<translate>
<!--T:79-->
MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag <tvar name=1>{{tag|br|single}}</tvar>.


== HTML tags == <!--T:80-->
    document.getElementById('mw‑checker‑run').addEventListener('click',function(){
</translate>
        var src = document.getElementById('mw‑checker‑src').value;
{{anchor|&lt;div&gt;|.3Cdiv.3E|&lt;span&gt;|.3Cspan.3E}}
        var msgs = [];
<translate>
<!--T:81-->
Some [[w:HTML|HTML]] tags are allowed in MediaWiki, for example <tvar name=1>{{tag|code|open}}</tvar>, [[w:Div and span|<tvar name=2>{{tag|div|open}}</tvar>, and <tvar name=3>{{tag|span|open}}</tvar>]]. These apply anywhere you insert them.
</translate>
{| class="wikitable"
! <translate><!--T:82--> Description</translate>
! style="width: 40%;" | <translate><!--T:83--> You type</translate>
! style="width: 40%;" | <translate><!--T:84--> You get</translate>
{{Table-AnchorRow|colspan=3|&lt;ins&gt;|.3Cins.3E|&lt;u&gt;|.3Cu.3E}}
|-
| <translate><!--T:85--> Inserted <br>(Displays as underline in most browsers)</translate>
| <syntaxhighlight lang=html>
<ins><translate nowrap><!--T:86--> Inserted</translate></ins>


<translate nowrap><!--T:87--> or</translate>
        var ital = count(src, /''/g);
 
        if (ital % 2) msgs.push('⚠️ Unbalanced italics (\'\' '+ital+' occurrences)');
<u><translate nowrap><!--T:88--> Underline</translate></u>
</syntaxhighlight>
|
<ins><translate><!--T:89--> Inserted</translate></ins>
 
<translate><!--T:90--> or</translate>
 
<u><translate><!--T:91--> Underline</translate></u>
{{Table-AnchorRow|colspan=3|&lt;del&gt;|.3Cdel.3E|&lt;s&gt;|.3Cs.3E}}
|-
| <translate><!--T:92--> Deleted <br>(Displays as strike-through in most browsers)</translate>
| <syntaxhighlight lang=html>
<s><translate nowrap><!--T:93--> Strike-through</translate></s>
 
<translate nowrap><!--T:94--> or</translate>
 
<del><translate nowrap><!--T:95--> Deleted</translate></del>
 
</syntaxhighlight>
|
<s><translate><!--T:96--> Strike-through</translate></s>
 
<translate><!--T:97--> or</translate>
 
<del><translate><!--T:98--> Deleted</translate></del>
{{Table-AnchorRow|colspan=3|&lt;code&gt;|.3Ccode.3E}}
|-
| <translate><!--T:99--> Fixed width text</translate>
| <syntaxhighlight lang=html><code><translate nowrap><!--T:100--> Source code</translate></code></syntaxhighlight>
| <code><translate><!--T:154--> Source code</translate></code>
{{Table-AnchorRow|colspan=3|&lt;blockquote&gt;|.3Cblockquote.3E}}
|-
| <translate><!--T:104--> Blockquotes</translate>
| <syntaxhighlight lang=html>
<translate nowrap><!--T:105--> Text before</translate>
<blockquote><translate nowrap><!--T:106--> Blockquote</translate></blockquote>
<translate nowrap><!--T:107--> Text after</translate>
</syntaxhighlight>
{{Note|1=<translate><!--T:185--> If the quote contains multiple paragraphs the tags need to be on separate lines to display properly, i.e.:</translate>
<syntaxhighlight lang=html>
<blockquote>
<translate nowrap><!--T:186--> First paragraph.</translate>
 
<translate nowrap><!--T:187--> Second paragraph.</translate>
</blockquote>
</syntaxhighlight>
{{Tracked|T309778|float=none}}
}}
|
<translate><!--T:108--> Text before</translate>
<blockquote><translate><!--T:109--> Blockquote</translate></blockquote>
<translate><!--T:110--> Text after</translate>
{{Table-AnchorRow|colspan=3|&lt;q&gt;|.3Cq.3E}}
|-
| <translate><!--T:167--> Quotes</translate>
| <syntaxhighlight lang=html><q><translate nowrap><!--T:168--> This is a quotation</translate></q></syntaxhighlight>
{{Note|1=<translate><!--T:174--> The q element '''must not''' be used in place of quotation marks that do not represent quotes; for example, it is inappropriate to use the q element for marking up sarcastic statements.<ref>[<tvar name=url>https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element</tvar> HTML Living Standard—The <tvar name=q>&lt;'''q'''&gt;</tvar> element]</ref></translate>}}
| <q><translate><!--T:169--> This is a quotation</translate></q>
|-
| <translate><!--T:111--> Comment</translate>
| <syntaxhighlight lang=html>
<translate nowrap>
<!--T:112-->
<!-- This is a comment -->
Comments are visible only
in the edit zone.
</translate>
</syntaxhighlight>
|
<translate>
<!--T:113-->
<!-- This is a comment -->
Comments are visible only
in the edit zone.
</translate>
{{Table-AnchorRow|colspan=3|&lt;pre&gt;|.3Cpre.3E}}
|-
| <translate><!--T:114--> Completely preformatted text</translate>
| <syntaxhighlight lang="html">
<pre>
<translate nowrap>
<!--T:115-->
Text is '''preformatted''' and
''markups'' '''''cannot''''' be done
</translate>
</pre>
</syntaxhighlight>
----
{{note|1=<translate><!--T:116--> For marking up of preformatted text, check the "Preformatted text" entry at the end of the previous table.</translate>}}
|
<pre>
<translate nowrap>
<!--T:117-->
Text is '''preformatted''' and
''markups'' '''''cannot''''' be done
</translate>
</pre>
|-
| <translate><!--T:118--> '''Customized''' preformatted text</translate>
| <syntaxhighlight lang="html">
<pre style="color: red">
<translate nowrap>
<!--T:119-->
Text is '''preformatted'''
with a style and
''markups'' '''''cannot''''' be done
</translate>
</pre>
</syntaxhighlight>
----
{{note|1=<translate><!--T:120--> A CSS style can be named within the <code>style</code> attribute.</translate>}}
|
<pre style="color: red">
<translate nowrap>
<!--T:121-->
Text is '''preformatted'''
with a style and
''markups'' '''''cannot''''' be done
</translate>
</pre>
|}
<translate>
<!--T:122-->
continued:</translate>
{| class="wikitable" | style="table-layout: fixed; width: 100%"
! <translate><!--T:123--> Description</translate>
! style="width: 40%;" | <translate><!--T:124--> You type</translate>
! style="width: 40%;" | <translate><!--T:125--> You get</translate>
|-
| <translate><!--T:159--> '''Default''' preformatted text has a CSS attribute (<code>white-space: pre-wrap;</code>) to wrap the text according to available width</translate>
| <syntaxhighlight lang=html>
<pre>
<translate nowrap><!--T:127--> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate>
</pre>
</syntaxhighlight>
|
<pre>
<translate nowrap><!--T:128--> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate>
</pre>
|-
| <translate><!--T:126--> '''Customized''' preformatted text with '''disabled''' text wrapping</translate>
| <syntaxhighlight lang=html>
<pre style="white-space: pre;">
<translate nowrap><!--T:130--> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate>
</pre>
</syntaxhighlight>
|
<pre style="white-space: pre;">
<translate nowrap><!--T:131--> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate>
</pre>
|}
 
<translate>
<!--T:188-->
The full list of recognized tags is given on <tvar name=1>{{ll|Help:HTML in wikitext}}</tvar>.
 
== Inserting symbols == <!--T:132-->
 
<!--T:133-->
Symbols and other special characters not available on your keyboard can be inserted in a multitude of ways. [<tvar name=url>http://www.howtogeek.com/210824/how-to-quickly-type-special-characters-on-any-computer-smartphone-or-tablet/</tvar> Many operating systems and browsers allow to insert special characters] through a menu option or operating system panel. Additionally, you can use the WikiEditor or [[<tvar name=2>Special:MyLanguage/VisualEditor/Special characters</tvar>|VisualEditor]] to insert them into the edit screen.
</translate>
 
<translate><!--T:166--> As a last resort, you can use a special sequence of characters.</translate>
<translate><!--T:189--> Those sequences are called [<tvar name=url>https://developer.mozilla.org/docs/Glossary/Character_reference</tvar> HTML character references].</translate>
<translate><!--T:190--> For example:</translate>
 
* <translate><!--T:191--> the rightwards [[w:Arrow (symbol)|arrow symbol]] (<tvar name=1><code>&rarr;</code></tvar>) can be displayed using the <tvar name=2><code>&amp;rarr;</code></tvar> sequence</translate>
* <translate><!--T:192--> an [[w:Dash#Em dash|em dash]] (<tvar name=1><code>&mdash;</code></tvar>) can be displayed using <tvar name=2><code>&amp;mdash;</code></tvar>.</translate>
----
{{note|1=<translate><!--T:134--> Hover over any symbol to reveal the entity that produces it.  Some symbols not available in the current font will appear as empty squares.</translate>}}
 
{| class="wikitable" style="width:100%; text-align:center; font-weight:bold;"
|+ <translate><!--T:178--> HTML symbol entities</translate>
|-
| <span title="&amp;Aacute;">&Aacute;</span>
| <span title="&amp;aacute;">&aacute;</span>
| <span title="&amp;Acirc;">&Acirc;</span>
| <span title="&amp;acirc;">&acirc;</span>
| <span title="&amp;acute;">&acute;</span>
| <span title="&amp;AElig;">&AElig;</span>
| <span title="&amp;aelig;">&aelig;</span>
| <span title="&amp;Agrave;">&Agrave;</span>
| <span title="&amp;agrave;">&agrave;</span>
| <span title="&amp;alefsym;">&alefsym;</span>
| <span title="&amp;Alpha;">&Alpha;</span>
| <span title="&amp;alpha;">&alpha;</span>
| <span title="&amp;amp;">&amp;</span>
| <span title="&amp;and;">&and;</span>
| <span title="&amp;ang;">&ang;</span>
| <span title="&amp;Aring;">&Aring;</span>
| <span title="&amp;aring;">&aring;</span>
| <span title="&amp;asymp;">&asymp;</span>
| <span title="&amp;Atilde;">&Atilde;</span>
| <span title="&amp;atilde;">&atilde;</span>
| <span title="&amp;Auml;">&Auml;</span>
| <span title="&amp;auml;">&auml;</span>
| <span title="&amp;bdquo;">&bdquo;</span>
| <span title="&amp;Beta;">&Beta;</span>
| <span title="&amp;beta;">&beta;</span>
| <span title="&amp;brvbar;">&brvbar;</span>
| <span title="&amp;bull;">&bull;</span>
| <span title="&amp;cap;">&cap;</span>
| <span title="&amp;Ccedil;">&Ccedil;</span>
| <span title="&amp;ccedil;">&ccedil;</span>
| <span title="&amp;cedil;">&cedil;</span>
| <span title="&amp;cent;">&cent;</span>
|-
| <span title="&amp;Chi;">&Chi;</span>
| <span title="&amp;chi;">&chi;</span>
| <span title="&amp;circ;">&circ;</span>
| <span title="&amp;clubs;">&clubs;</span>
| <span title="&amp;cong;">&cong;</span>
| <span title="&amp;copy;">&copy;</span>
| <span title="&amp;crarr;">&crarr;</span>
| <span title="&amp;cup;">&cup;</span>
| <span title="&amp;curren;">&curren;</span>
| <span title="&amp;dagger;">&dagger;</span>
| <span title="&amp;Dagger;">&Dagger;</span>
| <span title="&amp;darr;">&darr;</span>
| <span title="&amp;dArr;">&dArr;</span>
| <span title="&amp;deg;">&deg;</span>
| <span title="&amp;Delta;">&Delta;</span>
| <span title="&amp;delta;">&delta;</span>
| <span title="&amp;diams;">&diams;</span>
| <span title="&amp;divide;">&divide;</span>
| <span title="&amp;Eacute;">&Eacute;</span>
| <span title="&amp;eacute;">&eacute;</span>
| <span title="&amp;Ecirc;">&Ecirc;</span>
| <span title="&amp;ecirc;">&ecirc;</span>
| <span title="&amp;Egrave;">&Egrave;</span>
| <span title="&amp;egrave;">&egrave;</span>
| <span title="&amp;empty;">&empty;</span>
| <span title="&amp;emsp;">&emsp;</span>
| <span title="&amp;ensp;">&ensp;</span>
| <span title="&amp;Epsilon;">&Epsilon;</span>
| <span title="&amp;epsilon;">&epsilon;</span>
| <span title="&amp;equiv;">&equiv;</span>
| <span title="&amp;Eta;">&Eta;</span>
| <span title="&amp;eta;">&eta;</span>
|-
| <span title="&amp;ETH;">&ETH;</span>
| <span title="&amp;eth;">&eth;</span>
| <span title="&amp;Euml;">&Euml;</span>
| <span title="&amp;euml;">&euml;</span>
| <span title="&amp;euro;">&euro;</span>
| <span title="&amp;exist;">&exist;</span>
| <span title="&amp;fnof;">&fnof;</span>
| <span title="&amp;forall;">&forall;</span>
| <span title="&amp;frac12;">&frac12;</span>
| <span title="&amp;frac14;">&frac14;</span>
| <span title="&amp;frac34;">&frac34;</span>
| <span title="&amp;frasl;">&frasl;</span>
| <span title="&amp;Gamma;">&Gamma;</span>
| <span title="&amp;gamma;">&gamma;</span>
| <span title="&amp;ge;">&ge;</span>
| <span title="&amp;gt;">&gt;</span>
| <span title="&amp;harr;">&harr;</span>
| <span title="&amp;hArr;">&hArr;</span>
| <span title="&amp;hearts;">&hearts;</span>
| <span title="&amp;hellip;">&hellip;</span>
| <span title="&amp;Iacute;">&Iacute;</span>
| <span title="&amp;iacute;">&iacute;</span>
| <span title="&amp;Icirc;">&Icirc;</span>
| <span title="&amp;icirc;">&icirc;</span>
| <span title="&amp;iexcl;">&iexcl;</span>
| <span title="&amp;Igrave;">&Igrave;</span>
| <span title="&amp;igrave;">&igrave;</span>
| <span title="&amp;image;">&image;</span>
| <span title="&amp;infin;">&infin;</span>
| <span title="&amp;int;">&int;</span>
| <span title="&amp;Iota;">&Iota;</span>
| <span title="&amp;iota;">&iota;</span>
|-
| <span title="&amp;iquest;">&iquest;</span>
| <span title="&amp;isin;">&isin;</span>
| <span title="&amp;Iuml;">&Iuml;</span>
| <span title="&amp;iuml;">&iuml;</span>
| <span title="&amp;Kappa;">&Kappa;</span>
| <span title="&amp;kappa;">&kappa;</span>
| <span title="&amp;Lambda;">&Lambda;</span>
| <span title="&amp;lambda;">&lambda;</span>
| <span title="&amp;lang;">&lang;</span>
| <span title="&amp;laquo;">&laquo;</span>
| <span title="&amp;larr;">&larr;</span>
| <span title="&amp;lArr;">&lArr;</span>
| <span title="&amp;lceil;">&lceil;</span>
| <span title="&amp;ldquo;">&ldquo;</span>
| <span title="&amp;le;">&le;</span>
| <span title="&amp;lfloor;">&lfloor;</span>
| <span title="&amp;lowast;">&lowast;</span>
| <span title="&amp;loz;">&loz;</span>
| <span title="&amp;lrm;">&lrm;</span>
| <span title="&amp;lsaquo;">&lsaquo;</span>
| <span title="&amp;lsquo;">&lsquo;</span>
| <span title="&amp;lt;">&lt;</span>
| <span title="&amp;macr;">&macr;</span>
| <span title="&amp;mdash;">&mdash;</span>
| <span title="&amp;micro;">&micro;</span>
| <span title="&amp;middot;">&middot;</span>
| <span title="&amp;minus;">&minus;</span>
| <span title="&amp;Mu;">&Mu;</span>
| <span title="&amp;mu;">&mu;</span>
| <span title="&amp;nabla;">&nabla;</span>
| <span title="&amp;nbsp;">&nbsp;</span>
| <span title="&amp;ndash;">&ndash;</span>
|-
| <span title="&amp;ne;">&ne;</span>
| <span title="&amp;ni;">&ni;</span>
| <span title="&amp;not;">&not;</span>
| <span title="&amp;notin;">&notin;</span>
| <span title="&amp;nsub;">&nsub;</span>
| <span title="&amp;Ntilde;">&Ntilde;</span>
| <span title="&amp;ntilde;">&ntilde;</span>
| <span title="&amp;Nu;">&Nu;</span>
| <span title="&amp;nu;">&nu;</span>
| <span title="&amp;Oacute;">&Oacute;</span>
| <span title="&amp;oacute;">&oacute;</span>
| <span title="&amp;Ocirc;">&Ocirc;</span>
| <span title="&amp;ocirc;">&ocirc;</span>
| <span title="&amp;OElig;">&OElig;</span>
| <span title="&amp;oelig;">&oelig;</span>
| <span title="&amp;Ograve;">&Ograve;</span>
| <span title="&amp;ograve;">&ograve;</span>
| <span title="&amp;oline;">&oline;</span>
| <span title="&amp;Omega;">&Omega;</span>
| <span title="&amp;omega;">&omega;</span>
| <span title="&amp;Omicron;">&Omicron;</span>
| <span title="&amp;omicron;">&omicron;</span>
| <span title="&amp;oplus;">&oplus;</span>
| <span title="&amp;or;">&or;</span>
| <span title="&amp;ordf;">&ordf;</span>
| <span title="&amp;ordm;">&ordm;</span>
| <span title="&amp;Oslash;">&Oslash;</span>
| <span title="&amp;oslash;">&oslash;</span>
| <span title="&amp;Otilde;">&Otilde;</span>
| <span title="&amp;otilde;">&otilde;</span>
| <span title="&amp;otimes;">&otimes;</span>
| <span title="&amp;Ouml;">&Ouml;</span>
|-
| <span title="&amp;ouml;">&ouml;</span>
| <span title="&amp;para;">&para;</span>
| <span title="&amp;part;">&part;</span>
| <span title="&amp;permil;">&permil;</span>
| <span title="&amp;perp;">&perp;</span>
| <span title="&amp;Phi;">&Phi;</span>
| <span title="&amp;phi;">&phi;</span>
| <span title="&amp;Pi;">&Pi;</span>
| <span title="&amp;pi;">&pi;</span>
| <span title="&amp;piv;">&piv;</span>
| <span title="&amp;plusmn;">&plusmn;</span>
| <span title="&amp;pound;">&pound;</span>
| <span title="&amp;prime;">&prime;</span>
| <span title="&amp;Prime;">&Prime;</span>
| <span title="&amp;prod;">&prod;</span>
| <span title="&amp;prop;">&prop;</span>
| <span title="&amp;Psi;">&Psi;</span>
| <span title="&amp;psi;">&psi;</span>
| <span title="&amp;quot;">&quot;</span>
| <span title="&amp;radic;">&radic;</span>
| <span title="&amp;rang;">&rang;</span>
| <span title="&amp;raquo;">&raquo;</span>
| <span title="&amp;rarr;">&rarr;</span>
| <span title="&amp;rArr;">&rArr;</span>
| <span title="&amp;rceil;">&rceil;</span>
| <span title="&amp;rdquo;">&rdquo;</span>
| <span title="&amp;real;">&real;</span>
| <span title="&amp;reg;">&reg;</span>
| <span title="&amp;rfloor;">&rfloor;</span>
| <span title="&amp;Rho;">&Rho;</span>
| <span title="&amp;rho;">&rho;</span>
| <span title="&amp;rlm;">&rlm;</span>
|-
| <span title="&amp;rsaquo;">&rsaquo;</span>
| <span title="&amp;rsquo;">&rsquo;</span>
| <span title="&amp;sbquo;">&sbquo;</span>
| <span title="&amp;Scaron;">&Scaron;</span>
| <span title="&amp;scaron;">&scaron;</span>
| <span title="&amp;sdot;">&sdot;</span>
| <span title="&amp;sect;">&sect;</span>
| <span title="&amp;shy;">&shy;</span>
| <span title="&amp;Sigma;">&Sigma;</span>
| <span title="&amp;sigma;">&sigma;</span>
| <span title="&amp;sigmaf;">&sigmaf;</span>
| <span title="&amp;sim;">&sim;</span>
| <span title="&amp;spades;">&spades;</span>
| <span title="&amp;sub;">&sub;</span>
| <span title="&amp;sube;">&sube;</span>
| <span title="&amp;sum;">&sum;</span>
| <span title="&amp;sup;">&sup;</span>
| <span title="&amp;sup1;">&sup1;</span>
| <span title="&amp;sup2;">&sup2;</span>
| <span title="&amp;sup3;">&sup3;</span>
| <span title="&amp;supe;">&supe;</span>
| <span title="&amp;szlig;">&szlig;</span>
| <span title="&amp;Tau;">&Tau;</span>
| <span title="&amp;tau;">&tau;</span>
| <span title="&amp;there4;">&there4;</span>
| <span title="&amp;Theta;">&Theta;</span>
| <span title="&amp;theta;">&theta;</span>
| <span title="&amp;thetasym;">&thetasym;</span>
| <span title="&amp;thinsp;">&thinsp;</span>
| <span title="&amp;THORN;">&THORN;</span>
| <span title="&amp;thorn;">&thorn;</span>
| <span title="&amp;tilde;">&tilde;</span>
|-
| <span title="&amp;times;">&times;</span>
| <span title="&amp;trade;">&trade;</span>
| <span title="&amp;Uacute;">&Uacute;</span>
| <span title="&amp;uacute;">&uacute;</span>
| <span title="&amp;uarr;">&uarr;</span>
| <span title="&amp;uArr;">&uArr;</span>
| <span title="&amp;Ucirc;">&Ucirc;</span>
| <span title="&amp;ucirc;">&ucirc;</span>
| <span title="&amp;Ugrave;">&Ugrave;</span>
| <span title="&amp;ugrave;">&ugrave;</span>
| <span title="&amp;uml;">&uml;</span>
| <span title="&amp;upsih;">&upsih;</span>
| <span title="&amp;Upsilon;">&Upsilon;</span>
| <span title="&amp;upsilon;">&upsilon;</span>
| <span title="&amp;Uuml;">&Uuml;</span>
| <span title="&amp;uuml;">&uuml;</span>
| <span title="&amp;weierp;">&weierp;</span>
| <span title="&amp;Xi;">&Xi;</span>
| <span title="&amp;xi;">&xi;</span>
| <span title="&amp;Yacute;">&Yacute;</span>
| <span title="&amp;yacute;">&yacute;</span>
| <span title="&amp;yen;">&yen;</span>
| <span title="&amp;yuml;">&yuml;</span>
| <span title="&amp;Yuml;">&Yuml;</span>
| <span title="&amp;Zeta;">&Zeta;</span>
| <span title="&amp;zeta;">&zeta;</span>
| <span title="&amp;zwj;">&zwj;</span>
| <span title="&amp;zwnj;">&zwnj;</span>
|}
 
{| class="wikitable"
! <translate><!--T:135--> Description</translate>
! style="width: 40%;" | <translate><!--T:136--> You type</translate>
! style="width: 40%;" | <translate><!--T:137--> You get</translate>
|-
| <translate><!--T:138--> Copyright symbol</translate>
|class=mw-code| &amp;copy;
|
:::'''&copy;'''
|-
| <translate><!--T:139--> Greek delta letter symbol</translate>
|class=mw-code|&amp;delta;
|
:::'''&delta;'''
|-
| <translate><!--T:140--> Euro currency symbol</translate>
|class=mw-code|&amp;euro;
|
:::'''&euro;'''
|}
<translate>
<!--T:141-->
See the list of all HTML entities on the Wikipedia article [[w:List of HTML entities|List of HTML entities]]. Additionally, MediaWiki supports two non-standard entity reference sequences: <code>&amp;רלמ;</code> and <code>&amp;رلم;</code> which are both considered equivalent to <code>&amp;rlm;</code> which is a [[w:Right-to-left mark|right-to-left mark]]. (Used when combining right to left languages with left to right languages in the same page.)


== HTML tags and symbol entities displayed themselves (with and without interpreting them) == <!--T:142-->
        var bold = count(src, /'''/g);
</translate>
        if (bold % 2) msgs.push('⚠️ Unbalanced bold (\'\'\' '+bold+' occurrences)');
:<syntaxhighlight lang=html inline>&amp;euro;</syntaxhighlight> &nbsp;&rarr; '''&amp;euro;'''


:<syntaxhighlight lang=html inline><span style="color: red; text-decoration: line-through;"><translate nowrap><!--T:143--> Typo to be corrected</translate></span></syntaxhighlight> <!--
        src.split('\n').forEach(function(l){
-->&nbsp;&rarr; '''<span style="color: red; text-decoration: line-through;"><translate><!--T:144--> Typo to be corrected</translate></span>'''
            if (/^=+/.test(l)){
                var lead = l.match(/^=+/)[0].length;
                var trail = (l.match(/=+$/)||[''])[0].length;
                if (lead!==trail) msgs.push('⚠️ Bad heading line: "'+l+'" – start and end “=” count differ');
            }
        });


:<syntaxhighlight lang=html inline>&lt;span style="color: red; text-decoration: line-through;"><translate nowrap><!--T:156--> Typo to be corrected</translate></span></syntaxhighlight> <!--
        var out = document.getElementById('mw‑checker‑out');
-->&nbsp;&rarr; '''&lt;span style="color: red; text-decoration: line-through;"><translate><!--T:145--> Typo to be corrected</translate>&lt;/span>'''
        out.textContent = msgs.length ? msgs.join('\n') : '✅ No obvious syntax problems!';
        out.style.display = 'block';
    });
})();
</script>


<translate>
<!--
=== Nowiki for HTML === <!--T:146-->
NOTE TO FUTURE EDITORS
</translate>
{{tag|nowiki|s}} <translate><!--T:147--> can prohibit (HTML) tags:</translate>
* <nowiki><<</nowiki>nowiki/>pre> &nbsp;&rarr; <<nowiki/>pre>
<translate><!--T:148--> But ''not'' &amp; symbol escapes:</translate>
* &<<nowiki/>nowiki/>amp; &nbsp;&rarr; &<nowiki/>amp;
<translate>
<!--T:149-->
To print &amp; symbol escapes as text, use "<tvar name=1><syntaxhighlight inline lang="html">&amp;</syntaxhighlight></tvar>" to replace the "&" character (eg. type "<tvar name=2><syntaxhighlight inline lang="html">&amp;nbsp;</syntaxhighlight></tvar>", which results in "<tvar name=3><syntaxhighlight inline lang="html">&nbsp;</syntaxhighlight></tvar>").


== Other formatting == <!--T:150-->
* All `<translate>` tags and the hidden `<!--T:-->` comments have been removed – they were only needed for the Translate extension, which is not installed on this wiki.
* `{{anchor|…}}` calls have been deleted because the surrounding headings already generate the necessary HTML‑id anchors. 
  If you ever need an extra “in‑page” anchor that is **not** a heading, insert a tiny span, e.g.:


<!--T:151-->
      <span id="my‑anchor" style="display:none;"></span>
Beyond the text formatting markup shown hereinbefore, here are some other formatting references:
</translate>


* {{ll|Help:Links}}
  and link to it with `[[#my‑anchor|link text]]`.
* {{ll|Help:Lists}}
* {{ll|Help:Images}}
<translate>
<!--T:173-->
* LanguageConverter markup – see <tvar name=1>{{ll|Writing systems/Syntax}}</tvar></translate>
<translate>
<!--T:158-->
* References – see <tvar name=1>{{ll|Extension:Cite}}</tvar>
* [[<tvar name=tables>Special:MyLanguage/Help:Tables</tvar>|Tables]]
</translate>
* {{ll|Manual:Collapsible_elements}}


<translate>
* The table uses `<pre><nowiki></nowiki></pre>` to show markup literally. 
<!--T:153-->
  This works on a vanilla MediaWiki installation – no extensions required.
You can find more references at <tvar name=1>{{ll|Help:Contents}}</tvar>.


== References == <!--T:175-->
* The optional JavaScript block at the bottom provides a very small client‑side “syntax checker”. It is harmless if JavaScript is disabled and can be removed if you prefer a strictly static page.
</translate>
<references/>


[[Category:Help{{#translation:}}|Formatting]]
Happy editing!
-->

Revision as of 12:50, 15 January 2026

<languages/> Template:PD Help Page Template:See also

You can format your text by using wiki markup. This consists of normal characters like asterisks, apostrophes, or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in italic, you include it in two pairs of apostrophes like ''this''.

Description You type You get

Template:Anchor Character (inline) formatting – applies anywhere

Italic text
''italic''
italic
Bold text
'''bold'''
bold
Bold and italic
'''''bold & italic'''''
bold & italic
Escape wiki markup
<nowiki>no [[wiki]] ''markup''</nowiki>
no [[wiki]] ''markup''

Template:Anchor Section formatting – only at the beginning of the line

Section Headings of different levels
== Level 2 ==
=== Level 3 ===
==== Level 4 ====
===== Level 5 =====
====== Level 6 ======
(renders as normal headings)
Horizontal rule
Text before
----
Text after
Text before

Text after

Bullet list
* Start each line
* with an asterisk (*).
** More asterisks give deeper
*** and deeper levels.
* Line breaks <br>don't break levels.
*** But jumping levels creates empty space.
Any other start ends the list.
* combine bullet list
** with definition 
::- definition
** creates empty space
* combine bullet list
** with definition 
*:- definition
** without empty spaces
*bullet list
:- definition
:* sublist that doesn't create empty
:* spaces after definition
* Start each line * with an asterisk (*). ** More asterisks give deeper *** and deeper levels. * Line breaks <br>don't break levels. *** But jumping levels creates empty space. Any other start ends the list. * combine bullet list ** with definition ::- definition ** creates empty space * combine bullet list ** with definition *:- definition ** without empty spaces *bullet list :- definition :* sublist that doesn't create empty :* spaces after definition
Numbered list
# Start each line
# with a number sign (#).
## More number signs give deeper
### and deeper
### levels.
# Line breaks <br>don't break levels.
### But jumping levels creates empty space.
# Blank lines
# end the list and start another.
Any other start also ends the list.
<nowiki># use “nowiki” tags to display a literal “#” at the beginning of a line without interpreting it as a numbered list.
</nowiki>
# Start each line # with a number sign (#). ## More number signs give deeper ### and deeper ### levels. # Line breaks <br>don't break levels. ### But jumping levels creates empty space. # Blank lines # end the list and start another. Any other start also ends the list. <nowiki># use “nowiki” tags to display a literal “#” at the beginning of a line without interpreting it as a numbered list.</nowiki>
Description list
;item 1
: definition 1
;item 2
: definition 2‑1
: definition 2‑2
;item 1
definition 1
item 2
definition 2‑1
definition 2‑2
Description details without description terms
: Description details
:: Nested description details
::::: Deeply nested description details
: Description details
Nested description details
Deeply nested description details
Mixture of different types of list
# one
# two
#* two point one
#* two point two
# three
#; three item one
#: three def one
# four
#: four def one
#: this looks like a continuation
#: and is often used
#: instead <br> of <nowiki><br>
# five
## five sub 1
### five sub 1 sub 1
## five sub 2
</nowiki>
# one
  1. two
    • two point one
    • two point two
  2. three
    three item one
    three def one
  3. four
    four def one
    this looks like a continuation
    and is often used
    instead
    of <br>
  4. five
    1. five sub 1
      1. five sub 1 sub 1
    2. five sub 2
Preformatted text
 Start each line with a space.
 Text is '''preformatted''' and
 ''markups'' '''''can''''' be done.
Start each line with a space.
Text is preformatted and
markups can be done.
Preformatted text blocks
<nowiki>
Start with a space in the first column,
(before the <nowiki> tag).
Then your block format will be
    maintained.
This is good for copying in code blocks:
def function():
    """ documentation string """
    if True:
        print(True)
    else:
        print(False)

</nowiki>
(rendered as a monospaced block – same as the source above)

<script> /* Tiny MediaWiki markup validator – runs entirely in the browser.

  It checks:
    • balanced italics ()
    • balanced bold ()
    • proper heading delimiters (=…=)
  Add more checks if you wish. */

(function(){

   var container = document.createElement('div');
   container.style.margin = '1.5em 0';
   container.innerHTML = `

⚙️ Quick markup checker

       <textarea id="mw‑checker‑src"
                 rows="6"
                 style="width:100%;font-family:monospace;"
                 placeholder="Paste your wikitext here…"></textarea>
       
<button id="mw‑checker‑run">Check syntax</button>
   `;
   document.querySelector('table.wikitable').parentNode.appendChild(container);
   function count(str, pat){ return (str.match(pat)||[]).length; }
   document.getElementById('mw‑checker‑run').addEventListener('click',function(){
       var src = document.getElementById('mw‑checker‑src').value;
       var msgs = [];
       var ital = count(src, //g);
       if (ital % 2) msgs.push('⚠️ Unbalanced italics (\'\' – '+ital+' occurrences)');
       var bold = count(src, //g);
       if (bold % 2) msgs.push('⚠️ Unbalanced bold (\'\'\' – '+bold+' occurrences)');
       src.split('\n').forEach(function(l){
           if (/^=+/.test(l)){
               var lead = l.match(/^=+/)[0].length;
               var trail = (l.match(/=+$/)||[])[0].length;
               if (lead!==trail) msgs.push('⚠️ Bad heading line: "'+l+'" – start and end “=” count differ');
           }
       });
       var out = document.getElementById('mw‑checker‑out');
       out.textContent = msgs.length ? msgs.join('\n') : '✅ No obvious syntax problems!';
       out.style.display = 'block';
   });

})(); </script>

` comments have been removed – they were only needed for the Translate extension, which is not installed on this wiki.

  • `Template:Anchor` calls have been deleted because the surrounding headings already generate the necessary HTML‑id anchors.
 If you ever need an extra “in‑page” anchor that is **not** a heading, insert a tiny span, e.g.:
     
 and link to it with `link text`.
  • The table uses `
    ` to show markup literally.
 This works on a vanilla MediaWiki installation – no extensions required.
  • The optional JavaScript block at the bottom provides a very small client‑side “syntax checker”. It is harmless if JavaScript is disabled and can be removed if you prefer a strictly static page.

Happy editing! -->