User:Proteins/Text formatting tutorial

This tutorial introduces you to the many ways of formatting text on Wikipedia.

Boldface text

edit

Boldface text appears mainly in two places on Wikipedia. First, it is customary to mention the article title in the first sentence, and to highlight it in boldface. Synonyms of the article title given in the first sentence are also highlighted in bold. Second, it is customary to use boldface for the volume number of a scholarly journal.

Boldface text is created by enclosing the text in three single quotes. For example, entering '''bold words''' into the edit window will produce bold words once the article is saved. For speed, you can also highlight the text in the editing window and click on the   button in the editing toolbar.

Italic text

edit

Italic text is used in various ways on Wikipedia, consistent with its usage in scholarly literature. Artistic and literary works are italicized, as are foriegn words, along with genus and species names in taxonomy. The full set of usages is described at MOS:ITALICS.

Italic text is created by enclosing the text in two single quotes. For example, entering ''paparazzi'' into the edit window will produce paparazzi once the article is saved. For speed, you can also highlight the text in the editing window and click on the   button in the editing toolbar.

Bold italic text

edit

This type of text formatting occurs rarely, primarily when the article title is the name of an artistic work and should be italicized. Since the article title is typically bolded in the first sentence, it should be both italics and bold. To achieve this effect, simply enclose the text in five single quotes, effectively combining the bold and italics formatting. For example, The Count of Monte Cristo is produced with the code '''''The Count of Monte Cristo'''''.

Indentation

edit

A formatting effect commonly used on talk pages is indentation. Indentation is used to keep track of the different speakers in a conversation, or of the sequence of replies in a conversation. Indentation is done by beginning a new line with one or more colons, depending on the level of indentation. For example,

This illustration of indentation

was produced with the code

:This illustration of indentation.

Superscripts and subscripts

edit

Superscripts and subscripts are commonplace in scientific and mathematical articles.

To create a superscript or a subscript, enclose the text in <sup></sup> or <sub></sub> tags, respectively. For example, the symbol UiVi is created by the code U<sup>i</sup>V<sub>i</sub>. For speed, you can highlight the text to be super- or subscripted in the editing window and click on the   or   button, respectively, in the editing toolbar.

Quotations, poetry and hieroglyphs

edit

Wikipedia has several mechanisms for formatting quotations, but the simplest is to enclose the text in <blockquote></blockquote> tags. For speed, you can highlight the quotation in the editing window and click on the   button in the editing toolbar.

To quote poems, Wikipedia has developed the special tags <poem></poem>.

To quote hieroglyphs, Wikipedia has developed the special tags <hiero></hiero>.

Mathematical equations

edit

Mathematical equations are very important, but rather complex. Wikipedia uses a subset of the LaTeX formatting commands for mathematical expressions. Simply enclose the LaTeX commands between <math alt=""></math> tags. In the alt-text string, provide a description of how the equation would be spoken out loud. for example, you might write

  • <math alt="A squared plus B squared equals C squared">A^{2} + B^{2} = C^{2}</math>

to produce the following

  •  

Stricken comments

edit

It's customary not to delete your talk-page comments, even if you regret them. To unsay something, or to change your mind, it's customary to strike out your words like this. To produce this effect, enclose the text in <s></s> tags. For speed, you can highlight the text in the editing window, and click on the   button in the editing toolbar.

Code text

edit

Sometimes you wish the letters to appear as they do in the editing window. In this case, you may enclose them in <code></code> tags. For example, this text is produced with the code <code>this text</code>.

Preserved text

edit

Sometimes you may want text to appear exactly as you've typed it, down to the spaces and carriage returns. You may do that by enclosing the text in <pre></pre> tags. You may do this more simply by simply leaving a space at the beginning of a new line in Wikipedia.

"Small" text

edit

On rare occasions, usually not on articles, it may be useful to render some text in a small font. This is done similarly to the subscripts, by enclosing the text in <small></small> tags. For illustration, this small text is produced with the code <small>this small text</small>. For speed, you may also highlight the text and click on the   button in the editing toolbar.

Colored text

edit

Again, on rare occasions and I believe never on articles, you may wish to render some text in a different color. This may be done by enclosing the text in <span style="color: ;"></span> tags. For example, this darkgreen text was produced with the code <span style="color:darkgreen;">this darkgreen text</span> code. For this rare type of formatting, there is no button in the editing toolbar.

See also

edit