HTML & CSS CheatSheet for Table's and Common CSS properties.
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 of a table. Containing a list of people and ordering them by Name, Age and Nationality.
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; } |