Difference between revisions of "Lists"
From IMSMA Wiki
(Created page with "__NOTOC__ == General rules == * Do not use lists if text is read easily as plain paragraphs. * Use proper wikimarkup. * Do not leave blank lines between items in a bulleted or...") |
|||
Line 10: | Line 10: | ||
* Use the same grammatical form for all elements in a list, and do not mix sentences and sentence fragments as elements. | * Use the same grammatical form for all elements in a list, and do not mix sentences and sentence fragments as elements. | ||
* When the elements are complete sentences, each one is formatted with sentence case (its first letter is capitalized) and a final period (full stop). | * When the elements are complete sentences, each one is formatted with sentence case (its first letter is capitalized) and a final period (full stop). | ||
+ | |||
+ | === Bulleted lists === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+Good example | ||
+ | ! scope="col" | Wikitext | ||
+ | ! scope="col" | HTML | ||
+ | ! scope="col" | Appearance | ||
+ | |- style="vertical-align:top;" | ||
+ | | <pre style="margin:0px;"> | ||
+ | == Title of list == | ||
+ | * Example 1 | ||
+ | * Example 2 | ||
+ | * Example 3 | ||
+ | </pre> | ||
+ | | <syntaxhighlight lang="html4strict" enclose="pre"> | ||
+ | <p><a name="Title_of_list" id="Title_of_list"></a></p> | ||
+ | <h2><span class="mw-headline">Title of list</span></h2> | ||
+ | <ul> | ||
+ | <li>Example 1</li> | ||
+ | <li>Example 2</li> | ||
+ | <li>Example 3</li> | ||
+ | </ul> | ||
+ | </syntaxhighlight> | ||
+ | | style="white-space:nowrap; padding:1em;" | <div style="padding-top:0.5em; padding-bottom:0.17em; border-bottom:1px solid #aaa; font-size:150%; margin-bottom:0.6em;"> Title of list </div> | ||
+ | * Example 1 | ||
+ | * Example 2 | ||
+ | * Example 3 | ||
+ | |} | ||
+ | As a matter of style, list items should be formatted consistently in either sentence case or lower case. They should not have final punctuation unless they consist of complete sentences. | ||
+ | |||
+ | In particular, '''do not double-space the lines of the list''' by leaving blank lines or extra HTML <nowiki><br></nowiki> tags after them, as in this example: | ||
+ | {| class="wikitable" | ||
+ | |+Bad example | ||
+ | ! scope="col" | Wikitext | ||
+ | ! scope="col" | HTML | ||
+ | ! scope="col" | Appearance | ||
+ | |- style="vertical-align:top;" | ||
+ | | <pre style="margin:0px;"> | ||
+ | == Title of list == | ||
+ | * Example 1 | ||
+ | |||
+ | * Example 2 | ||
+ | |||
+ | * Example 3 | ||
+ | </pre> | ||
+ | | <syntaxhighlight lang="html4strict" enclose="pre"> | ||
+ | <p><a name="Title_of_list" id="Title_of_list"></a></p> | ||
+ | <h2><span class="mw-headline">Title of list</span></h2> | ||
+ | <ul> | ||
+ | <li>Example 1</li> | ||
+ | </ul> | ||
+ | <ul> | ||
+ | <li>Example 2</li> | ||
+ | </ul> | ||
+ | <ul> | ||
+ | <li>Example 3</li> | ||
+ | </ul> | ||
+ | </syntaxhighlight> | ||
+ | | style="white-space:nowrap; padding:1em;" | <div style="padding-top:0.5em; padding-bottom:0.17em; border-bottom:1px solid #aaa; font-size:150%; margin-bottom:0.6em;"> Title of list </div> | ||
+ | * Example 1 | ||
+ | |||
+ | * Example 2 | ||
+ | |||
+ | * Example 3 | ||
+ | |} | ||
+ | |||
+ | {| class="infobox wikitable" style="margin-left:1em;" | ||
+ | |- | ||
+ | ! style="background:#bfffbf;" | A | ||
+ | | <pre style="margin:0px; background:#cfffcf;"> | ||
+ | [[File:Example.jpg|thumb|Caption text]] | ||
+ | * Example 1 | ||
+ | * Example 2 | ||
+ | * Example 3 | ||
+ | * Example 4 | ||
+ | </pre> | ||
+ | |- | ||
+ | ! style="background:#ffbfbf;" | B | ||
+ | | <pre style="margin:0px; background:#ffcfcf;"> | ||
+ | * Example 1 | ||
+ | * Example 2 | ||
+ | [[File:Example.jpg|thumb|Caption text]] | ||
+ | * Example 3 | ||
+ | * Example 4 | ||
+ | </pre> | ||
+ | |- | ||
+ | ! style="background:#bfffbf;" | C | ||
+ | | <pre style="margin:0px; background:#cfffcf;"> | ||
+ | * Example 1 | ||
+ | * Example 2 | ||
+ | * [[File:Example.jpg|thumb|Caption text]] Example 3 | ||
+ | * Example 4 | ||
+ | </pre> | ||
+ | |} |
Revision as of 15:48, 30 August 2013
General rules
- Do not use lists if text is read easily as plain paragraphs.
- Use proper wikimarkup.
- Do not leave blank lines between items in a bulleted or numbered list unless there is a reason to do so, since this causes the Wiki software to interpret each item as beginning a new list.
- Use numbers rather than bullets only if:
- a need to refer to the elements by number may arise;
- the sequence of the items is critical; or
- the numbering has some independent meaning.
- Use the same grammatical form for all elements in a list, and do not mix sentences and sentence fragments as elements.
- When the elements are complete sentences, each one is formatted with sentence case (its first letter is capitalized) and a final period (full stop).
Bulleted lists
Wikitext | HTML | Appearance |
---|---|---|
== Title of list == * Example 1 * Example 2 * Example 3 |
<syntaxhighlight lang="html4strict" enclose="pre">
<a name="Title_of_list" id="Title_of_list"></a> Title of list
</syntaxhighlight> |
Title of list
|
As a matter of style, list items should be formatted consistently in either sentence case or lower case. They should not have final punctuation unless they consist of complete sentences.
In particular, do not double-space the lines of the list by leaving blank lines or extra HTML <br> tags after them, as in this example:
Wikitext | HTML | Appearance |
---|---|---|
== Title of list == * Example 1 * Example 2 * Example 3 |
<syntaxhighlight lang="html4strict" enclose="pre">
<a name="Title_of_list" id="Title_of_list"></a> Title of list
</syntaxhighlight> |
Title of list
|
A | [[File:Example.jpg|thumb|Caption text]] * Example 1 * Example 2 * Example 3 * Example 4 |
---|---|
B | * Example 1 * Example 2 [[File:Example.jpg|thumb|Caption text]] * Example 3 * Example 4 |
C | * Example 1 * Example 2 * [[File:Example.jpg|thumb|Caption text]] Example 3 * Example 4 |