Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created May 24, 2020 20:07
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/33eab821fe01fc89e49f920ee913653f to your computer and use it in GitHub Desktop.
Save codecademydev/33eab821fe01fc89e49f920ee913653f to your computer and use it in GitHub Desktop.
Codecademy export
<!DOCTYPE html>
<html>
<head>
<title>HTML/CSS Cheatsheet</title>
<link href="./styles.css" type="text/css" rel="stylesheet">
</head>
<body>
<div>
<header>
<h1 class="html">HTML & CSS Table Reference</h1>
<br>
<h1 class="html">Other Html Tags</h1>
</header>
<table>
<thead>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>&lt;abbr&gt;</td>
<td>Abbreviation</td>
<td>Defines an abbreviation or an acronym</td>
</tr>
<tr>
<td>&lt;bdi&gt;</td>
<td> Bi-Directional Isolation</td>
<td>Isolates a part of text that might be formatted in a different direction from other text outside it</td>
</tr>
<tr>
<td>&lt;bdo&gt;</td>
<td>Bi-Directional Override</td>
<td>Overrides the current text direction</td>
</tr>
<tr>
<td>&lt;address&gt;</td>
<td>Address</td>
<td>Defines contact information for the author/owner of a document/article</td>
</tr>
<tr>
<td>&lt;samp&gt;</td>
<td>Sample</td>
<td>Defines sample output from a computer program</td>
</tr>
<tr>
<td>&lt;mark&gt;</td>
<td>Mark</td>
<td>Defines marked/highlighted text</td>
</tr>
<tr>
<td>&lt;del&gt;</td>
<td>Delete</td>
<td>Defines text that has been deleted from a document</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<div>
<header>
<h2 class="css">Other CSS Rules</h2>
</header>
<table>
<thead>
<th>Rule</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>Element Rule</td>
<td>A CSS rule defines styles to elements of all web pages using the style-sheet, including the &lt;body&gt; of your pages and HTML tags such as &lt;h1&gt;, &lt;p&gt;, and &ltul&gt. These elements are called selectors.</td>
</tr>
<tr>
<td>Class Rule</td>
<td>A CSS class rule is a style that can be used as an exception or addition to a stated rule. It can be used many times within a web page. The definition of a class is the same as a standard rule except that the selector is preceded by a period ( . ). For example in your CSS file, you can define:
.newcolor {color: red;}
To apply the class to an element that has a rule defined for it, you include a class statement in your HTML code. Although you may have defined the color of &lth1&gt and &ltp&gt in your CSS rules, you can assign the CSS class to them in various places in your HTML document:
&lth2 class = "newcolor"&gtSpecial case&lt/h2&gt</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
table {margin: 0 auto; border-collapse: collapse; width: 50%;}
table, th, td {border: 3px solid black;}
.html, .css {
text-align: center;
font-family: fantasy;
font-weight: bold;
}
body {
font-family: Arial, sans-serif;
background-color: snow;
}
thead {
background-color: Bisque;
}
mark .tag {
background-color: snow
color: white
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment