# Help:Wikitext

Template:Wikipedia how to Template:Wikitext navbox Wikitext, also known as Wiki markup or Wikicode, consists of the syntax and keywords used by the MediaWiki software to format a page. To learn how to see this hypertext markup, and to save an edit, see Help:Editing. Generally, coding can be copied and pasted, without writing new code. There is a short list of markup and tips at Help:Cheatsheet.

In addition to Wikitext, some HTML elements are also allowed for presentation formatting. See Help:HTML in wikitext for information on this.

## Layout

### Sections

The = through ====== markup are headings for the sections with which they are associated.

• A single = is styled as the article title and should not be used within an article.
• Headings are styled through CSS and add an  link. See this section for the relevant CSS.
• Do not use any markup after the final heading markup – this will either break the heading, or will cause the heading to not be included in an edit summary.

{{#lst:Help:HTML in wikitext|WIKI_section}}

Templates: {{fake heading}} for use in documentation.

#### Horizontal rule

The horizontal rule represents a paragraph-level thematic break. Do not use in article content, as rules are used only after main sections, and this is automatic.

Markup Renders as
----

HTML equivalent: ‎<hr />

When a page has at least four headings, a table of contents (TOC) will automatically appear after the lead and before the first heading. The TOC can be controlled by magic words or templates:

• __FORCETOC__ forces the TOC to appear at the normal location regardless of the number of headings.
• __TOC__ forces the TOC to appear at the point where the magic word is inserted instead of the normal location.
• __NOTOC__ disables the TOC entirely.
• {{TOC limit}} can be used to control the depth of subsections included in the TOC. This is useful where the TOC is long and unwieldy.

### Line breaks

Line breaks or newlines are used to add whitespace between lines, such as separating paragraphs.

• A line break that is visible in the content is inserted by pressing ↵ Enter twice.
• Pressing ↵ Enter once will place a line break in the markup, but it will not show in the rendered content, except when using list markup.
• Markup such as bold or italics will be terminated at a line break.
Markup Renders as
A single newline here
has no effect on the layout.

But an empty line starts a new paragraph,
or ends a list or an indented part.


A single newline here has no effect on the layout.

But an empty line starts a new paragraph, or ends a list or an indented part.

HTML equivalent: ‎<br> or ‎<br /> can be used to break line layout.

Templates for line breaks:

• {{break}} adds multiple line breaks.
• {{-}} and {{clear}} adds a break with styling, to clear floating elements.

Unbulleted list:

### Indent text

Indentation is most commonly used on talk pages.

Markup Renders as
Indentation as used on talk pages:
:Each colon at the start of a line
::causes the line to be indented by three more character positions.
:::(The indentation persists
so long as no carriage return or line break is used.)
:::Repeat the indentation at any line break.
::::Use an extra colon for each response.
:::::And so forth ...
::::::And so on ...
{{Outdent|::::::}}The outdent template can give a visual indicator that we're deliberately cancelling the indent (6 levels here)

Indentation as used on talk pages:

Each colon at the start of a line
causes the line to be indented by three more character positions.
(The indentation persists

so long as no carriage return or line break is used.)

Repeat the indentation at any line break.
Use an extra colon for each response.
And so forth ...
And so on ...
The outdent template can give a visual indicator that we're deliberately cancelling the indent (6 levels here)

Templates: {{outdent}}, {{outdent2}}

### Blockquote

When there is a need for separating a block of text. This is useful for (as the name says) inserting blocks of quoted (and cited) text.

Markup Renders as
<blockquote>
The '''blockquote''' tag will indent both margins when needed instead of the left margin only as the colon does.
</blockquote>


The blockquote tag will indent both margins when needed instead of the left margin only as the colon does.

Template {{quote}} results in the same render.

### Center text

Markup Renders as
<div class="center" style="width: auto; margin-left: auto; margin-right: auto;">Centered text</div>
Centered text

Template {{center}} uses the same markup. To center a table, see Help:Table. Please do not use ‎<center>...‎</center> tags, as it is obsolete.

### Align text to right

You can align content in a separate container:

Markup Renders as
<div style="text-align: right; direction: ltr; margin-left: 1em;">Text on the right</div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Text on the right
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Or; make the text float around it:

Markup Renders as
<div class="floatright">Text on the right</div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Text on the right
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
{{stack|Text on the right}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Page Template:Stack/styles.css has no content.
Text on the right
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

### Lists

Do not leave blank lines between items in a list unless there is a reason to do so, since this causes the MediaWiki software to interpret each item as beginning a new list.

#### Unordered lists

Markup Renders as
* Item1
* Item2
* Item3
* Item4
** Sub-item 4 a)
*** Sub-item 4 a) 1.
**** Sub-item 4 a) 1. i)
**** Sub-item 4 a) 1. ii)
** Sub-item 4 b)
* Item5

• Item1
• Item2
• Item3
• Item4
• Sub-item 4 a)
• Sub-item 4 a) 1.
• Sub-item 4 a) 1. i)
• Sub-item 4 a) 1. ii)
• Sub-item 4 b)
• Item5

#### Ordered lists

Markup Renders as
# Item1
# Item2
# Item3
# Item4
## Sub-item 1
### Sub-sub-item
#### Sub-sub-sub-item
## Sub-item 2
# Item5


1. Item1
2. Item2
3. Item3
4. Item4
1. Sub-item 1
1. Sub-sub-item
1. Sub-sub-sub-item
2. Sub-item 2
5. Item5

#### Description lists

Page Template:Shortcut/styles.css has no content.

To list terms and definitions, start a new line with a semicolon (;) followed by the term. Then, type a colon (:) followed by a definition. The format can also be used for other purposes, such as make and models of vehicles, etc.

Description lists (formerly definition lists, and a.k.a. association lists) consist of group names corresponding to values. Group names (terms) are in bold. Values (definitions) are indented. Each group must include one or more definitions. For a single or first value, the : can be placed on the same line after ; – but subsequent values must be placed on separate lines.