-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
529 lines (526 loc) · 14.6 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
<!DOCTYPE html>
<html>
<head>
<title>Developer's Cheatsheets | HTML Cheatsheet</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>HTML Cheatsheet</h1>
<h4>Here you can find the resources you need to help yourself working with HTML. This cheatsheet is made to save
you time and increase your productivity as a developer. No matter whether you are an absolute beginner or an
experienced front-end developer, you'll always need this collection of information at your fingertips.</h4>
<h2>HTML Elements Reference</h2>
<h3>HTML Elements</h3>
<h4>The following tags define the structure of a basic HTML document.</h4>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code"><html></span></td>
<td>HTML</td>
<td>Acts as a container for every other element in the document except the <span class="code">
<!DOCTYPE html> tag.</span></td>
</tr>
<tr>
<td><span class="code"><head></span></td>
<td>Head</td>
<td>Includes all the document's metadata.</td>
</tr>
<tr>
<td><span class="code"><title></span></td>
<td>Title</td>
<td>Defines the title of the document displayed in the browser's title bar.</td>
</tr>
<tr>
<td><span class="code"><body></span></td>
<td>Body</td>
<td>Acts as a container for the document's content that gets displayed on the browser.</td>
</tr>
</tbody>
</table>
<h4>The following tags give additional information to the HTML document.</h4>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code"><meta></span></td>
<td>Meta</td>
<td>Used to define additional information about the webpage.</td>
</tr>
<tr>
<td><span class="code"><link></span></td>
<td>Link</td>
<td>Used to link the document to an external resource.</td>
</tr>
<tr>
<td><span class="code"><style></span></td>
<td>Style</td>
<td>Used for defining styles for the document.</td>
</tr>
<tr>
<td><span class="code"><script></span></td>
<td>Script</td>
<td> Used to write code snippets (usually JS) or to link the document to an external script.</td>
</tr>
</tbody>
</table>
<h3>HTML Document Structure</h3>
<h4>We'll use certain tags to create the structure in our HTML document</h4>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code"><h1></span> to <span class="code"><h6></span></td>
<td>Heading</td>
<td>The <span class="code"><h1></span> to <span class="code"><h6></span> tags show different
levels of headings in a document, with <span class="code"><h1></span> being the largest and
<span class="code"><h6></span> being the smallest.</td>
</tr>
<tr>
<td><span class="code"><p></span></td>
<td>Paragraph</td>
<td>We use the <span class="code"><p></span> tag to create a paragraph.</td>
</tr>
<tr>
<td><span class="code"><div></span></td>
<td>Div</td>
<td>Used to divide and style separate sections of the document. It also acts as a parent container for
other elements.</td>
</tr>
<tr>
<td><span class="code"><span></span></td>
<td>Span</td>
<td>Its similar to <span class="code"><div></span> but you use it as an inline container.</td>
</tr>
<tr>
<td><span class="code"><br/></span></td>
<td>Line-break</td>
<td>Used for creating line breaks. This has no closing tag.</td>
</tr>
<tr>
<td><span class="code"><hr/></span></td>
<td>Horizontal</td>
<td>Used to create a horizontal line. It also has no closing tag.</td>
</tr>
<tr>
<td><span class="code"><img></span></td>
<td>Image</td>
<td>Used to display images.</td>
</tr>
</tbody>
</table>
<h3>HTML Text Formatting</h3>
<h4>We can format text in HTML in many ways.</h4>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code"><i></span></td>
<td>Italics</td>
<td>Displays text in italics.</td>
</tr>
<tr>
<td><span class="code"><b></span></td>
<td>Bold</td>
<td>Displays text in bold.</td>
</tr>
<tr>
<td><span class="code"><strong></span></td>
<td>Strong</td>
<td>Displays text in bold. Used to make important emphasis.</td>
</tr>
<tr>
<td><span class="code"><em></span></td>
<td>Emphasis</td>
<td>Another emphasis tag that displays text in italics.</td>
</tr>
<tr>
<td><span class="code"><sub></span></td>
<td>Subscript</td>
<td>Defines subscript text.</td>
</tr>
<tr>
<td><span class="code"><sup></span></td>
<td>Superscript</td>
<td>Defines a superscript like the power of a number</td>
</tr>
<tr>
<td><span class="code"><small></span></td>
<td>Small</td>
<td>Reduces the size of text.</td>
</tr>
<tr>
<td><span class="code"><del></span></td>
<td>Deleted</td>
<td>Defines deleted text by striking a line through the text.</td>
</tr>
<tr>
<td><span class="code"><ins></span></td>
<td>inserted</td>
<td>Defines inserted text which is usually underlined.</td>
</tr>
<tr>
<td><span class="code"><blockquote></span></td>
<td>Blockquote</td>
<td>Used to enclose a section of text quoted from another source.</td>
</tr>
<tr>
<td><span class="code"><q></span></td>
<td>Quotes</td>
<td>Used for shorter inline quotes.</td>
</tr>
<tr>
<td><span class="code"><cite></span></td>
<td>Citing</td>
<td>Used for citing the author of a quote.</td>
</tr>
<tr>
<td><span class="code"><address></span></td>
<td>Address</td>
<td>Used for showing the author's contact information.</td>
</tr>
<tr>
<td><span class="code"><abbr></span></td>
<td>Abbreviation</td>
<td>Denotes an abbreviation.</td>
</tr>
<tr>
<td><span class="code"><code></span></td>
<td>Code</td>
<td>Displays code snippets.</td>
</tr>
<tr>
<td><span class="code"><mark></span></td>
<td>Mark</td>
<td>Highlights text.</td>
</tr>
</tbody>
</table>
<h2>HTML Table Reference</h2>
<h3>Table Tags</h3>
<h4>The following tags are used while creating tables in HTML.</h4>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code"><table></span></td>
<td>Table</td>
<td>The wrapper element for all HTML tables.</td>
</tr>
<tr>
<td><span class="code"><thead></span></td>
<td>Table Head</td>
<td>The set of rows defining the column headers in a table.</td>
</tr>
<tr>
<td><span class="code"><tbody></span></td>
<td>Table Body</td>
<td>The set of rows containing actual table data.</td>
</tr>
<tr>
<td><span class="code"><tr></span></td>
<td>Table Row</td>
<td>The table row container.</td>
</tr>
<tr>
<td><span class="code"><td></span></td>
<td>Table Data</td>
<td>The table row container.</td>
</tr>
<tr>
<td><span class="code"><tfoot></span></td>
<td>Table Foot</td>
<td>The set of rows defining the footer in a table.</td>
</tr>
</tbody>
</table>
<h3>Table Attributes</h3>
<h4>The following attributes are used along with table tags while creating tables in HTML.</h4>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>colspan</td>
<td>Column Span</td>
<td>Defines how many columns a td element should span.</td>
</tr>
<tr>
<td>rowspan</td>
<td>Row Span</td>
<td>Defines how many rows a td element should span.</td>
</tr>
</tbody>
</table>
<h3>Links and Anchor Tag Attributes</h3>
<h4>The <span class="code"><a></span> tag, also known as the anchor tag, is used to define hyperlinks that
link to other pages (external web pages included) or to a section of the same page. Here are some attributes of
the <span class="code"><a> tag:</span></h4>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>href</td>
<td>Hypertext Reference</td>
<td>Specifies the URL the link takes the user to when clicked.</td>
</tr>
<tr>
<td>download</td>
<td>Download</td>
<td>Specifies that the target or resource clicked is downloadable.</td>
</tr>
<tr>
<td>target</td>
<td>Target</td>
<td>Specifies where the link is to be opened. This could be in the same or separate window.</td>
</tr>
</tbody>
</table>
<h3>Lists</h3>
<h4>The <span class="code"><ol></span> tag defines an ordered list while the <span
class="code"><ul></span> tag defines an unordered list.The <span class="code"><li></span> tag is
used to create items in the list.</h4>
<h3>Forms</h3>
<h4>The <span class="code"><form></span> tag is used to create a form in HTML. Forms are used to get user
inputs. Here are some attributes associated with the <span class="code"><form></span> element:</h4>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>action</td>
<td>Action</td>
<td>Specifies where the form information goes when submitted.</td>
</tr>
<tr>
<td>target</td>
<td>Target</td>
<td>Specifies where to display the form's response.</td>
</tr>
<tr>
<td>autocomplete</td>
<td>Autocomplete</td>
<td>Can have a value of on or off.</td>
</tr>
<tr>
<td>nonvalidate</td>
<td>Nonvalidate</td>
<td>Specifies that the form should not be validated.</td>
</tr>
<tr>
<td>method</td>
<td>Method</td>
<td>Specifies the HTTP method used when sending form data.</td>
</tr>
<tr>
<td>name</td>
<td>Name</td>
<td>Specifies the name of the form.</td>
</tr>
<tr>
<td>required</td>
<td>Required</td>
<td>Specifies that an input element cannot be left empty.</td>
</tr>
<tr>
<td>autofocus</td>
<td>Autofocus</td>
<td>Gives focus to the input elements when the page loads.</td>
</tr>
<tr>
<td>disabled</td>
<td>Disabled</td>
<td>Disables an input element so the user can longer interact with it.</td>
</tr>
<tr>
<td>placeholder</td>
<td>Placeholder</td>
<td>Is used to give users a hint on what information is required for an input element.</td>
</tr>
</tbody>
</table>
<h4>Here are other input elements associated with forms:</h4>
<table>
<thead>
<tr>
<th>Elements</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code"><textarea></span></td>
<td>Text-area</td>
<td>For getting user text input with multiple lines</td>
</tr>
<tr>
<td><span class="code"><select></span></td>
<td>Select</td>
<td>Specifies a list of options the user can choose from.</td>
</tr>
<tr>
<td><span class="code"><option></span></td>
<td>Option</td>
<td>Creates an option under the select element.</td>
</tr>
<tr>
<td><span class="code"><input></span></td>
<td>Input</td>
<td>Specifies an input field where the user can enter data. This has a type attribute that specifies
what type of data the user can input.</td>
</tr>
<tr>
<td><span class="code"><button></span></td>
<td>Button</td>
<td>Creates a button.</td>
</tr>
</tbody>
</table>
<h3>HTML5 Tags </h3>
<h4>Find below some tags introduced in HTML5:</h4>
<table>
<thead>
<tr>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code"><header></span></td>
<td>Header</td>
<td>Specifies the webpage header.</td>
</tr>
<tr>
<td><span class="code"><footer></span></td>
<td>Footer</td>
<td>Specifies the webpage footer.</td>
</tr>
<tr>
<td><span class="code"><main></span></td>
<td>Main</td>
<td>Specifies a main content section.</td>
</tr>
<tr>
<td><span class="code"><article></span></td>
<td>Article</td>
<td>Specifies an article's section, usually for content that can stand alone on the webpage.</td>
</tr>
<tr>
<td><span class="code"><section></span></td>
<td>Section</td>
<td>Is used to create separate sections.</td>
</tr>
<tr>
<td><span class="code"><aside></span></td>
<td>Aside</td>
<td>Is usually used to when placing items in a sidebar.</td>
</tr>
<tr>
<td><span class="code"><time></span></td>
<td>Time</td>
<td>Is used for formatting date and time.</td>
</tr>
<tr>
<td><span class="code"><figure></span></td>
<td>Figure</td>
<td>Is used for figures like charts.</td>
</tr>
<tr>
<td><span class="code"><figcaption></span></td>
<td>Figcaption</td>
<td>Denotes a description of a figure.</td>
</tr>
<tr>
<td><span class="code"><nav></span></td>
<td>Navigation</td>
<td>Is used to nest navigation links.</td>
</tr>
<tr>
<td><span class="code"><meter></span></td>
<td>Meter</td>
<td>Is used to measure data within a range.</td>
</tr>
<tr>
<td><span class="code"><progress></span></td>
<td>Progress</td>
<td>Is used as a progress bar.</td>
</tr>
<tr>
<td><span class="code"><dialouge></span></td>
<td>Dialouge</td>
<td>Is used to create a dialog box.</td>
</tr>
<tr>
<td><span class="code"><audio></span></td>
<td>Audio</td>
<td>Is used to embed an audio file in the web page.</td>
</tr>
<tr>
<td><span class="code"><video></span></td>
<td>Video</td>
<td>Is used to embed video.</td>
</tr>
</tbody>
</table>
<h4>Conclusion:</h4>
<p>I've tried my best to cover most of the commonly used elements, tags and attributes that are used by developers, so this
should serve as a good reference resource. I'll eventually add more cheatsheets for css, javaScript and Python too. But
for now, this is it! Hope you have found this resource helpful!</p><br>
</body>
<hr>
<footer>
<div class="text"><strong>Published on</strong> : 30th March 2023<br>
<strong>Published by</strong>: Sandhya Harshakumar<br>
<strong>Email</strong>: sandhyaharsh@gmail.com
</div>
</footer>
</html>