Difference between revisions of "Help:Tables"

From Nookipedia, the Animal Crossing wiki
(Revamping page)
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This article is all about using '''tables''' on '''Animal Crossing Wiki'''. It will teach you how to create tables in various articles.
+
{{Help}}
 +
This article details the use of '''tables on Nookipedia'''. Typically the code for a table is formatted and stored on a [https://nookipedia.com/wiki/Special:PrefixIndex?prefix=&namespace=10 template page], and then this code is called using the proper template call. These templates can be found at [[:Category:Table templates]]. Some articles do include Wikitext table code within the page itself, however.
  
==Creating Tables==
+
As of right now, Nookipedia does not have a standard way of generating or formatting tables and implementation tends to vary from article to article. As [[Nookipedia:Project Database|Project Database]] moves forward, a standard procedure may be developed and if so will be noted on this page.
To create a table you first need to begin with <code>{|</code> and end with <code>|}</code>. An example is below
 
  
<table cellspacing="0" border="1">
+
==Creating tables==
<tr>
+
All tables begin with <code>{|</code> and end with <code>|}</code>. For example:
<th style="width:50%">You type
+
 
</th><th style="width:50%">You get
+
{| style="width:100%; text-align:center;" class=wikitable
</th></tr>
+
|-
<tr>
+
! style="width:50%" | You type
<td>
+
! style="width:50%" | You get
 +
|-
 +
| style="text-align:left;"|
 
<pre>
 
<pre>
{|
+
{| style="font-size:125%"
 
! Item
 
! Item
 
! Amount
 
! Amount
 
! Cost
 
! Cost
 
|-
 
|-
|Orange
+
| Bread
|10
+
| x4
|7.00
+
| 3.00
 
|-
 
|-
|Bread
+
| Butter
|4
+
| x1
|3.00
+
| 5.00
|-
+
|- style="text-decoration:underline"
|Butter
+
! Total
|1
 
|5.00
 
|-
 
!Total
 
 
|
 
|
|15.00
+
| style="font-weight:bold" | 8.00
 
|}
 
|}
 
</pre>
 
</pre>
</td><td>
+
|
{|
+
<div style="display:inline-block;">
 +
{| style="font-size:125%"
 
! Item
 
! Item
 
! Amount
 
! Amount
 
! Cost
 
! Cost
 
|-
 
|-
|Orange
+
| Bread
|10
+
| x4
|7.00
+
| 3.00
|-
 
|Bread
 
|4
 
|3.00
 
|-
 
|Butter
 
|1
 
|5.00
 
 
|-
 
|-
 +
| Butter
 +
| x1
 +
| 5.00
 +
|- style="text-decoration:underline"
 
! Total
 
! Total
 
|
 
|
|15.00
+
| style="font-weight:bold" | 8.00
 +
|}</div>
 
|}
 
|}
</td></tr></table>
+
 
<p>As you can see, each new line starting with <code>|</code> is a new cell and <code>|-</code> is a new row.  Using <code>!</code> instead of <code>|</code> to start a line creates bold, centered text. Both HTML and CSS can be used in tables for borders, etc.
+
Each new line starts with the a pipe character <code>|</code> which creates a new cell. A line with with a pipe-dash <code>|-</code> creates a new row.  Using <code>!</code> instead of <code>|</code> to start a line creates bold, centered text. Note that these symbols will only generate a table if they are placed at the beginning of a line.
</p><p><br />
+
 
</p>
+
CSS can be used style tables, rows, and cells. An example can be seen in the above table where <code>style="font-size:125%"</code> is added after the opening table tag to style the entire table. <code>style="text-decoration:underline"</code> is added after a new row tag to style that specific row. A method to style an existing cell can be seen in the bottom right cell where the total of 15.00 is bolded by using the code <code>style="font-weight:bold"</code>.
 +
 
 +
==Resources==
 +
*[http://en.wikibooks.org/wiki/Editing_Wikitext/Tables Editing Wikitext/Tables] - Extensive guide to generating tables using wikitext.
 +
*[http://www.mediawiki.org/wiki/Help:Tables Help:Tables] - Abbreviated guide to table creation.
 +
<br clear=all>
 +
{{nookipedia}}
 +
[[Category:Help]]

Revision as of 17:05, December 1, 2019

This article details the use of tables on Nookipedia. Typically the code for a table is formatted and stored on a template page, and then this code is called using the proper template call. These templates can be found at Category:Table templates. Some articles do include Wikitext table code within the page itself, however.

As of right now, Nookipedia does not have a standard way of generating or formatting tables and implementation tends to vary from article to article. As Project Database moves forward, a standard procedure may be developed and if so will be noted on this page.

Creating tables

All tables begin with {| and end with |}. For example:

You type You get
{| style="font-size:125%"
! Item
! Amount
! Cost
|-
| Bread
| x4
| 3.00
|-
| Butter
| x1
| 5.00
|- style="text-decoration:underline"
! Total
|
| style="font-weight:bold" | 8.00
|}
Item Amount Cost
Bread x4 3.00
Butter x1 5.00
Total 8.00

Each new line starts with the a pipe character | which creates a new cell. A line with with a pipe-dash |- creates a new row. Using ! instead of | to start a line creates bold, centered text. Note that these symbols will only generate a table if they are placed at the beginning of a line.

CSS can be used style tables, rows, and cells. An example can be seen in the above table where style="font-size:125%" is added after the opening table tag to style the entire table. style="text-decoration:underline" is added after a new row tag to style that specific row. A method to style an existing cell can be seen in the bottom right cell where the total of 15.00 is bolded by using the code style="font-weight:bold".

Resources