-
-
Save codecademydev/33eab821fe01fc89e49f920ee913653f to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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><abbr></td> | |
<td>Abbreviation</td> | |
<td>Defines an abbreviation or an acronym</td> | |
</tr> | |
<tr> | |
<td><bdi></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><bdo></td> | |
<td>Bi-Directional Override</td> | |
<td>Overrides the current text direction</td> | |
</tr> | |
<tr> | |
<td><address></td> | |
<td>Address</td> | |
<td>Defines contact information for the author/owner of a document/article</td> | |
</tr> | |
<tr> | |
<td><samp></td> | |
<td>Sample</td> | |
<td>Defines sample output from a computer program</td> | |
</tr> | |
<tr> | |
<td><mark></td> | |
<td>Mark</td> | |
<td>Defines marked/highlighted text</td> | |
</tr> | |
<tr> | |
<td><del></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 <body> of your pages and HTML tags such as <h1>, <p>, and <ul>. 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 <h1> and <p> in your CSS rules, you can assign the CSS class to them in various places in your HTML document: | |
<h2 class = "newcolor">Special case</h2></td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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