{{Short description|Arrangement of information or data, typically in rows and columns}} [[File:Table-sample-appearance-default-params-values-01.gif|thumb|An example table rendered in a web browser using HTML]] A '''table''' is an arrangement of information or data, typically in rows and columns, or possibly in a more complex structure. Tables are widely used in communication, research, and data analysis. Tables appear in print media, handwritten notes, computer software, architectural ornamentation, traffic signs, and many other places. The precise conventions and terminology for describing tables vary depending on the context. Further, tables differ significantly in variety, structure, flexibility, notation, representation and use.<ref name="Fink000">{{cite book | last = Fink | first = Arlene | title = How to Conduct Surveys | publisher = Sage Publications | location = Thousand Oaks | year = 2005 | isbn = 1-4129-1423-X }} </ref><ref name="Mcnabb000">{{cite book | last = McNabb | first = David | title = Research Methods in Public Administration and Nonprofit Management | publisher = M.E. Sharpe | location = Armonk | year = 2002 | isbn = 0-7656-0957-6 }} </ref><ref name="Morgan000">{{cite book | last = Morgan | first = George | title = Spss for Introductory Statistics | publisher = Lawrence Erlbaum | location = Hillsdale | year = 2004 | isbn = 0-8058-4789-8 | url-access = registration | url = https://archive.org/details/spssforintroduct0000unse }} </ref><ref name="Robey000">{{cite book | last = Robey | first = David | title = Sound and Structure in the Divine Comedy | publisher = Oxford University Press | location = Oxford Oxfordshire | year = 2000 | isbn = 0-19-818498-0 }} </ref><ref name="Zielinski000">{{cite book | last = Zielinski | first = Krzysztof | title = Software Engineering: Evolution and Emerging Technologies | publisher = IOS Press | location = Amsterdam | year = 2006 | isbn = 1-58603-559-2 }}</ref> Information or data conveyed in table form is said to be in '''tabular''' format (adjective). In books and technical articles, tables are typically presented apart from the main text in numbered and captioned floating blocks.

A '''table cell''' is one grouping within a chart table used for storing information or data. Cells are grouped horizontally (rows of cells) and vertically (columns of cells). Each cell contains information relating to the combination of the row and column headings it is collinear with.

== Basic description == A table consists of an ordered arrangement of '''rows''' and '''columns'''. This is a simplified description of the most basic kind of table. Certain considerations follow from this simplified description:

* the term '''row''' has several common synonyms (e.g., record, k-tuple, n-tuple, vector); * the term '''column''' has several common synonyms (e.g., field, parameter, property, attribute, stanchion); * a column is usually identified by a name; * a column name can consist of a word, phrase or a numerical index; * the intersection of a row and a column is called a cell.

The elements of a table may be grouped, segmented, or arranged in many different ways, and even nested recursively. Additionally, a table may include metadata, annotations, a header,<ref name="header">see e.g., Page header or Header (computing)</ref> a footer or other ancillary features.<ref name="Zielinski000" />

=== Simple table === The following illustrates a simple table with four columns and nine rows. The first row is not counted, because it is only used to display the column names. This is called a "header row". {{table alignment}} {| class="wikitable col1left col2left" style="text-align:center" |+Age table |- ! First name !! Last name !! Age !! Gender |- | Tinu || Elejogun || 14 || F |- | Javier || Zapata || 28 || M |- | Lily || McGarrett || 18 || F |- | Olatunkbo || Chijiaku || 22 || M |- | Adrienne || Anthoula || 22 || M |- | Axelia || Athanasios || 22 || M |- | Jon-Kabat || Zinn || 22 || M |- | Thabang || Mosoa || 15 || F |- | Rhian || Ellis || 12 || M |- |}

=== Multi-dimensional table === thumb|An example of a table containing rows with summary information. The summary information consists of subtotals that are combined from previous rows within the same column.

The concept of '''dimension''' is also a part of basic terminology.<ref>The concept of "dimension" is often applied to tables in different contexts and with different meanings. For example, what is described as a "Simple Table" in this article is alternatively described as a "two dimensional array". This is distinct from "multi-dimensional table" as presented in this article.</ref> Any "simple" table can be represented as a "multi-dimensional" table by normalizing the data values into ordered hierarchies. A common example of such a table is a multiplication table.

{| class="wikitable" style="text-align:center" |+ style="white-space:nowrap" |Multiplication table |- !×!! 1 !! 2 !! 3 |- ! 1 | 1 || 2 || 3 |- ! 2 | 2 || 4 || 6 |- ! 3 | 3 || 6 || 9 |}

In multi-dimensional tables, each cell in the body of the table (and the value of that cell) relates to the values at the beginnings of the column (i.e. the header), the row, and other structures in more complex tables. This is an injective relation: each combination of the values of the headers row (row 0, for lack of a better term) and the headers column (column 0 for lack of a better term) is related to a unique cell in the table:

* Column 1 and row 1 will only correspond to cell (1,1); * Column 1 and row 2 will only correspond to cell (2,1) etc.

The first column often presents information dimension description by which the rest of the table is navigated. This column is called "stub column". Tables may contain three or multiple dimensions and can be classified by the number of dimensions. Multi-dimensional tables may have super-rows - rows that describe additional dimensions for the rows that are presented below that row and are usually grouped in a tree-like structure. This structure is typically visually presented with an appropriate number of white spaces in front of each stub's label.<ref>{{cite book | vauthors = Milosevic N, Gregson C, Hernandez R, Nenadic G | chapter = Disentangling the Structure of Tables in Scientific Literature | title = Proceedings of 21st International Conference on Applications of Natural Language to Information Systems (NLDB 2016) | series = Lecture Notes in Computer Science | pages = 162–174 | date = June 2016 | volume = 9612 | doi = 10.1007/978-3-319-41754-7_14| isbn = 978-3-319-41753-0 | s2cid = 19538141 | chapter-url = https://www.research.manchester.ac.uk/portal/files/41051279/Disentangling_the_Structure_of_Tables_in_Scientific_Literature.pdf }}</ref>

In literature tables often present numerical values, cumulative statistics, categorical values, and at times parallel descriptions in form of text.<ref>{{cite journal | vauthors = Milosevic N, Gregson C, Hernandez R, Nenadic G | title = A framework for information extraction from tables in biomedical literature | journal = International Journal on Document Analysis and Recognition | volume = 22 | issue = 1 | pages = 55–78 | date = February 2019 | doi = 10.1007/s10032-019-00317-0 | arxiv = 1902.10031 | s2cid = 62880746 }}</ref> They can condense large amount of information to a limited space and therefore they are popular in scientific literature in many fields of study. [[File:Philosophical_Transactions_-_Volume_001.djvu|thumb|right|page=60|Adrien Auzout's "A TABLE of the Apertures of Object-Glasses" from a 1665 article in ''Philosophical Transactions'']]

==Generic representation== As a communication tool, a table allows a form of generalization of information from an unlimited number of different social or scientific contexts. It provides a familiar way to convey information that might otherwise not be obvious or readily understood.

For example, in the following diagram, two alternate representations of the same information are presented side by side. On the left is the NFPA 704 standard "fire diamond" with example values indicated and on the right is a simple table displaying the same values, along with additional information. Both representations convey essentially the same information, but the tabular representation is arguably more comprehensible to someone who is not familiar with the NFPA 704 standard. The tabular representation may not, however, be ideal for every circumstance (for example because of space limitations, or safety reasons). {| class="wikitable" style="margin-left:auto; margin-right:auto; text-align:center;" |+Fire diamond |- ! Standard Representation ! Tabular Representation |- | style="text-align:center;" |{{NFPA 704 diamond | H= 3 | F= 2 | R= 1}} | {| class="wikitable" style="text-align: center" |- |+ style="white-space:nowrap" |Risk levels of hazardous materials in this facility |- ! Health Risk !! Flammability !! Reactivity !! Special |- | Level 3 || Level 2 || Level 1 || |} |}

== Information technology ==

=== Software applications === Modern software applications give users the ability to generate, format, and edit tables and tabular data for a wide variety of uses, such as in: word processing and spreadsheet applications, presentation software, and in HTML or another markup language.

==== HTML ==== Table cells are a key component in HTML and webpage building. It is part of the <nowiki><table></nowiki> component.<ref>{{cite web |title=<nowiki><table></nowiki>: The Table element |url=https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table |access-date=18 September 2025 |website=MDN Web Docs}}</ref> A programmer may specify dimensions for a table cell, and use them to hold sections of webpages. A table cell in HTML is a non-empty element and is supposed to always be closed. There are two different kinds of table cell in HTML, namely: normal table cell and header cell. '''&lt;td&gt;''' denotes a table cell, the name implying 'data', while '''&lt;th&gt;''' denotes a table 'header'. The two can be used interchangeably, but it is recommended that header cell be only used for the top and side headers of a table. Furthermore, a table cell must be nested within a '''&lt;table&gt;''' tag ''and'' a '''&lt;tr&gt;''' (table row) tag. If there are more table cell tags in any given row than in any other, the particular '''&lt;tr&gt;''' must be given a {{mono|colspan}} attribute declaring how many columns of cells wide it should be. By using the '''rowspan''' and '''colspan''' attributes, developers can combine multiple rows or columns, allowing them to design more complex and visually structured tables.<ref>{{Cite web |title=How to Use the Table Tag in HTML: Explained with Examples |url=https://www.ccbp.in/blog/articles/table-tag-in-html |access-date=2025-11-14 |website=www.ccbp.in |language=en}}</ref>

The following table illustrates usage of colspan and rowpan: {| width="80%" align="center" style="font-variant:small-caps" | style="background:var(--background-color-inverted, black)" width="5%" | | style="background:var(--background-color-inverted, black)" width="5%" | | style="background:var(--background-color-inverted, black)" width="5%" | |<-- ''This row has three'' '''table data cells''' |- | colspan="2" style="background:var(--background-color-progressive, blue);" | | style="background:var(--background-color-inverted, black)" | |<-- ''This row has two. The first uses'' '''<code>colspan="2"</code>''' |- | rowspan="2" style="background:var(--background-color-destructive, red)" | | style="background:var(--background-color-inverted, black)" | | style="background:var(--background-color-inverted, black)" | |<-- ''This row has three table data cells, but one spans two rows because it uses'' '''<code>rowspan="2"</code>''' |- | style="background:var(--background-color-inverted, black)" | | style="background:var(--background-color-inverted, black)" | |<-- ''This row has only two table data cells, because its first is being taken up'' |}

The following is an example of an HTML table containing 4 cells: {| border="1" |Cell 1 |Cell 2 |- |Cell 3 |Cell 4 |} HTML source:<syntaxhighlight lang="html"><table border="1"> <tr> <td> Cell 1 </td> <td> Cell 2 </td> </tr> <tr> <td> Cell 3 </td> <td> Cell 4 </td> </tr> </table></syntaxhighlight>

=== Software development === Tables have uses in software development for both high-level specification and low-level implementation. Usage in software specification can encompass ad hoc inclusion of simple decision tables in textual documents through to the use of tabular specification methodologies, examples of which include Software Cost Reduction<ref name="Heitmeyer000">{{Cite web|last=Heitmeyer|first=Constance L.|title=Software Cost Reduction|url=http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=html&identifier=ADA465161|archive-url=https://web.archive.org/web/20120312075923/http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=html&identifier=ADA465161|url-status=dead|archive-date=March 12, 2012|publisher=Naval Research Laboratory|location=Washington D.C.|year=2002}}</ref> and Statestep.<ref name="Breen000">{{Cite journal|last=Breen|first=Michael|title=Experience of using a lightweight formal specification method for a commercial embedded system product line|url=http://mbreen.com/experience.pdf|journal=Requirements Engineering Journal|volume=10|issue=2|doi=10.1007/s00766-004-0209-1|year=2005|pages=161–172|s2cid=16928695}}</ref> Proponents of tabular techniques, among whom David Parnas is prominent, emphasize their understandability, as well as the quality and cost advantages of a format allowing systematic inspection,<ref name="Janicki000">{{Cite book|last1=Janicki|first1=Ryszard|last2=Parnas|first2=David Lorge|last3=Zucker|first3=Jeffery|chapter=Tabular representations in relational documents|editor1-last=Brink|editor1-first=C.|editor2-last=Kahl|editor2-first=W.|editor3-last=Schmidt|editor3-first=G.|title=Relational Methods in Computer Science|publisher=Springer Verlag|isbn=3-211-82971-7|year=1997}}</ref> while corresponding shortcomings experienced with a graphical notation were cited in motivating the development of at least two tabular approaches.<ref name="Breen000" /><ref name="Leveson000">{{Cite book|last1= Leveson|first1=Nancy G.|last2=Heimdahl|first2=Mats P. E.|last3=Reese|first3=Jon Damon|year=1999|chapter=Designing Specification Languages for Process-Control Systems: Lessons Learned and Steps to the Future|title=Seventh ACM SIGSOFT Symposium on the Foundations on Software Engineering|series=Lecture Notes in Computer Science|volume=1687|pages=127–146|doi=10.1007/3-540-48166-4_9|hdl=11299/217294|isbn=978-3-540-66538-0|url=http://www.umsec.umn.edu/sites/all/files/publications/draft4.pdf}}</ref>

At a programming level, software may be implemented using constructs generally represented or understood as tabular, whether to store data (perhaps to memoize earlier results), for example, in arrays or hash tables, or control tables determining the flow of program execution in response to various events or inputs.

=== Databases === Database systems often store data in structures called tables; in which columns are data fields and rows represent data records.

==Other uses== There are several specific situations in which tables are routinely used as a matter of custom or formal convention.

===Publishing=== {{Excerpt|Table of contents|files=none}}

===Mathematics=== {{Excerpt|Mathematical table|paragraphs=1}} Examples include: * Arithmetic (Multiplication table) * Logic (Truth table)

===Natural sciences=== In natural sciences, uses of tables include the periodic table in chemistry, and tide tables in oceanography.

==== Periodic table ==== {{Excerpt|Periodic table|paragraphs=1}}

==== Tide table ==== {{Excerpt|Tide table|paragraphs=1|files=none}}

==Historical relationship to furniture== In medieval counting houses, the tables were covered with a piece of checkered cloth, to count money.<ref>{{Cite journal |last=Baxter |first=W. T. |title=Early Accounting: The Tally and Checkerboard |date=1989 |url=https://www.jstor.org/stable/40697984 |journal=The Accounting Historians Journal |volume=16 |issue=2 |pages=43–83 |doi=10.2308/0148-4184.16.2.43 |jstor=40697984 |issn=0148-4184|url-access=subscription }}</ref><ref>{{Cite web |title=The Exchequer: a chequered history? - History of government |url=https://history.blog.gov.uk/2013/08/14/the-exchequer-a-chequered-history/ |access-date=2023-04-13 |website=history.blog.gov.uk |date=14 August 2013 |language=en}}</ref>''Exchequer'' is an archaic term for the English institution which accounted for money owed to the monarch. Thus the checkerboard tables of stacks of coins are a concrete realization of this information.{{citation needed|date=March 2022}}

==See also== * Chart * Diagram * Abstract data type * Column (database) * Information graphics * Periodic table * Reference table * Row (database) * Table (database) * Table (HTML) * Tensor * Dependent and independent variables * Zebra striping

==References== {{reflist|30em}}

== External links == {{wiktionary|table}} * {{Commons category-inline|Tables (information)}}

{{Visualization}} {{Authority control}}

Category:Infographics Category:Data modeling Category:Tables (information)