Skip to content

Instantly share code, notes, and snippets.

@PunkStaticParanoia
Created May 26, 2023 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PunkStaticParanoia/ddbf4147b6ecfadb71083dc4d1ae849a to your computer and use it in GitHub Desktop.
Save PunkStaticParanoia/ddbf4147b6ecfadb71083dc4d1ae849a to your computer and use it in GitHub Desktop.
My CheatSheet project with a table containing a term and a definition styled in its own way
body {
background-color:darkolivegreen;
font-family: monospace, serif;
height: 100%;
}
h1 {
font-weight: 700;
font-size: 32px;
text-align: center;
padding-top: 50px;
}
table {
margin: 50px auto;
border-collapse:collapse;
}
th,td {
border: 2px solid black;
padding: 15px;
}
th {
font-weight: bold;
background-color:aqua;
color:brown;
}
td {
background-color:salmon;
color:mediumslateblue;
text-align:left;
}
<!DOCTYPE html>
<html>
<head>
<title>My Own Cheatsheet</title>
<link href="styles.css" type="text/css" rel="stylesheet">
</head>
<body>
<header>
<h1>Common CSS properties</h1>
</header>
<main>
<table>
<thead>
<tr>
<th scope="col">Property</th>
<th scope="col">Function</th>
</tr>
</thead>
<tr>
<td>background-color</td>
<td>Specifies the background color of an element</td>
</tr>
<tr>
<td>font-family</td>
<td>Specifies the font family for text</td>
</tr>
<tr>
<td>height</td>
<td>Specifies the height of an element</td>
</tr>
<tr>
<td>margin</td>
<td>Sets all the margin properties in one declaration</td>
</tr>
<tr>
<td>opacity</td>
<td>Set the opacity of an object</td>
</tr>
<tr>
<td>padding</td>
<td>A shorthand property for all the padding properties</td>
</tr>
</table>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment