Help:Formatting

From MediaWiki-1.39
Revision as of 12:50, 15 January 2026 by 207.236.12.76 (talk)
Jump to navigation Jump to search


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! -->