Editing
Help:List
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<div style="float:right;">__TOC__</div> This help page explains how to create and edit lists on the Brighter Shores wiki. ==List basics== There are three basic types of lists: '''ordered lists''', '''unordered lists''', and '''definition lists'''. In the following sections, ordered lists are used for examples. Unordered lists would give corresponding results. {|class="wikitable" ! Wikitext !! Rendering |- |<pre> * Lists are easy to do: ** start every line * with a star ** more stars mean *** deeper levels</pre> || * Lists are easy to do: ** start every line * with a star ** more stars mean *** deeper levels |- |<pre> * A newline * in a list marks the end of the list. Of course * you can * start again.</pre> | * A newline * in a list marks the end of the list. Of course * you can * start again. |- |<pre> # Numbered lists are good ## very organized ## easy to follow</pre> | # Numbered lists are good ## very organized ## easy to follow |- |<pre> * You can also ** break lines ** like this</pre> | * You can also **break lines **like this |- |<pre> ; Definition lists ; item : definition ; semicolon plus term : colon plus definition</pre> | ; Definition lists ; item : definition ; semicolon plus term : colon plus definition |- |<pre> ; Mixed definition lists ; item 1 : definition :; sub-item 1 plus term :: two colons plus definition :; sub-item 2 : colon plus definition ; item 2 : back to the main list</pre> | ; Mixed definition lists ; item 1 : definition :; sub-item 1 plus term :: two colons plus definition :; sub-item 2 : colon plus definition ; item 2 : back to the main list |- |<pre> * Or create mixed lists *# and nest them *#* like this *#*; definitions *#*: work: *#*; apple *#*; banana *#*: fruits</pre> | * Or create mixed lists *# and nest them *#* like this *#*; definitions *#*: work: *#*; apple *#*; banana *#*: fruits |} ==Paragraphs in lists== For simplicity, list items in wiki markup cannot be longer than a paragraph. A following blank line will end the list and reset the counter on ordered lists. Separating unordered list items usually has no noticeable effects. Paragraphs can be forced in lists by using HTML tags. Two line break symbols, <code><nowiki><br /><br /></nowiki></code>, will create the desired effect. So will enclosing all but the first paragraph with <code><nowiki><p>...</p></nowiki></code>. For a list with items of more than one paragraph long, adding a blank line between items may be necessary to avoid confusion. ==Continuing a list item after a sub-item== In HTML, a list item may contain several sublists, not necessarily adjacent; thus there may be parts of the list item not only before the first sublist, but also between sublists, and after the last one. However, in wiki-syntax, sublists follow the same rules as sections of a page: the only possible part of the list item not in sublists is before the first sublist. In the case of an unnumbered first-level list in wikitext code this limitation can be overcome by splitting the list into multiple lists; indented text between the partial lists may visually serve as part of a list item after a sublist; however, this may give, depending on CSS, a blank line before and after each list, in which case, for uniformity, every first-level list item could be made a separate list. Numbered lists illustrate that what should look like one list may, for the software, consist of multiple lists; unnumbered lists give a corresponding result, except that the problem of restarting with 1 is not applicable. {| style="border:1px;border-spacing:1px;" class="wikitable sortable" cellpadding="5" |- style="" | <pre><ol> <li><translate><!--T:28--> list item</translate> A1 <ol> <li><translate><!--T:29--> list item</translate> B1</li> <li><translate><!--T:30--> list item</translate> B2</li> </ol><translate><!--T:31--> continuing list item</translate> A1 </li> <li><translate><!--T:32--> list item</translate> A2</li> </ol></pre> | <ol> <li> list item A1 <ol> <li>list item B1</li> <li>list item B2</li> </ol>continuing list item A1 </li> <li>list item A2</li> </ol> |- style="font-weight:bold;text-align:center;" | colspan="2" | vs. |- style="" |<pre> #list item A1 ##list item B1 ##list item B2 #:continuing list item A1 #list item A2</pre> | #list item A1 ##list item B1 ##list item B2 #:continuing list item A1 #list item A2 |} One level deeper, with a sublist item continuing after a sub-sublist, one gets even more blank lines; however, the continuation of the first-level list is not affected: <pre> #list item A1 ##list item B1 ###list item C1 ##:continuing list item B1 ##list item B2 #list item A2 </pre> gives #list item A1 ##list item B1 ###list item C1 ##:continuing list item B1 ##list item B2 #list item A2 It is possible to embed unnumbered bullets inside enclosing numbered items: <pre> # list item A #* nested bullet A1 #* nested bullet A2 # continuing list item B #* nested bullet B1 #* nested bullet B2 </pre> gives # list item A #* nested bullet A1 #* nested bullet A2 # continuing list item B #* nested bullet B1 #* nested bullet B2 ==Changing the list type== The list type (which type of marker appears before the list item) can be changed in CSS by setting the [http://www.w3.org/TR/REC-CSS2/generate.html#lists list-style-type] property: {|class="wikitable" ! Wikitext !! Rendering |- | <pre><ol style="list-style-type:lower-roman"> <li>About the author</li> <li>Foreword to the first edition</li> <li>Foreword to the second edition></li> </ol></pre> |<ol style="list-style-type:lower-roman"> <li>About the author</li> <li>Foreword to the first edition</li> <li>Foreword to the second edition</li> </ol> |- | <pre><ol style="list-style-type:lower-alpha"> <li>About the author</li> <li>Foreword to the first edition</li> <li>Foreword to the second edition</li> </ol></pre> |<ol style="list-style-type:lower-alpha"> <li>About the author</li> <li>Foreword to the first edition</li> <li>Foreword to the second edition</li> </ol> |} ==Extra indentation of lists== In a numbered list in a large font, some browsers do not show more than two digits, unless extra indentation is applied (if there are multiple columns: for each column). This can be done with CSS: <pre>ol { margin-left: 2cm}</pre> or alternatively, like below. {|class="wikitable" ! Wikitext !! Rendering ! style="width: 40%" |Comments |- | <pre> :# abc :# def :# ghi </pre> | :# abc :# def :# ghi | A list of one or more lines starting with a colon creates a [http://www.w3.org/TR/html4/struct/lists.html#edef-DL definition list] without definition terms, and with the items as definition descriptions, hence indented. However, if the colons are in front of the codes "*" or "#" of an unordered or ordered list, the list is treated as one definition description, so the whole list is indented. |- | <pre> <ul> <ol> <li>abc</li> <li>def</li> <li>ghi</li> </ol> </ul> </pre> | <ul> <ol> <li>abc</li> <li>def</li> <li>ghi</li> </ol> </ul> | MediaWiki translates an unordered list (ul) without any list items (li) into a div with a <code>style="margin-left: 2em"</code>, causing indentation of the contents. This is '''the most versatile method''', as it allows starting with a number other than 1, see below. |- | <pre> <ul> # abc # def # ghi </ul> </pre> | <ul> # abc # def # ghi </ul> | Like above, with the content of the "unordered list without any list items", which itself is an ordered list, expressed with # codes. The HTML produced, and hence the rendering, is the same. This is the '''recommended''' method when starting the list at 1. |} ==Specifying a starting value== Specifying a starting value is possible with HTML syntax. {| style="width:100%" | style="width: 50%" | <pre> <ol start="9"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol> </pre> | <ol start="9"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol> |} Or: {| style="width:100%" | style="width: 50%" | <pre> <ol> <li value="9">Amsterdam</li> <li value="8">Rotterdam</li> <li value="7">The Hague</li> </ol> </pre> | <ol> <li value="9">Amsterdam</li> <li value="8">Rotterdam</li> <li value="7">The Hague</li> </ol> |} ==Comparison with a table== Apart from providing automatic numbering, the numbered list also aligns the contents of the items, comparable with using table syntax: <pre> {| |- | align=right | 9.|| Amsterdam |- | align=right | 10.|| Rotterdam |- | align=right | 11.|| The Hague |} </pre> gives: {| |- | align=right | 9.|| Amsterdam |- | align=right | 10.|| Rotterdam |- | align=right | 11.|| The Hague |} This non-automatic numbering has the advantage that if a text refers to the numbers, insertion or deletion of an item does not disturb the correspondence. ==Multi-column lists== === Multi-column bulleted list === <pre> <div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> * apple * carpet * geography * mountain * nowhere * postage * ragged * toast </div> </pre> gives: <div style="column-count:2;-moz-column-count:2;-webkit-column-count:2"> * apple * carpet * geography * mountain * nowhere * postage * ragged * toast </div> <pre> <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * apple * carpet * geography * mountain * nowhere * postage * ragged * toast </div> </pre> gives: <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * apple * carpet * geography * mountain * nowhere * postage * ragged * toast </div> ===Multi-column numbered list=== <pre> <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> # apple # carpet # geography # mountain # nowhere # postage # ragged # toast </div> </pre> gives: <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> # apple # carpet # geography # mountain # nowhere # postage # ragged # toast </div> Below a starting value is specified, with HTML-syntax (for the first column either wiki-syntax or HTML-syntax can be used). In combination with the extra indentation explained in the previous section: <pre> {| valign="top" |- |<ul><ol start="125"><li>a<li>bb<li>ccc</ol></ul> |<ul><ol start="128"><li>ddd<li>ee<li>f</ol></ul> |} </pre> gives: {| valign="top" |- |<ul><ol start="125"><li>a<li>bb<li>ccc</ol></ul> |<ul><ol start="128"><li>ddd<li>ee<li>f</ol></ul> |} ==Streamlined style or horizontal style== It is also possible to present short lists using very basic formatting, such as: <pre>''Title of list:'' example 1, example 2, example 3</pre> ''Title of list:'' example 1, example 2, example 3 This style requires less space on the page, and is preferred if there are only a few entries in the list, it can be read easily, and a direct edit point is not required. The list items should start with a lowercase letter unless they are proper nouns. ==Tables== A one-column table is very similar to a list, but it allows sorting. If the wikitext itself is already sorted with the same sortkey, this advantage does not apply. A multiple-column table allows sorting on any column. See also: [[wikipedia:en:When to use tables|When to use tables]] ==Changing unordered lists to ordered ones== With the CSS: <pre>ul { list-style: decimal }</pre> unordered lists are changed to ordered ones. This applies (as far as the CSS selector does not restrict this) to all ul-lists in the HTML source code: * those produced with * * those with <nowiki><ul></nowiki> in the wikitext * those produced by the system Since each special page, like other pages, has a class based on the pagename, one can separately specify for each type whether the lists should be ordered, see [[Help:Customising skins]]. Use: <code>body.page-Special_Contributions ul { list-style: decimal }</code> for [[Special:Contributions]] and <code>body.mw-special-Whatlinkshere ul { list-style: decimal }</code> for [[Special:Whatlinkshere]]. However, it does not seem possible to make all page history lists ordered (unless one makes all lists ordered), because the class name is based on the page for which the history is viewed. ==See also== * [[mw:Help:Lists|Help:Lists]] on MediaWiki * [[wikipedia:Help:List|Help:List]] on wikipedia {{Help}}
Summary:
Please note that all contributions to Brighter Shores Wiki are considered to be released under the CC BY-NC-SA 3.0 (see
Brighter Shores:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Help
(
edit
)
Template:Navbox
(
edit
)
Module:Navbox
(
edit
)
Module:Tnavbar
(
view source
) (semi-protected)
Module:Yesno
(
view source
) (semi-protected)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Help page
Discussion
British English
Views
Read
Edit source
View history
More
Refresh
Search
Discord
Discord
Navigation
About us
User help
Random page
Recent changes
Enchantress Shop
3m
ago
-
[anonymous]
Sickening Sewer Fiend
3m
ago
-
Zilenz
Alchemist
9m
ago
-
Fyri
Pufferfish
12m
ago
-
Trigerman8
Show more...
Brighter Shores
Professions
Factions
Episodes
Premium Pass
Monsters
Quests
Community
Policies
Tools
What links here
Related changes
Special pages
Page information