-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
274 lines (242 loc) · 11.5 KB
/
Copy pathindex.html
File metadata and controls
274 lines (242 loc) · 11.5 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cheat Sheet</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/x-icon" href="/image/favicon.ico">
</head>
<body>
<header>
<nav>
<ul class="main-nav">
<li class="push"><a href="#"><em>Cheat Sheet</em></a></li>
<li><a href="#">CSS Selectors</a></li>
<li><a href="#">Web Development</a></li>
<li><a href="#">Table Reference</a></li>
</ul>
</nav>
</header>
<main class="mainContainer">
<div class="programmingLanguages">
<h2>Programming Languages and their role in Web development</h2>
<p>Programming languages are computer languages, and are used for communicating with computers. These are set of detailed information about how something should be done or operated, and helps programmers to develop <em>programs</em>, <em>scripts</em> , or other <em>sets of instructions</em> for computers to execute.</p>
<table>
<tr class="tableHeader">
<th>Programming Language</th>
<th class="syntax">Syntax</th>
<th>Description</th>
<th class="syntax">Latest version</th>
<th>Initial release</th>
</tr>
<tr>
<td>HyperText Markup Language</td>
<td class="syntax">HTML</td>
<td>A standard markup language for web page creation, that allows the creation and structure of sections, paragraphs and links.</td>
<td class="latestVersion">5</td>
<td>22 January 2008</td>
</tr>
<tr>
<td>Cascading Style Sheets</td>
<td class="syntax">CSS</td>
<td>A language used to stylize elements written in a markup language such as HTML.</td>
<td class="latestVersion">3</td>
<td>12 April 2016</td>
</tr>
<tr>
<td>JavaScript</td>
<td class="syntax">JS</td>
<td>A scripting language that create dynamic on a web page and implements interactivity to the content.</td>
<td class="latestVersion">ES6</td>
<td>ECMA Script 2022 / <br> 22 July 2021</td>
</tr>
<tr>
<td>Structured Query Language</td>
<td class="syntax">SQL</td>
<td>An open source relational database management system (RDBMS) with a client-server model.</td>
<td class="latestVersion">16.0</td>
<td>SQL : 2016 / <br> December 2016</td>
</tr>
</table>
</div>
<div class="cssSelectors">
<h2>CSS Selectors</h2>
<p><strong><em> * Specificity list</em></strong></p>
<table>
<tr class="tableHeader">
<th>Value</th>
<th>Syntax</th>
<th>Description</th>
<th>Example</th>
</tr>
<tr>
<td><strong>id</strong> Selector</td>
<td><strong>#idName { }</strong> <br> <em> A hash <em>(#)</em> character followed by the name of the ID. </em></td>
<td>Selects elements with a specific <strong>ID</strong> attribute.</td>
<td >
<ul class="example">
<li><strong>HTML:</strong> <section <em>id='descriptive'></em> Descriptive writing helps the reader . . . <section></li>
<li><strong>CSS:</strong> <em>#descriptive</em> { font-family: Roboto; }</li>
<li><strong>Result:</strong> Descriptive writing helps the reader visualize the person, place, thing, or situation being described.</li>
</ul>
</td>
</tr>
<tr>
<td><strong><em>class</em></strong> Selector</td>
<td><strong>.className { } </strong> <br> A period <em>(.)</em> character followed by the class name.</td>
<td>Selects elements with a specific <strong><em>class</em></strong> attribute.</td>
<td>
<ul class="example">
<li><strong>HTML:</strong> <p class='study'> data science <p> </li>
<li><strong>CSS:</strong> .study { text-transform: uppercase; }</li>
<li><strong>Result:</strong> DATA SCIENCE</li>
</ul>
</td>
</tr>
<tr>
<td><strong>Type</strong> Selector (aka <strong>Element Type</strong> Selector)</td>
<td><strong>element { }</strong></td>
<td>Selects elements based on the html <strong>element type</strong> (e.g. <html>, <head>, <body>, <main>, <footer>).</td>
<td>
<ul class="example">
<li><strong>HTML:</strong> <h1>This is the text for H1.</h1> <p>This is the text for p.</p></li>
<li><strong>CSS:</strong> h1 { color: green; }</li>
<li><strong>Result:</strong> This is the text for H1. <br> This is the text for p.</li>
</ul>
</td>
</tr>
<tr>
<td>Universal Selector</td>
<td><strong>* { }</strong></td>
<td>Selects <strong>all</strong> elements of <strong>any</strong> type.</td>
<td>
<ul class="example">
<li><strong>HTML:</strong> <h1> This is the text for H1.</h1> <p>This is the text for p.</p<</li>
<li><strong>CSS:</strong> <strong>*</strong> { color: green; }</li>
<li><strong>Result:</strong> This is the text for H1. This is the text for p.</li>
</ul>
</td>
</tr>
<tr>
<td>Attribute</td>
<td>[target]</td>
<td>Selects <strong>all</strong> elements with a <strong>target</strong> attribute.</td>
<td>
<ul class="example">
<li>[attribute*="value"]</li>
<li>[class*="te"] { background: color; }</li>
</ul>
</td>
</tr>
<tr>
<td>Hover & Cursors</td>
<td>:hover</td>
<td>To specify the cursor appearance, use the CSS cursor property, which is used to change the mouse cursor type on elements. It can be useful in websites where different actions should be done rather than just clicking.</td>
<td>
<ul class="example">
<li class="globalValues">/* Global values */</li>
<li>cursor: inherit;</li>
<li>cursor: initial;</li>
<li>cursor: revert;</li>
<li>cursor: revert-layer;</li>
<li>cursor: unset;</li>
</ul>
</td>
</tr>
<tr>
<td>:nth</td>
<td>:nth-child(number) { css declarations; }</td>
<td>The selector matches every element that is the nth child of its parent.</td>
<td>
<ul class="example">
<li>p:nth-child(odd) { background: oddColor; }</li>
<li>p:nth-child(even) { background: evenColor; }</li>
</ul>
</td>
</tr>
</table>
</div>
<div class="tableReference">
<h2>HTML Table Reference</h2>
<p><strong><em> * Table Tags</em></strong></p>
<table>
<tr class="tableTags">
<th>Content</th>
<th>Tag</th>
<th>Name</th>
<th>Description</th>
</tr>
<tr">
<td class="content"># 1</td>
<td><table></td>
<td>Table</td>
<td>The wrapper element for all HTML tables.</td>
</tr>
<tr">
<td class="content"># 2</td>
<td><thead></td>
<td>Table Head</td>
<td>The set of rows defining the column headers in a table.</td>
</tr>
<tr">
<td class="content"># 3</td>
<td><tbody></td>
<td>Table Body</td>
<td>The set of rows containing actual table data.</td>
</tr>
<tr>
<td class="content"># 4</td>
<td><tr></td>
<td>Table Row</td>
<td>The table row container.</td>
</tr>
<tr">
<td class="content"># 5</td>
<td><td></td>
<td>Table Data</td>
<td>The standard data cell in an HTML table.</td>
</tr>
<tr">
<td class="content"># 6</td>
<td><tfoot></td>
<td>Table Foot</td>
<td>The set of rows defining the footer in a table.</td>
</tr>
</table>
</div>
<div class="tableReference">
<p><strong><em> * Table Attributes</em></strong></p>
<table>
<tr class="tableAttributes">
<th>Content</th>
<th>Attribute</th>
<th>Name</th>
<th>Description</th>
</tr>
<tr">
<td class="content"># 1</td>
<td>colspan</td>
<td>Column Span</td>
<td>Defines how many columns a td element should span.</td>
</tr>
<tr">
<td class="content"># 2</td>
<td>rowspan</td>
<td>Row Span</td>
<td>Defines how many rows a td element should span.</td>
</tr>
</table>
</div>
</main>
<footer class="footer">
<a><strong>2023 © Cheat Sheet</strong></a>
<a href="#" class="item">About</a>
<a href="#" class="item">Paragraph</a>
<a href="#" class="item">Content</a>
</footer>
<button onclick="topFunction()" id="myBtn" title="Go to top">⮙</button>
<script src="script.js"></script>
</body>
</html>