Help:Wiki markup examples
Wikitext markup -- making your page look the way you want
- If you want to try out things without danger of doing any harm, you can do so in the Help:Sandbox.
- More information on HTML tags in wikitext
Organizing your writing -- sections, paragraphs, lists and lines
What it looks like | What you type |
---|---|
Start sections with header lines Note: Single equal signs give the highest level heading, like the page title; usually projects have the convention not to use them.
New section Subsection Sub-subsection |
== New section == === Subsection === ==== Sub-subsection ==== |
A single newline has no effect on the layout. But an empty line starts a new paragraph, or ends a list or indented part. (<p> disables this paragraphing until </p> or the end of the section) (in Cologne Blue two newlines and a div tag give just one newline; in the order newline, div tag, newline, the result is two newlines) You can make the wikitext more readable by putting in newlines. You might find this causes future problems -- see Help:Don't use line breaks for details. |
A single newline has no effect on the layout. But an empty line starts a new paragraph. |
You can break lines without starting a new paragraph. (The HTML tag <br> is sufficient. The system produces the XHTML code <br />.) |
You can break lines<br> without starting a new paragraph. |
marks the end of the list.
|
* Unordered Lists are easy to do: ** start every line with a star *** more stars means deeper levels *A newline *in a list marks the end of the list. *Of course *you can *start again. |
marks the end of the list.
|
# Numbered lists are also good ## very organized ## easy to follow #A newline #in a list marks the end of the list. #New numbering starts #with 1. |
|
* You can even do mixed lists *# and nest them *#* or break lines<br>in lists |
Definition list
|
; word : definition of the word ; longer phrase : phrase defined |
A manual newline starts a new paragraph.
|
: A colon indents a line or paragraph. A manual newline starts a new paragraph. |
<center>Centered text.</center> |
|
A horizontal dividing line: above
and below. If you don't use a section header, you don't get a TOC entry. |
A horizontal dividing line: above ---- and below. |
Links, URLs
More information at Help:Links
Internal links
General notes:
- Enclose the target name in double square brackets -- "[[" and "]]"
- First letter of target name is automatically capitalized
- Spaces are represented as underscores (but don't do underscores yourself)
- Links to nonexistent pages are shown in red -- DCCWiki User's Guide: Starting a new page tells about creating the page.
- When the mouse cursor "hovers" over the link, you see a "hover box" containing...
What it looks like | What you type |
---|---|
Sue is reading about Introduction_to_DCC. |
Sue is reading the [[Introduction_to_DCC]]. |
If the section doesn't exist, the link goes to the top of the page. If there are multiple sections by the same name, link to specific ones by adding how many times that header has already appeared (e.g. if there are 3 sections entitled "Example header," and you wish to link to the third one, then use [[#Example section 3]]. For more info, see Help:Links. |
*[[Introduction_to_DCC#FreeDCC]]. *[[Introduction_to_DCC#Sealand]]. |
Use a pipe "|" to create a link label: |
*[[Help:Links|About Links]] *[[Introduction_to_DCC#Computer Networks|Comparing computers to DCC]] |
"blank" pipes hide:
After you save, the server automatically fills in the link label. |
*In parentheses: [[Throttle|]]. *Namespace: [[Help:Requests for adminship|]]. |
Get FREE DCC stuff is a page that doesn't exist yet.
|
[[Get FREE DCC stuff]] is a page that doesn't exist yet. |
You should "sign" your comments on talk pages: The server will fill in the link after you save. |
You should "sign" your comments on talk pages: : Your user name: ~~~ : Or your user name plus date/time: ~~~~ |
one article title to another with this special link. |
#REDIRECT [[Throttle]] |
|
ISBN 0123456789X RFC 123 |
To include links to non-image uploads such as sounds, use a "media" link.
|
[[media:Sg_mrob.ogg|Sound]] |
To include links to a Category page.
|
[[:Category:DCC]] |
Use links for dates, so everyone can set their own display order. Use Special:Preferences to change your own date display setting. |
[[July 20]], [[1969]] , [[20 July]] [[1969]] and [[1969]]-[[07-20]]will all appear as 20 July-1969 if you set your date display preference to 1 January 2001. |
"What links here" and "Recent changes" can be linked as: |
[[Special:Whatlinkshere/ Help:Editing]] and [[Special:Recentchangeslinked/ Help:Editing]] |
External links
Nupedia, [1] | [http://www.nupedia.com Nupedia], [http://www.nupedia.com] |
Or just give the URL: http://www.nupedia.com.
|
Or just give the URL: http://www.nupedia.com. |
Images, video, and sounds
See also: Help:Images
What it looks like | What you type |
---|---|
|
A picture: [[File:DCCWikiLogo.png]] or, with alternative text (strongly encouraged) vbgf [[File:DCCWikiLogo.png| DCCWiki - The Free DCC Encyclopedia]] Web browsers render alternative text when not displaying an image -- for example, when the image isn't loaded, or in a text-only browser, or when spoken aloud. See Alternative text for images for help on choosing alternative text. See Extended image syntax for more options. |
|
[[:Fie:DCCWikiLogo.png]] [[File:DCCWikiLogo.png|DCCWiki]] |
Other Media Links -- Video and Sounds
Use a "media" link: Sound |
[[media:Sg_mrob.ogg|Sound]] |
Text formatting -- controlling how it looks
What it looks like | What you type |
---|---|
Emphasize (italics), strongly (bold), very strongly (bold italics). (These are double and triple apostrophes, not double quotes.) |
''Emphasize'', '''strongly''', '''''very strongly'''''. |
You can also write italic and bold. This is useful in mathematical formulas where you need specific font styles rather than emphasis.
(The difference between these two methods is not very important for graphical browsers, so most people ignore it). |
You can also write <i>italic</i> and <b>bold</b>. This is useful in mathematical formulas where you need specific font styles rather than emphasis. :<b>F</b> = <i>m</i><b>a</b> |
You can also write in small caps. If the wiki has the templates, this can Template:Bsmbe much simpler to writeTemplate:Esm. |
You can also write <span style="font-variant:small-caps"> in small caps</span>. If the wiki has the templates, this can {{bsm}}be much simpler to write{{esm}}. |
A typewriter font, sometimes used for technical terms. | A typewriter font, sometimes used for <tt>technical terms</tt>. |
You can use small text for captions. | You can use <small>small text</small> for captions. |
You can and underline new material. |
You can <strike>strike out deleted material</strike> and <u>underline new material</u>. |
Subscript: x2 Superscript: x2 or x² Most browsers have an easier time formatting lines with ² than with <sup>2</sup> ε0 =
8.85 × 10−12
C² / J m.
|
Subscript: x<sub>2</sub> Superscript: x<sup>2</sup> or x² ε<sub>0</sub> = 8.85 × 10<sup>−12</sup> C² / J m. 1 hectare = 1 E4 m² |
Spacing things out -- spaces and tables
x2 ≥ 0 true. |
<i>x</i><sup>2</sup> ≥ 0 true. |
|||||||
See templates Template:hs1, Template:hs, and Template:vs for more examples |
{||- |<i>x</i><sup>2</sup> | width=20px | || width=20px | ≥0 || true. |- | a || || b |} See Help:Tables for more information |
Just show what I typed
<nowiki> and <pre> tags can tell the server and the browser to display things as you typed them.
arrow → italics link |
arrow → ''italics'' [[link]] |
arrow → ''italics'' [[link]] |
<nowiki> arrow → ''italics'' [[link]] </nowiki> |
arrow → ''italics'' [[link]] |
<nowiki><pre>arrow → ''italics'' [[link]]</nowiki> |
arrow → italics link |
arrow → ''italics'' [[link]] |
IF a line of plain text starts with a space it will be formatted exactly as typed in a fixed-width font lines won't wrap ENDIF this is useful for: * pasting preformatted text; * algorithm descriptions; * program source code * ASCII art; * chemical structures; WARNING If you make it wide,
you force the whole page to be wide and
hence less readable. Never start ordinary lines with spaces. |
IF a line of plain text starts with a space it will be formatted exactly as typed in a fixed-width font lines won't wrap ENDIF this is useful for: * pasting preformatted text; * algorithm descriptions; * program source code * ASCII art; * chemical structures; |
arrow → italics link |
<tt>arrow →</tt> <tt>''italics''</tt> <tt>link</tt> |
→ |
&rarr; |
The text between here and here won't be displayed |
The text between '''here''' <!-- comment here --> '''and here''' won't be displayed |
Input boxes
The inputbox extension is a DCCWiki extension by Erik Möller to add predefined HTML forms to wiki pages. It was originally created for the purpose of adding a Create an article box.
General syntax
Inputboxes are constructed like this:
<inputbox> type=box type parameter1=value parameter2=value </inputbox>
The type parameter is mandatory. All other parameters are optional.
Box types
Type | Description | Example |
---|---|---|
type=search |
Generates a search box with a width of 50 characters. The button labels can be specified, see below; the defaults are MediaWiki:Tryexact and MediaWiki:Searchfulltext. The text field specifies the search criteria. |
|
type=create |
Allows creating a new page. Note especially the preload= and editintro= options below. The button label can be specified, see below; the default is MediaWiki:Createarticle. The text field specifies which page is to be edited. |
|
type=comment |
Add one or more sections to an existing page, or create a page, with an edit summary that is automatically the same as the (first) new section header. The button label can be specified, see below; the default is MediaWiki:Postcomment; note that this message is also used in the sidebar of the old "Standard" skin. The text field specifies which page is to be edited. |
Parameters
Parameter Scope |
Description | Example |
---|---|---|
bgcolor= |
Sets the table background color (HTML color values). Do not use quotes. |
<inputbox> type=search bgcolor=#eeeeff </inputbox> produces: |
width= |
Sets the width of the inputbox in characters. |
<inputbox> type=create width=6 </inputbox> produces: |
default= |
Default text to put in the inputbox. |
<inputbox> type=comment default=User talk:Eloquence </inputbox> produces: |
preload= comment, create |
The text of the page under this title will be loaded into the blank editbox when a new page is created. Enter the title of a non-existent page in the example inputbox, and click "Create" to test this effect. |
<inputbox> type=create preload=Template:Standard content for new page </inputbox> produces: |
editintro= comment, create |
The text of the page under this title will be added, as instructions, before the submission form for new pages or comments. Enter the title of a non-existent page in the example inputbox, and click "Create" to test this effect. |
<inputbox> type=create editintro=Template:Instructions </inputbox> produces: |
buttonlabel= All types |
This label will be used for the main button of the form. |
<inputbox> type=comment buttonlabel=Add new rumor </inputbox> produces: |
searchbuttonlabel= search |
This label will be used for the "Search full text" button of the search form. |
<inputbox> type=search searchbuttonlabel=Dig deeper </inputbox> produces: |
Applying create to an existing page simply gives the edit page. In that case editintro and preload are ignored.
- Variables, parameters, and templates are not allowed in values of parameters of inputbox; see Template talk:Inputbox demo.
Complicated mathematical formulae
<math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>
|
<math>\sum_{n=0}^\infty \frac{x^n}{n!}</math> |
Special characters
Umlauts and accents: (See Help:Creating special characters) |
è é ê ë ì í À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü ß à á â ã ä å æ ç è é ê ë ì í î ï ñ ò ó ô œ õ ö ø ù ú û ü ÿ |
Punctuation: |
¿ ¡ « » § ¶ † ‡ • - – — |
Commercial symbols: |
™ © ® ¢ € ¥ £ ¤ |
Greek characters: α β γ δ ε ζ |
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω |
Math characters: |
∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ ℵ ø ∈ ∉ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ |
Including another page -- transclusion and templates
Changing a transcluded file will change every file that transcludes it.
|
{{:Transclusion Demo}} |
A special kind of page designed for transclusion. These pages are found in the Template: namespace Templates can even take parameters. When you edit a page, all the templates used on the page are listed below the edit box. |
{{Title|hovertext|This is underlined}} |