HTML & CSS CHEATSHEET

HTML & CSS CheatSheet for Table's and Common CSS properties.

Table Tags

Tag Name Description
<table> Table The wrapper element for all HTML Tables.
<thead> Table Head The set of rows defining the column headers in a table.
<tbody> Table Body The set of rows containing actual table data.
<tr> Table Row The table row container.
<td> Table Data The data inside the table row container.
<tfoot> Table Foot The set of rows defining the footer in a table.

Table Attributes

Attribute Name Description
<colspan> Column Span Defines how many columns a td element should span
<rowspan> Row Span Defines how many rows a td element should span.

Example

*Example of a table. Containing a list of people and ordering them by Name, Age and Nationality.

Common CSS Properties

Action Description Example
color Define the color of the text p { color: blue; }
background-color Define the color of the background. div { background-color: red; }
font-size Set the size of the font. p { font-size: 18px; }
font-weight Define the thickness of text. p { font-weight: bold; }
font-family Define the font or list of fonts for text context. p { font-family: "Font Name"; }
opacity Set the transparency level of an element. div { opacity: 0.5; }
background-image Set an image as the background of an element. div { background-image: url(background.jpg); }
padding Define space inside the element between its content and border. div { padding: 10px; }
margin Define the outer space of elements. div { margin: 20px; }
border Creates a border around an element. div { border: 2px solid red; }