Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 18, 2023 21:17
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 codecademydev/441e28556d768876c2d2500826d17c23 to your computer and use it in GitHub Desktop.
Save codecademydev/441e28556d768876c2d2500826d17c23 to your computer and use it in GitHub Desktop.
Codecademy export
<!DOCTYPE html>
<html lang="en">
<head>
<title>Common CSS Properties</title>
<link rel="stylesheet" href="./styles.css" type="text/css">
</head>
<body>
<h1>CSS Properties Reference</h1>
<h2>Common Features</h2>
<table>
<thead>
<th>Attribute</th>
<th>Description</th>
<tbody>
<tr>
<td><span class="code">color</span></td>
<td>Sets the color of text inside an element.</td>
</tr>
<tr>
<td><span class="code">background-color</span></td>
<td>Sets the background color of an element.</td>
</tr>
<tr>
<td><span class="code">font-family</span></td>
<td>Sets the font family for text inside an element.</td>
</tr>
<tr>
<td><span class="code">padding</span></td>
<td>Sets the space between the content of an element and its border.</td>
</tr>
<tr>
<td><span class="code">margin</span></td>
<td>Sets the space between the border of an element and its surrounding elements.</td>
</tr>
<tr>
<td><span class="code">position</span></td>
<td>Sets the positioning behavior of an element.</td>
</tr>
<tr>
<td><span class="code">display</span></td>
<td>Sets the display behavior of an element.</td>
</tr>
<tr>
<td><span class="code">top, right, bottom, left</span></td>
<td>Sets the distance between an element and the edges of its container.</td>
</tr>
</tbody>
</thead>
</table>
</body>
</html>
body {
font-family: Garamond, sans-serif;
background-color: gainsboro;
font-weight: medium;
}
h1 {
font-family: Serif;
text-align: center;
font-size: 40px;
}
h2 {
font-family: Serif;
text-align: center;
font-style: italic;
font-weight: bold;
font-size: 30px;
}
table {
border-collapse: collapse;
border: 2px solid darkblue;
margin: 0 auto;
font-size: 21px;
}
thead {
background-color: skyblue;
font-weight: bold;
}
th {
border: 1px solid darkblue;
padding: 10px;
}
td {
border: 1px solid darkblue;
font-size: 18px;
}
.code {
font-family: monospace;
background-color: beige;
font-weight: bold;
font-size: 16px;
padding-right: 20px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment