Difference between revisions of "Help:Basic MediaWiki Syntax"
(→See also: A wealth of detail) |
(Add separator line between 'Indented items' and 'Bullet list') |
||
(3 intermediate revisions by the same user not shown) | |||
Line 38: | Line 38: | ||
|Internal link<br /> | |Internal link<br /> | ||
(within the Computer History wiki)<br /> | (within the Computer History wiki)<br /> | ||
− | '' | + | ''This, and the one above, can be combined.'' |
| | | | ||
<tt><nowiki>[[name of page]]</nowiki></tt><br /> | <tt><nowiki>[[name of page]]</nowiki></tt><br /> | ||
Line 104: | Line 104: | ||
|- | |- | ||
|Indented items<br /> | |Indented items<br /> | ||
− | (used mostly on Talk: pages) | + | ''(used mostly on Talk: pages)'' |
| | | | ||
<tt>: foo</tt><br /> | <tt>: foo</tt><br /> | ||
Line 111: | Line 111: | ||
: foo | : foo | ||
:: bar | :: bar | ||
+ | |- | ||
+ | |colspan="3" style="border-top:1px solid #cee0f2;"| | ||
|- | |- | ||
|Bullet list | |Bullet list | ||
Line 161: | Line 163: | ||
<pre> | <pre> | ||
− | {| class="wikitable" | + | {| class="wikitable" style="text-align: center;" |
! Table !! Prototype | ! Table !! Prototype | ||
|- | |- | ||
− | | colspan="2 | + | | colspan="2" | Headers |
|- | |- | ||
| aa || rowspan="2" | yy | | aa || rowspan="2" | yy | ||
Line 176: | Line 178: | ||
produces: | produces: | ||
− | {| class="wikitable" | + | {| class="wikitable" style="text-align:center;" |
! Table !! Prototype | ! Table !! Prototype | ||
|- | |- | ||
− | | colspan="2 | + | | colspan="2" | Headers |
|- | |- | ||
| aa || rowspan="2" | yy | | aa || rowspan="2" | yy | ||
Line 205: | Line 207: | ||
A lengthy tutorial on images is [https://en.wikipedia.org/wiki/Help:Pictures here]; complete specifications for the use of the 'File' special form are available [https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax here] and [https://www.mediawiki.org/wiki/Help:Images here]. | A lengthy tutorial on images is [https://en.wikipedia.org/wiki/Help:Pictures here]; complete specifications for the use of the 'File' special form are available [https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax here] and [https://www.mediawiki.org/wiki/Help:Images here]. | ||
− | + | <br clear=all> | |
==See also== | ==See also== | ||
Latest revision as of 13:09, 8 May 2024
This is a brief introduction to MediaWiki source syntax. For a more comprehensive guide, see here.
Text
Description | You type | You get |
Applies anywhere | ||
Italicise text |
''italic'' |
italic |
Bold text |
'''bold''' |
bold |
Bold and italic |
'''''bold & italic''''' |
bold & italic |
Internal link (within the Computer History wiki) |
[[name of page]] |
|
Wikipedia style, followed here, is generally to only link the first instance of a term on a page. | ||
External link (to other websites) |
[http://www.example.org] |
|
Text can be commented out |
matching <!-- and --> around text to be ignored | |
Sign your posts |
~~~~ |
Your username 20:17, |
Items below only apply at the beginning of a line | ||
Headings A Table of Contents will automatically be generated when four headings are added to an article. For a reason that has been lost in the mists of time, Wikipedia (and thus here) uses '==' as the top level section marker; '=' seems to work now, but please keep up the style. |
== Level 1 == |
ContentsLevel 1Level 2Level 3Level 4Level 5 |
Indented items (used mostly on Talk: pages) |
: foo |
|
Bullet list |
* one |
|
Numbered list |
# one |
|
Pre-formatted text
There are a number of ways to include pre-formatted text (e.g. source code fragments); all of these techniques also use a fixed-width font for the text:
- Start each line with a space character; normal markups can be used; e.g.:
" This is '''pre-formatted''' text"
produces:
This is pre-formatted text
- Use the HTML <nowiki> tag, with a space character before the <nowiki>. (Remember to add a matching closing tag after the pre-formatted text block).
- Use the HTML <pre> tag (again, remember the closing tag).
Note that the HTML <blockquote> tag only indents the block; text within it will still be justified.
Tables
{| class="wikitable" style="text-align: center;" ! Table !! Prototype |- | colspan="2" | Headers |- | aa || rowspan="2" | yy |- | bb |- | cc || zz |}
produces:
Table | Prototype |
---|---|
Headers | |
aa | yy |
bb | |
cc | zz |
Images
Including the special form:
[[File:Pdp1115.jpg|thumb|150px|left|Caption text]]
produces:
(The legacy keyword 'Image' may be used in place of "File".) Leaving out the "150px" inserts the image full-size. The optional keywords 'left' and 'right' can be added to control the horizontal placement.
(Notice that this text fills up around the image. Add a <br clear=all> after the image line to force the text to re-start below the image.)
New images can be uploaded via the 'Upload file' page (link on the left-hand side of all pages).
A lengthy tutorial on images is here; complete specifications for the use of the 'File' special form are available here and here.
See also
- MediaWiki.org help pages - a wealth of detail
- Help:Formatting - detailed help on formatting
- Help:Tables - ditto for tables