Help:Wiki markup examples - Wikiversity
Jump to content
From Wikiversity
Wikitext
markup -- making your page look the way you want
edit
edit source
This is page
Help:Wiki markup examples
, transcluded in
Help:Editing
If you want to try out things without danger of doing any harm, you can do so in the
Wikiversity:Sandbox
More information on
HTML tags in wikitext
Organizing your writing -- sections, paragraphs, lists and lines
edit
edit source
What it looks like
What you type
Sections and subsections
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
Start with a second-level heading (
==
); don't use first-level headings (=).
Don't skip levels (for example, second-level followed by fourth-level).
table of contents
will automatically be added to an article that has four or more sections.
If appropriate, place subsections in an appropriate order. If listing countries, for example, place them in alphabetical order rather than, say, relative to population of
OECD
countries, or some random order.
If you want to keep headings out of the TOC you have to use HTML heading tags and close them without using a slash e.g.
heading too low level to be in the toc of large page.
== New section ==
== New section ==
=== Subsection ===
==== Sub-subsection ====
Newline
A single
newline
has no
effect on the
layout.
But an empty line
starts a new paragraph,
or ends a list or indented part.
(
disables this paragraphing until
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
w:Wikipedia:Don't use line breaks
for details.
When used in a list, a newline
does
affect the layout (See
Help:List
).
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
is sufficient. The system produces the XHTML code
.)
Please use this sparingly.
Close markup between lines; do not start a
link
or
italics
or
bold
on one line and close it on the next.
You can break lines
without starting a new paragraph.
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.
* 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.
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.
# 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
in lists
* You can even do mixed lists
*# and nest them
*#* or break lines
in lists
Definition list
word
definition of the word
longer phrase
phrase defined
; word : definition of the word
; longer phrase
: phrase defined
One item per line; a newline can appear before the colon, but using a space before the colon improves parsing.
indenting
A colon indents a line or paragraph.
Two colons further indents the paragraph.
Three colons indents further.
A manual newline starts a new paragraph.
This is often used for discussion on
Talk pages
: A colon indents a line or paragraph.
:: Two colons further indents the paragraph.
::: Three colons indents further.
A manual newline starts a new paragraph.
When there is a need for separating a block of text
the
blockquote
command will indent both margins when needed instead of the left margin only as the colon does.
This is useful for (as the name says) inserting blocks of quoted (and cited) text.
The '''blockquote''' command will indent
both margins when needed instead of the
left margin only as the colon does.
Centered text.
Please note the US-English spelling of "center".
{{center top}}Centered text.{{center bottom}}
horizontal dividing line
this is above it...
...and this is below it.
If you don't use a section header, you don't get a TOC entry.
A horizontal dividing line:
this is above it...
----
...and this is below it.
Links, URLs
edit
edit source
More information at
Help:Link
Internal links
edit
edit source
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 --
Help: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
Basic
Sue is reading the
official position
(or
Official positions
).
Sue is reading the
[[official position]]
(or [[Official position]]s).
Basic +
Text formatting
You can also
italicize
/etc. links: e.g.,
Wikipedia
''[[Wikipedia]]''
Interwiki linking
A link to the page on another wiki (e.g. the same subject in another language)
For more info see
m:Help:Interwiki linking
fr:Wikipédia:Aide
*For more info see [[m:Help:Interwiki linking]].
*[[:fr:Wikipédia:Aide]].
Section of page
List of cities by country#Morocco
List of cities by country#Sealand
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 alreay 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:Editing FAQ
*[[List of cities by country#Morocco]].
*[[List of cities by country#Sealand]].
Piped link
Use a pipe "
" to create a
link label
About Links
Cities in Morocco
*[[Help:Link|About Links]]
*[[List of cities by country#Morocco|
Cities in Morocco]]
"blank" pipes
hide:
Words in parentheses:
kingdom
Namespace:
Requests for adminship
After you save, the server automatically fills in the link label.
*In parentheses: [[kingdom (biology)|]].
*Namespace: [[Meta:Requests for adminship|]].
Links to nonexistent pages
The weather in London
is a page that doesn't exist yet.
You can create it by clicking on the link.
Have a look at
how to start a page
guide and the naming conventions page for your project.
[[The weather in London]] is a page
that doesn't exist yet.
Link to yourself
You should "sign" your comments on
talk pages
Your user name:
Karl Wick
Or your user name plus date/time:
Karl Wick
08:10 Oct 5, 2002 (UTC)
Five tildes gives the date/time alone: 08:10 Oct 5, 2002 (UTC)
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: ~~~~
: Five tildes gives the date/time alone: ~~~~~
Redirects
one article title to another with this special link.
#REDIRECT [[United States]]
Media links
To include links to non-image uploads such as sounds, use a "media" link.
Sound
[[media:Sg_mrob.ogg|Sound]]
Links to Categories
To include links to a Category page.
Category:English documentation
[[:Category:English documentation]]
Dates
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.
Special pages
"What links here" and "Recent changes" can be linked as:
Special:Whatlinkshere/Help:Wiki markup examples
and
Special:Recentchangeslinked/Help:Wiki markup examples
[[Special:Whatlinkshere/
Help:Editing]] and
[[Special:Recentchangeslinked/
Help:Editing]]
External links
edit
edit source
Nupedia
[1]
[http://www.nupedia.com Nupedia],
[http://www.nupedia.com]
Email Example
[2]
[mailto:email@example.com Email Example],
[mailto:email@example.com]
Or just give the URL:
In the
URL
all symbols must be among: A-Z a-z 0-9 ._\/~%- ?!=()@ \x80-\xFF. If a URL contains a different character it should be converted; for example, ^ has to be written ^ (to be looked up in
ASCII
). A blank space can also be converted into an underscore.
Or just give the URL:
Images, video, and sounds
edit
edit source
See also
Help:Media
for detailed help with uploading and using media files.
What it looks like
What you type
In-line picture
Wikiversity logo
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.
A picture:
[[File:Wikiversity-logo-Snorky.svg|thumb]]
or, with alternative text (
strongly
encouraged)
[[File:Wikiversity-logo-Snorky.svg|thumb|Wikiversity logo]]
Other ways of linking to pictures
The Image page:
File:Wikiversity-logo-Snorky.svg
(note the initial colon in the markup text, on the right)
A link to the image page as a piped link:
Wikiversity logo
Clicking on an image displayed on a page (such as any of the ones above) also leads to the description page
You can also use the "media" link:
Wikiversity logo
* [[:File::Wikiversity-logo-Snorky.svg]]
* [[:File:Wikiversity-logo-Snorky.svg|Wikiversity logo]]
* [[media:Wikiversity-logo-Snorky.svg|Wikiversity logo]]
Other Media - Video and Sounds
Use an "Image" link:
Example 1
(even though it is a sound file, it will be added to the "Image" namespace)
Use the "audio" template:
Example 2
help
info
* [[:Image:My Masterpiece 2 - GarageBand example.ogg|Example 1]]
* {{audio|My Masterpiece 2 - GarageBand example.ogg|Example 2}}
Text formatting -- controlling how it looks
edit
edit source
What it looks like
What you type
Emphasize
(italics),
strongly
(bold),
very strongly
(bold italics).
(These are double and triple apostrophes, not double quotes.)
Note: this can also be applied to links (e.g.,
Wikipedia
).
''Emphasize'', '''strongly''',
'''''very strongly'''''.
''[[Wikipedia]]''
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). But it may make a big difference for the visually impaired ;-)
You can also write italic and bold.
This is useful in mathematical formulas where you
need specific font styles rather than emphasis.
:F = ma
You can also write
in small caps
If the wiki has the templates, this can
Template:Bsmbe
much simpler to write
Template:Esm
You can also write
in small caps.
If the wiki has the templates, this can
{{bsm}}be much simpler to write{{esm}}.
A typewriter font, sometimes used for
technical terms
and
computer code
A typewriter font, sometimes used for
technical terms and computer code.
For semantic reasons, using
where applicable is preferable to using
You can use
small text
for captions.
You can use small text
for captions.
You can
strike out deleted material
and
underline new material
You can also mark
deleted material
and
inserted material
using logical markup
rather than visual markup.
When editing regular articles, just make your changes and do not mark them up in any special way.
When editing your own previous remarks in talk pages, it is sometimes appropriate to mark up deleted or inserted material.
You can strike out deleted material
and underline new material.
You can also mark deleted material and
inserted material using logical markup
rather than visual markup.
Subscript: x
Superscript: x
or x²
Most browsers have an easier time formatting lines with ² than with 2
8.85 × 10
−12
C² / J m.
hectare
1 E4 m²
Subscript: x2
Superscript: x2 or x²
ε0 =
8.85 × 10−12
C² / J m.
1 [[hectare]] = [[1 E4 m²]]
Spacing things out -- spaces and tables
edit
edit source
Using non-breaking spaces
0 true.
x2
≥
0 true.
Using
Wikitext piped tables
≥0
true.
See templates
Template:hs1
Template:hs
, and
Template:vs
for more examples
{||-
|x2
| width=20px | || width=20px | ≥0 || true.
|-
| a || || b
|}
See
Help:Table
for more information
Just show what I typed
edit
edit source tags can tell the server and the browser to display things as you typed them.
Example
arrow →
italics
link
arrow →
''italics''
[[link]]
interpret special characters
don't interpret special wiki markup
reformat text (removing newlines and multiple spaces)
arrow →
''italics''
[[link]]
arrow →
''italics''
[[link]]
interpret special characters
don't interpret special wiki markup
don't reformat text
arrow →''italics''
[[link]] arrow →''italics''
[[link]]
leading space
interpret special characters
interpret special wiki markup
don't reformat text
arrow →
italics
link
arrow →''italics''
[[link]]
preformatted text
IF a line of plain text starts with a space
it will be formatted exactly
as typed
in a fixed-width font
in a grey dotted-outline box
lines won't wrap
ENDIF
this is useful for:
* pasting preformatted text;
* algorithm descriptions;
* program source code
* ASCII art;
* chemical structures;
For larger preformatted text passages you can use thea lot of texttag.
WARNING If you make it wide,
you
force the whole page to be wide
and
hence less readable. Never start ordinary lines with spaces.
(see also below)
IF a line of plain text starts with a space
it will be formatted exactly
as typed
in a fixed-width font
in a grey dotted-outline box
lines won't wrap
ENDIF
this is useful for:
* pasting preformatted text;
* algorithm descriptions;
* program source code
* ASCII art;
* chemical structures;
typewriter font
arrow →
italics
link
arrow →''italics''
[[link]]
Show special character codes
→
→
Comments
The text between
here
and here
won't be displayed
The text between '''here'''
'''and here''' won't be displayed
Complicated mathematical formulae
edit
edit source
{\displaystyle \sum _{n=0}^{\infty }{\frac {x^{n}}{n!}}}
See
Formula
or
TeX markup
A useful resource for understanding TeX can be found at the
TeX User's Group
Special characters
edit
edit source
Umlauts and accents:
(See
Help:Special characters
À Á Â Ã Ä Å
Æ Ç È É Ê Ë
Ì Í Î Ï Ñ Ò
Ó Ô Õ Ö Ø Ù
Ú Û Ü ß à á
â ã ä å æ ç
è é ê ë ì í
î ï ñ ò ó ô
œ õ ö ø ù ú
û ü ÿ
À Á Â Ã Ä Å
Æ Ç È É Ê Ë
Ì Í
Î Ï Ñ Ò
Ó Ô Õ
Ö Ø Ù
Ú Û Ü ß
à á
â ã ä å æ
è é ê ë ì í
î ï ñ ò ó ô
œ õ
ö ø ù ú
û ü ÿ
À Á Â Ã Ä Å
Æ Ç È É Ê Ë
Ì Í Î Ï Ñ Ò
Ó Ô Õ Ö Ø Ù
Ú Û Ü ß à á
â ã ä å æ ç
è é ê ë ì í
î ï ñ ò ó ô
œ õ ö ø ù ú
û ü ÿÀ Á Â Ã Ä Å
Æ Ç È É Ê Ë
Ì Í Î Ï Ñ Ò
Ó Ô Õ Ö Ø Ù
Ú Û Ü ß à á
â ã ä å æ ç
è é ê ë ì í
î ï ñ ò ó ô
œ õ ö ø ù ú
û ü ÿ
Punctuation:
¿ ¡ « » § ¶
† ‡ • - – —
¿ ¡ « » § ¶
† ‡ • - – —
¿ ¡ « » § ¶
† ‡ • - – —¿ ¡ « » § ¶
† ‡ • - – —
Commercial symbols:
™ © ® ¢ € ¥ £ ¤
™ © ® ¢ € ¥ £ ¤
™ © ® ¢ € ¥ £ ¤™ © ® ¢ € ¥ £ ¤
Greek characters:
α β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Γ Δ Θ Λ Ξ Π
Σ Φ Ψ Ω
α β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Γ Δ Θ Λ Ξ Π
Σ Φ Ψ Ω
α β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Γ Δ Θ Λ Ξ Π
Σ Φ Ψ Ωα β γ δ ε ζ
η θ ι κ λ μ ν
ξ ο π ρ σ ς
τ υ φ χ ψ ω
Γ Δ Θ Λ Ξ Π
Σ Φ Ψ Ω
Math characters:
∫ ∑ ∏ √ − ± ∞
≈ ∝ ≡ ≠ ≤ ≥
× · ÷ ∂ ′ ″
∇ ‰ ° ∴ ø
∈ ∩ ∪ ⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀ ⇒ ⇔
→ ↔ ↑
∫ ∑ ∏ √ − ± ∞
≈ ∝ ≡ ≠ ≤ ≥
× · ÷ ∂ ′ ″
∇ ‰ ° ∴ ø
∈ ∩ ∪ ⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀ ⇒ ⇔
→ ↔ ↑
Problem symbols:
ℵ ∉
ℵ ∉
∫ ∑ ∏ √ − ± ∞
≈ ∝ ≡ ≠ ≤ ≥
× · ÷ ∂ ′ ″
∇ ‰ ° ∴ ø
∈ ∩ ∪ ⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀ ⇒ ⇔
→ ↔ ↑∫ ∑ ∏ √ − ± ∞
≈ ∝ ≡ ≠ ≤ ≥
× · ÷ ∂ ′ ″
∇ ‰ ° ∴ ø
∈ ∩ ∪ ⊂ ⊃ ⊆ ⊇
¬ ∧ ∨ ∃ ∀ ⇒ ⇔
→ ↔ ↑Problem symbols:
ℵ ∉
∉ ℵ
Including another page -- transclusion and templates
edit
edit source
Changing a transcluded file will change every file that transcludes it.
transclusion
Including the contents of another page into the current page.
Does this really work?
{{:Help:Transclusion Demo}}
template
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.
This is underlined
{{H:title|hovertext|This is underlined}}
Retrieved from "
Category
Help
Help
Wiki markup examples
Add topic