Tables Flashcards
HTML Tables
html element that initializes a table on a page
[table]
ex
[table]
…
[/table]
HTML Tables
once a table has been defined, table rows can be added with this element
[tr]
ex
[table]
[tr]
[/tr]
[/table]
HTML Tables
once table rows have been defined, cells can be added with this element
[td]
ex
[table]
[tr]
[td]…[/td]
[td]…[/td]
[/tr]
[/table]
HTML Tables
to designate a heading for a column or row of cells, use this element
[th]
works just like [td] but provides semantic value
ex
[table]
[tr]
[th scope=”col”]…[/th]
[th scope=”col”]…[/th]
[/tr]
[tr]
[td]…[/td]
[td]…[/td]
[/tr]
[/table]
HTML Tables
element that provides a caption or title for a table
[caption]
ex
[table]
[caption]Some title here[/caption]
[/table]
HTML Tables
element that wraps the heading row or rows of a table to denote the head
[thead]
should be placed after the caption and before the body and foot elements
HTML Tables
element that should contain the primary data within a table
[tbody]
HTML Tables
element that contains data that outlines the contents of a table
[tfoot]
HTML Tables
attributes that can be added to [td] or [th] elements to specify the height or width in rows and columns
rowspan, colspan
ex
[td rowspan=”2”]…[/td]
[td colspan=”2”]…[/td]
HTML Tables
property that determines a table’s border model
border-collapse
HTML Tables
the three possible values for the border-collapse
property
collapse, separate, and inherit
HTML Tables
default value for border-collapse property
separate
HTML Tables
meaning of table { border-collapse: separate; }
all of the table’s elements’ borders will stack up next to one another
HTML Tables
meaning of table { border-collapse: collapse; }
condenses the borders into one, choosing the table cell as the primary border
HTML Tables
property that determines how much space, if any, appears between the borders of a table
border-spacing