Jump to content

User:Proteins/Wiki markup: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Proteins (talk | contribs)
→‎Font effects: links to MoS
Proteins (talk | contribs)
→‎Font effects: more description of usage
Line 71: Line 71:
| colspan=4 style="background-color:lightblue;" | Italics are used mainly in references such as ''Journal of Molecular Biology'', in taxonomic names such as ''Vibrio cholerae''. In general, italics should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow [[Wikipedia:Manual_of_Style_(text_formatting)#Italic_face|this link]] to our [[Wikipedia:Manual_of_Style_(text_formatting)|Manual of Style]].
| colspan=4 style="background-color:lightblue;" | Italics are used mainly in references such as ''Journal of Molecular Biology'', in taxonomic names such as ''Vibrio cholerae''. In general, italics should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow [[Wikipedia:Manual_of_Style_(text_formatting)#Italic_face|this link]] to our [[Wikipedia:Manual_of_Style_(text_formatting)|Manual of Style]].
|-
|-
| rowspan=2 | <span id="boldface"></span>'''Bold'''<br />[[Image:Button_bold.png|25px]] || '''text''' || <font color="red"><nowiki>'''</nowiki></font>text<font color="red"><nowiki>'''</nowiki></font> (''3 single quotes'')|| <font color="red">&lt;b&gt;</font>text<font color="red">&lt;/b&gt;</font> || <font color="blue">'''Rare'''</font>
| rowspan=2 | <span id="boldface"></span>'''Bold'''<br />[[Image:Button_bold.png|25px]] || '''text''' || <font color="red"><nowiki>'''</nowiki></font>text<font color="red"><nowiki>'''</nowiki></font> (''3 single quotes'')|| <font color="red">&lt;b&gt;</font>text<font color="red">&lt;/b&gt;</font> || <font color="blue">'''Rare'''</font>, usually once per article
|-
|-
| colspan=4 style="background-color:lightblue;" | Boldface text is generally used only once in an article, to highlight the article topic in the first sentence of the lead. In general, boldface type should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow [[Wikipedia:Manual_of_Style_(text_formatting)#Boldface|this link]] to our [[Wikipedia:Manual_of_Style_(text_formatting)|Manual of Style]].
| colspan=4 style="background-color:lightblue;" | Boldface text is generally used only once in an article, to highlight the article topic in the first sentence of the lead. In general, boldface type should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow [[Wikipedia:Manual_of_Style_(text_formatting)#Boldface|this link]] to our [[Wikipedia:Manual_of_Style_(text_formatting)|Manual of Style]].
|-
|-
| rowspan=2 | <span id="superscript"></span>'''Superscript'''<br /><span id="subscript"></span>'''Subscript'''<br />[[Image:Button_sup_letter.png|25px]][[Image:Button_sub_letter.png|25px]] || a<sup>text</sup><br />b<sub>text</sub> || a<font color="red">&lt;sup&gt;</font>text<font color="red">&lt;/sup&gt;</font> (''enclose in sup tags'')<br />b<font color="red">&lt;sub&gt;</font>text<font color="red">&lt;/sub&gt;</font> (''enclose in sub tags'') || ''identical'' || <font color="blue">'''Rare'''</font>
| rowspan=2 | <span id="superscript"></span>'''Superscript'''<br /><span id="subscript"></span>'''Subscript'''<br />[[Image:Button_sup_letter.png|25px]][[Image:Button_sub_letter.png|25px]] || a<sup>text</sup><br />b<sub>text</sub> || a<font color="red">&lt;sup&gt;</font>text<font color="red">&lt;/sup&gt;</font> (''enclose in sup tags'')<br />b<font color="red">&lt;sub&gt;</font>text<font color="red">&lt;/sub&gt;</font> (''enclose in sub tags'') || ''identical'' || <font color="blue">'''Rare'''</font>, except for math
|-
|-
| colspan=4 style="background-color:lightblue;" | Super- and subscripts are used mainly in mathematical formulae. They are preferable to math mode (see [[#math_mode|below]]) because they do not require [[WP:ALT|ALT text]].
| colspan=4 style="background-color:lightblue;" | Super- and subscripts are used mainly in mathematical formulae. They are preferable to math mode (see [[#math_mode|below]]) because they do not require [[WP:ALT|ALT text]].
Line 81: Line 81:
| rowspan=2 | <span id="strike"></span>'''Strike'''<br />[[Image:Button_strike.png|25px]] || <s>text</s> || <font color="red">&lt;s&gt;</font>text<font color="red">&lt;/s&gt;</font> (''enclose in s tags'') || ''identical'' || <font color="blue">'''Rare'''</font>
| rowspan=2 | <span id="strike"></span>'''Strike'''<br />[[Image:Button_strike.png|25px]] || <s>text</s> || <font color="red">&lt;s&gt;</font>text<font color="red">&lt;/s&gt;</font> (''enclose in s tags'') || ''identical'' || <font color="blue">'''Rare'''</font>
|-
|-
| colspan=4 style="background-color:lightblue;" | Strikethrough text is used mainly when reviewing articles on Wikipedia, to show that a criticism has been satisfied.
| colspan=4 style="background-color:lightblue;" | Strikethrough text is almost never used in articles. It is used on Talk pages mainly when reviewing articles on Wikipedia, to show that a criticism has been satisfied.
|-
|-
| rowspan=2 | <span id="small"></span>'''Small'''<br />[[Image:Button_small_text.png|25px]] || Normal text <small>small text</small> || <font color="red">&lt;small&gt;</font>text<font color="red">&lt;/small&gt;</font> (''enclose in small tags'') || ''identical'' || <font color="blue">'''Rare'''</font>
| rowspan=2 | <span id="small"></span>'''Small'''<br />[[Image:Button_small_text.png|25px]] || Normal text <small>small text</small> || <font color="red">&lt;small&gt;</font>text<font color="red">&lt;/small&gt;</font> (''enclose in small tags'') || ''identical'' || <font color="blue">'''Rare'''</font>
|-
|-
| colspan=4 style="background-color:lightblue;" | Small font is used mainly to indicate that the text describes a minor detail.
| colspan=4 style="background-color:lightblue;" | Small font is almost never used on articles. It is used on Talk pages mainly to indicate that the text describes a minor detail.
|}
|}



Revision as of 15:00, 18 July 2009

Wiki-markup is a set of commands to specify how an article should look. This markup is incorporated into the article; it is invisible to readers, but becomes apparent as soon as you click on the edit this page tag. If you wish to contribute to Wikipedia, it is essential that you learn wiki-markup, at least the basic elements.

The following tables are designed to help you learn wiki-markup. The first two tables present the most basic and commonly used wiki-markup, whereas later tables show wiki-markup of ever greater complexity. All the tables highlight the wiki-markup in red, and show examples of the results. They also describe the customary way these markup commands are used on Wikipedia, with links to the Wikipedia's Manual of Style for more details.

Wiki-markup is a shorthand for HTML markup. It replaces HTML tags with punctuation marks that are very rare in normal text, such as a double square bracket, double equal signs, or double single quotes. If you know HTML tags, learning wiki markup should be relatively easy. The HTMl equivalents are also given in the tables below.

A simpler version of this page can be found at WP:CHEAT ("the cheat sheet").

Article basics

Article basics
Description Example Wiki HTML tag Usage
Paragraphs blank line <p>text</p> Common
Paragraphs are separated by a exactly one blank line. They are the most common, but most invisible, markup.
Wikilinks
DNA [[DNA]] (2 square brackets) <a href="DNA">text</a> Common
Wikilinks (also known as "internal links") are the bread-&-butter of Wikipedia, and part of the reason for its success. They can be used in lieu of a detailed explanation — and to reconcile the need to be accurate yet intelligible to lay-people. If readers wish to know more about the topic, they can click on the link.
Headings
==Section heading== (2 equal signs)
===Subsection heading=== (3 equal signs)
====Subsubsection heading==== (4 equal signs)
<h2>text</h2>
<h3>text</h3>
<h4>text</h4>
Common
Headings are essential for organizing the articles. However, you should never create an H1 heading with one equal sign, e.g., =Subsection heading=.
References
Assertion.[1] Assertion.<ref>Text</ref> none Common
References are essential for Wikipedia's reliability. They are placed after the assertion and any adjacent punctuation, such as a period or comma. They appear as superscripted numbers that link to a "References" section at the end of the article.
Images
Diagram of DNA replication
[[DNA_replication.svg|thumb|left|120px|Diagram of DNA replication]] (2 square brackets + parameters) <img src="DNA_replication.svg" width="120" /> Common
In this example, "thumb" allows for a caption, "left" aligns the image on the left margin, and "120px" sets the width in pixels. The final parameter is the caption.

Talk-page basics

Talk-page basics
Description Example Wiki HTML tag Usage
Signature
Proteins (talk) 13:16, 11 July 2009 (UTC) ~~~~ (4 tildes) none Common
You should append your signature to every Talk-page message you write, to identify yourself as the speaker. However, signatures should never appear in an article.
Indentation Previous sentence.
Indented text.
Previous sentence.
:Indented text (1 colon)
::Doubly indented text (2 colons), etc.
Previous sentence.
<dd>Indented text</dd>
Common
Wikipedians often indent their messages on Talk pages when they reply to another person's message. The colons must be the first characters on a new line. There is no limit to the number of colons (indentation levels); in practice, however, it is rare to see more than 10 levels, since people "outdent" to have more space.
Bulleted list
<nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.

Font effects

A complementary introduction to character formatting can be found here.

Font effects
Description Example Wiki HTML tag Usage
Italics
text ''text'' (2 single quotes) <em>text</em> Rare
Italics are used mainly in references such as Journal of Molecular Biology, in taxonomic names such as Vibrio cholerae. In general, italics should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow this link to our Manual of Style.
Bold
text '''text''' (3 single quotes) <b>text</b> Rare, usually once per article
Boldface text is generally used only once in an article, to highlight the article topic in the first sentence of the lead. In general, boldface type should not be used for emphasis. For more details on the customary usage of italics on Wikipedia, please follow this link to our Manual of Style.
Superscript
Subscript
atext
btext
a<sup>text</sup> (enclose in sup tags)
b<sub>text</sub> (enclose in sub tags)
identical Rare, except for math
Super- and subscripts are used mainly in mathematical formulae. They are preferable to math mode (see below) because they do not require ALT text.
Strike
text <s>text</s> (enclose in s tags) identical Rare
Strikethrough text is almost never used in articles. It is used on Talk pages mainly when reviewing articles on Wikipedia, to show that a criticism has been satisfied.
Small
Normal text small text <small>text</small> (enclose in small tags) identical Rare
Small font is almost never used on articles. It is used on Talk pages mainly to indicate that the text describes a minor detail.
Lists and links
Description Example Wiki HTML tag Usage
Bulleted list
<nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.
Numbered list
<nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.
Definition list
<nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.
External links
<nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.
Section links <nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.
Redirect
#REDIRECT [[Article to which the reader should be redirected]] none Rare
This markup sends the reader directly to another article, or to a specific section of another article. This is useful for synonyms and common misspellings of the main article name, or when the topic has been covered within another article of larger scope.

Multimedia

Multimedia
Description Example Wiki HTML tag Usage
Galleries
blank line <p>text</p> Common
Paragraphs are separated by a exactly one blank line. They are the most common, but most invisible, markup.
Audio blank line <p>text</p> Common
Paragraphs are separated by a exactly one blank line. They are the most common, but most invisible, markup.
Video blank line <p>text</p> Common
Paragraphs are separated by a exactly one blank line. They are the most common, but most invisible, markup.
Imagemaps
Click on imageSouth DerbysDerbyErewashAmber ValleyDerbyshire DalesHigh PeakNorth East Derbys.ChesterfieldBolsoverNottinghamshireLeicestershireStaffordshireSouth YorksManchester
Click on image
blank line <p>text</p> Common
Paragraphs are separated by a exactly one blank line. They are the most common, but most invisible, markup.
Timelines blank line <p>text</p> Common
Paragraphs are separated by a exactly one blank line. They are the most common, but most invisible, markup.

Templates and tables

Complex wiki-markup
Description Example Wiki HTML tag Usage
Templates {{page being transcluded}} (2 curly braces) none Common
Templates are used to include the same material in multiple pages; this is called transcluding. The advantage is that this material is stored only once, but appears on many pages. Thus, a change to the master copy appears immediately on all of the transcluding pages. Templates are often used to establish a common format across many articles.
Tables
Table caption
Heading 1 Heading 2 etc.
Row 1, column 1 Row 1, column 2 etc.
Row 2, column 1 Row 2, column 2 etc.
{| class="wikitable sortable"
|+Table caption
! Heading 1 !! Heading 2 !! etc.
|-
| Row 1, column 1 || Row 1, column 2 || etc.
|+
| Row 2, column 1 || Row 2, column 2 || etc.
|}
none Common
Tables are probably the most difficult wiki-markup to learn.

Miscellany

Miscellaneous wiki-markup
Description Example Wiki HTML tag Usage
No wiki
<nowiki>text with wiki-markup such as [[DNA]]</nowiki> none Rare
To turn off the interpretation of wiki-markup, enclose the text in <nowiki>...</nowiki> tags.
Hidden comment
<!-- Hidden comment --> identical Rare
Hidden comments are visible to editors but not to readers of the article. They're used mainly to explain why certain editorial choice were made. They are also used to dissuade new editors from making common mistakes.
Math mode
<math>\sin\theta = \frac{a}{\sqrt{a^{2} + b^{2}}}</math> none Rare
Beautifully formatted mathematical formulae can be obtained by enclosing LaTeX commands in <math> tags. To make these formulae accessible to visually impaired readers, the math tag should have ALT text enclosed in double quotes, e.g., <math alt="The sine of theta equals a divided by the square root of a squared plus b squared.">\sin\theta = \frac{a}{\sqrt{a^{2} + b^{2}}}</math>.
Footnotes Assertion.[note 1] Assertion.<ref group=note>Explanatory text.</ref> none Common
Footnotes are not citations to the scholarly literature, but rather explanatory notes that would otherwise interrupt the flow of the writing. Similar to references, they are placed after the assertion being clarified and any adjacent punctuation, such as a period or comma. They appear as superscripted numbers that link to a "Footnotes" section at the end of the article.

Special text formatting

Special text formatting
Description Example Wiki HTML tag Usage
Blockquotes
blank line <p>text</p> Common
Blockquotes are used for long quotations
Preformatted initial space on line, or enclose in pre HTML tags <pre>text</pre> Common
Preformatted text is sometimes used for computer program listings, and the like.
Poem initial space on line, or enclose in pre HTML tags <poem>text</poem> Common
Tags used for poetry.

Deprecated

Although wiki-markup allows for them, these HTML elements should not be used on Wikipedia.

Deprecated wiki-markup
Description Example Wiki HTML tag Usage
H1 headings =H1 heading= (1 equal sign) <h1>text</h1> NEVER
H1 headings should never be used on Wikipedia because the article name at the top of the page is the H1 heading.
Horizontal rule ---- (4 hyphens) <hr> NEVER
Horizontal rules should never be used on Wikipedia.

Footnotes

  1. ^ Explanatory text.

References

  1. ^ Text