-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
230 lines (216 loc) · 10.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML & CSS Cheatsheet</title>
<link rel="stylesheet" type="text/css" href="./styles/styles.css"/> <!-- General Styles -->
<link rel="stylesheet" type="text/css" href="./styles/tables.css"/> <!-- Table Styles -->
</head>
<body>
<header>
<h1>HTML & CSS Cheatsheet</h1>
<h2>Codecademy Project</h2>
</header>
<main>
<!-- Basic HTML Concepts -->
<section id="html-basics">
<h3>HTML Basics</h3>
<table class="section-table">
<tbody>
<thead>
<tr>
<th>Item</th>
<th>Description</th>
<th>HTML Ref</th>
<th>CSS Ref</th>
</tr>
</thead>
<tr>
<td>HTML Tag</td>
<td>An HTML Tag is a command (of sorts) for a web browser to interpret how the skeleton of a webpage is built. There are multiple tag types which instruct the browser how specifically to render an element on screen.</td>
<td><span class="spanbasicscodehtml"><mytag></mytag></span></td>
<td><span class="spanbasicscodecss">mytag { }</span></td>
</tr>
<tr>
<td>Class</td>
<td>HTML classes can be used to classify a specific tag to single it out from other tags of the same type. All of it's child elements will inheret any properties set for that tags class. The same class can be repeated so they can benefit from the same properties applied to that class (for example in a CSS stylesheet).</td>
<td><span class="spanbasicscodehtml"><mytag class="myclass"></mytag></span></td>
<td><span class="spanbasicscodecss">.myclass { }</span></td>
</tr>
<tr>
<td>ID</td>
<td>HTML ids can be used to classify a tag with a specific id to single it out from other tags. ID's differ from classes in that they are unique and can only be used once (unlike classes). An ID can also have styles applied in CSS.</td>
<td><span class="spanbasicscodehtml"><mytag id="myid"></mytag></span></td>
<td><span class="spanbasicscodecss">#myid { }</span></td>
</tr>
<tr>
<td>Self-closing Tags</td>
<td>Self-closing tags do not require a <span class="spancodesamplegreen"></tagtobeclosed></span> after <span class="spancodesamplegreen"><mytagisopened></span> - It will just look like this <span class="spancodesamplegreen"><mytag varible="value"/></span> - a <span class="spancodesamplegreen"><link></span> or <span class="spancodesamplegreen"><meta></span> tag are good examples of a self-closing tag.</td>
<td><span class="spanbasicscodehtml"><mytag id="myid"></span></td>
<td><span class="spanbasicscodecss">#myid { }</span></td>
</tr>
</tbody>
</table>
</section>
<!-- HTML Tags -->
<section id="html-tags">
<h3>HTML Tags</h3>
<table class="section-table">
<tbody>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
<th>Example</th>
<th>Self-closing (Y/N)</th>
</tr>
</thead>
<tr>
<td class="td-align-center"><span class="spancodesample"><!DOCTYPE html></span></td>
<td>Doc Type</td>
<td>This is a HTML 5 document specification declaration. It helps web browsers understand and interpret it as an HTML document. It appears only once at the very start of an HTML document and before all other HTML elements.</td>
<td><pre><!DOCTYPE html></pre></td>
<td class="td-align-center">Y</td>
</tr>
<tr>
<td class="td-align-center"><span class="spancodesample"><head></span></td>
<td>Head Tag</td>
<td>HTML head tag, meta tags, title tags and link tags are examples of elements that appear in the head element.</td>
<td>
<pre><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML & CSS Cheatsheet</title>
<link rel="stylesheet" type="text/css" href="./styles/styles.css"/>
</head></pre>
</td>
<td class="td-align-center">N</td>
</tr>
<tr>
<td class="td-align-center"><span class="spancodesample"><meta></span></td>
<td>Meta Tag</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
</tbody>
</table>
</section>
<!-- HTML Tag Comments -->
<section id="html-tag-comments">
<ul>
<li>Self-closing (Y/N) means whether a tag ends in a <span class="spancodesample"></element></span> or not. Y (Yes) means it does not require a closing tag, N (No) means it DOES require a closing tag.</li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</section>
<!-- HTML Attributes -->
<section id="html-attributes">
<h3>HTML Attributes</h3>
<table class="section-table">
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
</tr>
</table>
</section>
<!-- Table Tags -->
<section id="table-tags">
<h3>HTML Table Tags</h3>
<table class="section-table">
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
<th>Example</th>
<th>Self-closing (Y/N)</th>
</tr>
</thead>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
</table>
</section>
<!-- CSS Examples -->
<section id="table-css">
<h3>CSS Examples</h3>
<table class="section-table">
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
<th>Example</th>
<th>Self-closing (Y/N)</th>
</tr>
</thead>
<tr>
<td class="td-align-center"><span class="spancodesample">Element sample here</span></td>
<td>Element name here</td>
<td>Element description here</td>
<td><pre>Code sample here</pre></td>
<td class="td-align-center">...</td>
</tr>
</table>
</section>
</main>
<footer>
<p id="footer-p">Copyright © 2023 <span id="span-bullet">•</span> Built by: <span class="author">AlcorZA</span></p>
<p id="footer-build-date">Build Date: 3 November 2023</p>
</footer>
</body>
</html>