Help:Ignoring Formatting

Overview
Sometimes there is value in displaying the underlying code so that others can learn how to edit pages.

This is called ignoring formatting.

There are 3 ways to ignore the formatting:
 * 1) Surrond the text with the words text
 * 2) Put a space in front of the text
 * 3) Use the editing toolbox to highlight the words and use the 9th button from the left (a w with a red line through it

Using &lt;nowiki&gt; Tags
Wiki formatting can be ignored by using the  and   tags. This is particularly handy when writing tutorials on how to use wikimarkup and templates. Examples of the former use can be seen throughout the Editing Help Area. The quick button for inserting non-wikiformatted text is above the edit box, third button from the right.

Here is an example of a normal wiki table that has simply been surrounded by the  tags:

(Note: normally, any excerpt of code should really be surrounded with the  tags, the   tags, or with leading spaces to match W3C convention. The above example was not due to it being a literal representation of what a naked table would look like.)

When you click on "edit", the above looks like this:

&lt;nowiki&gt; &lt;/nowiki&gt;

Without the  tags, the above wikimarkup will normally produce a bordered table with a grey background color:

It should be noted that many people are using a leading space in combination with the  tags. This is inefficient. The  tags should be used instead.

Using &lt;pre&gt; Tags
Note that even surrounded by  tags, the output text for the table still got mushed onto one line. By default, the wiki ignores line breaks and repeated whitespace. In order to preserve your original line breaks and tabs, you need to use tags to inform the wiki that your material is pre-formatted. If you surround your poem with  and , the wiki will respect your use of whitespace.

Using the  tag stops the wiki from altering the layout (line breaks and whitespace). In addition, the  tag blocks wiki markup. The &lt;pre&gt; tag will also place your text inside a grey box with a dashed blue outline.

For example, the following code in the edit window:

&lt;pre&gt; You smash at the barricade. It creaks. ... and again. ... and again. ... and again. ... and again. You are out of IP hits. &lt;/pre&gt;

comes out as:

You smash at the barricade. It creaks. ... and again. ... and again. ... and again. ... and again. You are out of IP hits.

Markup symbols and links contained inside the  tags are ignored -- the code inside the blue-dashed box below looks exactly like the same as it appears in the edit window:

Markup symbols and links contained inside a pre-formatted box using the tags are ... completely ignored.

Using Leading Space
In order to preserve line breaks and whitespace while still using wiki markup, put a space in front of each line of the block of text. Any series of one or more lines that each begin with a space will be placed inside a blue-dashed box. The layout and whitespace seen in the editing window will be preserved, while all the wiki markup (such as bold, italics, signatures, and links) will be interpreted normally.

For example, the following code in the edit window:

This line doesn't have   leading space. Whitespace is ignored. This line does have     leading space. Whitespace is preserved. The following lines (including the next one) begin with a space. Text can be formatted and you can have links. (Last changed: )

will produce:

This line doesn't have   leading space. Whitespace is ignored. This line does have     leading space. Whitespace is preserved. The following lines (including the next one) begin with a space. Text can be formatted and you can have links. (Last changed: 19:11, 14 April 2006 (BST))