MozillaZine Knowledge Base:Formatting

From MozillaZine Knowledge Base



This is quite easy. Use double [[ ]] or single [ ] brackets, depending on whether you are linking to another page within the Knowledge Base or to an external site.

Linking to another Knowledge Base page

  • Put the exact name of the page inside double brackets. Example: [[Rules]] = Rules.
  • If the page name contains two or more separate words, write the words separated by a space rather than connected with an underline. Example: use [[Profile Manager]] and not [[Profile_Manager]] to create Profile Manager.
  • Be careful about capital letters. Example: to link to the Global Inbox article, you need to use [[Global Inbox]] and not [[Global inbox]].
  • Lowercase can be used for the first letter in the page name. Example: “Read the [[rules]] for editing” = “Read the rules for editing”.
  • To use different display text for the link, insert the pipe character "|" followed by the text you want to show for the link. Example: [[Rules | rules for editing]] = rules for editing.
  • Pipe trick: for a page name ending with text in parentheses, if you insert the pipe character "|" without any text following it, the text in parentheses will not be displayed in the link. Examples: [[Filters (Thunderbird)|]] = Filters.
  • It's possible to link to a specific section in a Knowledge Base page using this syntax: [[page name#section name | display text]]. Example: [[In-house style#Commonly used names | Application and OS names]] = Application and OS names. For a section in the current page you can omit the page name. Example: [[#Document structure | Headers and lists]] = Headers and lists. However, be aware that such a link will no longer lead to the specified section if someone edits the target page and changes the section name.

Link to a category within the knowledge base

Linking to a category is very similar to linking to a page, the only change you need to make is to preface the category with a colon. For example, you can add a link to Category:Visual_customizations_(Thunderbird) using [[:Category:Visual_customizations_(Thunderbird)]] .

Linking to an external site

Use the following syntax when linking to a page outside the Knowledge Base.

  • Numbered external links: [] = [1]
  • Named external links: [ Mozilla Home] = Mozilla Home
  • Explicit external links: “visit now” = “visit now”

Note: If you want to include a web address without a link, use the <nowiki> and </nowiki> tags:

  • <nowiki></nowiki> =

Linking to bugzilla

  • Bug numbered reference to a comment: [] = [2]
  • Bug report: ({{bug|404507}}) = (bug 404507)

Note: The braces make use of a special template .

Document structure


Section headers within a page are made by putting two or three equal signs on each side of the desired header text: use "==" for a level 2 header or "===" for a level 3 header. Example: in the "Links" section above, the headers were made by inserting the following:

== Links ==
=== Linking to another Knowledge Base page ===
=== Linking to an external site ===

There are actually six levels of headers that can be created in the same fashion, but most articles in the Knowledge Base use only level 2 and level 3 headers.


Put * or # at the beginning of a line to make an unordered (bulleted) or ordered (numbered) list, respectively. To make a list within a list, use ** or ## instead. Examples:

* list item 1
* list item 2
** list item 2a
** list item 2b
* list item 3

will produce

  • list item 1
  • list item 2
    • list item 2a
    • list item 2b
  • list item 3

Whereas using # instead of * will produce

  1. list item 1
  2. list item 2
    1. list item 2a
    2. list item 2b
  3. list item 3

You can also produce mixed lists, such as a bulleted list within a numbered list. Example:

# list item 1
# list item 2
#* list item 2a
#* list item 2b
# list item 3

will produce

  1. list item 1
  2. list item 2
    • list item 2a
    • list item 2b
  3. list item 3

Indented text

Indenting is used most often in Talk pages. To indent a line, put a : (colon) at the beginning of the line. For example:

:Hello, I am the first indented line.
:I am the next indented line.
::I am a doubly indented line.


Hello, I am the first indented line.
I am the next indented line.
I am a doubly indented line.


Tables are explained on a separate page.

Table of Contents

You can hide the table of contents using __NOTOC__

Character formatting


Although the current style guidelines say that italics and bold should be used as sparingly as possible, there are some situations when you may want to use them. To do so:

  • ''Two single quotes'' = Two single quotes
  • '''Three single quotes''' = Three single quotes
  • '''''Five single quotes''''' = Five single quotes


Code may be entered as monospace lines by beginning each line with a space. For example:

 user_pref("mail.ui.display.dateformat.default", 2);


user_pref("mail.ui.display.dateformat.default", 2);

This will preserve manually inserted spacing within your text, as in this example:

for(int a=0;a<1;a++)

For longer, multiline blocks of code, instead of beginning each line with a space, the preferred way is to enclose the whole block of code in a single set of <pre> tags. Also note that HTML and Wiki-code are still processed in monospace lines.


Though signatures are not used in regular Knowledge Base articles, it helpful if you include your signature when commenting in a Talk page, so that people reading the Talk page later can understand who said what when. To insert your signature:

  • Nickname and date: ~~~~ = Heroist 09:27, 31 Jan 2004 (PST).
  • Nickname only: ~~~ = Heroist.

See also

External links