HTML Tables

Table tags

Tag Name Description
<table> Table Tag to declare a table
<thead> Table head Tag to declare table header
<tr> Table Row Tag to declare a row in a table
<th> Table Header Tag to declare a header cell in a table
<td> Table Data Tag to declare a data cell in a table
<tbody> Table Body Tag to declare the body of a table
<tfoot> Table Footer Tag to declare the footer of a table
<caption> Table Caption Tag to declare a caption for a table

Table attribute

Attribute Name Description
colspan Column Span Attribute to specify the number of columns a cell should span
rowspan Row Span Attribute to specify the number of rows a cell should span
scope Scope Attribute to specify the scope of a header cell (row, col, rowgroup, colgroup)

CSS Layout

Property Values Description
float left, right, none Property to float an element to the left or right
clear left, right, both, none Property to specify whether an element can be next to floating elements
display block, inline, inline-block, flex, grid Property to specify the display behavior of an element
position static, relative, absolute, fixed, sticky Property to specify the positioning method of an element
z-index integer Property to specify the stack order of an element
overflow visible, hidden, scroll, auto Property to specify what happens if content overflows an element's box
margin length, percentage, auto Property to specify the space outside an element's border
padding length, percentage Property to specify the space inside an element's border
border width style color Property to specify the border of an element
box-sizing content-box, border-box Property to specify how the width and height of an element are calculated