forked from girldevelopit/gdi-featured-html-css-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
class2.html
449 lines (396 loc) · 14 KB
/
class2.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Class 2 ~ HTML/CSS ~ Girl Develop IT</title>
<meta name="description" content="This is the official Girl Develop It Core HTML/CSS curriculum. It was developed through the contributions of Pamela Fox, Alexis Goldstein, Erin M. Kidwell, Izzy Johnston, and Jen Myers.
The course is meant to be taught in 4 or 6 two-hour sections. If you are teaching a 4 section course, you can ignore classes 5 and 6 without losing any impact or information. Each of the slides and practice files are customizable according to the needs of a given class or audience.">
<meta name="author" content="Girl Develop It">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" href="reveal/css/reveal.css">
<link rel="stylesheet" href="reveal/css/theme/gdidefault.css" id="theme">
<!-- For syntax highlighting -->
<!-- light editor<link rel="stylesheet" href="lib/css/light.css">-->
<!-- dark editor--><link rel="stylesheet" href="reveal/lib/css/dark.css">
<!-- If use the PDF print sheet so students can print slides-->
<link rel="stylesheet" href="reveal/css/print/pdf.css" type="text/css" media="print">
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide-->
<div class="slides">
<!-- Opening slide -->
<section>
<img src = "images/gdi_logo_badge.png">
<h3>Beginning HTML and CSS</h3>
<h4>Class 2</h4>
</section>
<!-- Welcome-->
<section>
<h3>Welcome!</h3>
<div class = "left-align">
<p>Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.</p>
<p class ="green">Some "rules"</p>
<ul>
<li>We are here for you!</li>
<li>Every question is important</li>
<li>Help each other</li>
<li>Have fun</li>
</ul>
</div>
</section>
<!-- Role of HTML v. CSS-->
<section>
<h3>Anatomy of a website</h3>
<div class = "blue"> Your Content</div>
<div><span class = "blue">+ HTML: </span>Structure</div>
<div><span class = "blue">+ CSS: </span>Presentation</div>
<div class = "blue">= Your Website</div>
<p>A website is a way to present your content to the world, using HTML and CSS to present that content & make it look good.</p>
</section>
<!-- What is CSS-->
<section>
<h3>CSS: What is it?</h3>
<p>CSS = <span class="green">C</span>ascading <span class="green">S</span>tyle <span class="green">S</span>heets</p>
<p>CSS is a "style sheet language" that lets you style the elements on your page.</p>
<p>CSS is works in conjunction with HTML, but is not HTML itself.</p>
</section>
<section>
<h3>CSS: What can it do?</h3>
<p>All colored text, position, and size</p>
<img src = "images/homepage-view.png">
</section>
<section>
<h3>CSS: What does it look like?</h3>
<img src = "images/homepage-css.png">
</section>
<!-- The CSS Rule-->
<section>
<h3>The CSS Rule</h3>
<img src="images/cssrule.png" alt="The CSS Rule" style="border: none; box-shadow: none;"/>
</section>
<section>
<h3>The CSS Rule</h3>
<pre><code class = "html">
selector {
property: value;
}
</code></pre>
<div class = "left-align">
<p>A block of CSS code is a rule.</p>
<p>The rule starts with a selector.</p>
<p>It has sets of properties and values.</p>
<p>A property-value pair is a declaration.</p>
</div>
</section>
<!-- CSS Syntax -->
<section>
<h3>CSS Syntax</h3>
<div class = "left-align">
<p>Declarations: Property and value of style you plan use on HTML element. </p>
<p>Declarations end with a semicolon</p>
<p>Declaration groups are surrounded by curly brackets.</p>
</div>
<pre><code class = "html">
selector {
property: value;
property: value;
property: value;
}
</code></pre>
</section>
<!-- Selectors elements-->
<section>
<h3>Selector: Element</h3>
<pre><code class = "html">
p {
property: value;
}
</code></pre>
<p>Selects all paragraph elements.</p>
<pre><code class = "html">
img {
property: value;
}
</code></pre>
<p>Selects all image elements.</p>
</section>
<!-- Selectors ID-->
<section>
<h3>Selector: ID</h3>
<pre><code class = "html">
#footer {
property: value;
}
</code></pre>
<p>Selects all elements with an id of "footer".</p>
<pre><code class = "html">
<p id="footer">Copyright 2011</p>
</code></pre>
<p>The associated HTML.</p>
</section>
<!-- Selectors Class-->
<section>
<h3>Selector: Class</h3>
<pre><code class = "html">
.warning {
color: red;
}
</code></pre>
<p>Selects all elements with a class of "warning".</p>
<pre><code class = "html">
<p class="warning">Run away!</p>
</code></pre>
<p>The associated HTML.</p>
</section>
<!-- ID vs Class-->
<section>
<h3>IDs vs. Classes</h3>
<div class = "left-align">
<span class = "yellow">ID</span> -- Should only apply to one element on a webpage. I.E. A webpage only has one footer.
<p>The "#" is how you tell CSS "this is an id."</p>
</div>
<div class = "left-align">
<span class = "yellow">Class</span> -- Lots of elements can have the same class. I.E. There can be many warning on one webpage.
<p>The "." is how you tell CSS "this is a class name."</p>
</div>
</section>
<!-- Selector position-->
<section>
<h3>Selector: Position</h3>
<pre><code class = "html">
p em {
color: yellow;
}
</code></pre>
<p>Selects all em elements that are within a paragraph</p>
<pre><code class = "html">
<p>This is <em>important.</em></p>
</code></pre>
<p>The associated HTML.</p>
</section>
<!-- Multiple values -->
<section>
<h3>Property Values</h3>
<p>Each property can have one or more comma separated values.</p>
<pre><code class = "html">
p{
color: white;
background-color: red;
font-family: Arial, sans-serif;
}
</code></pre>
</section>
<!-- Color-->
<section>
<h3>Property: Color</h3>
<p>The color property changes the color of the text.</p>
<pre><code class = "html">
p {
color: red;
color: #ff0000;
color: rgb(255, 0, 0);
}
</code></pre>
<p>Color name</p>
<p>Hexadecimal value</p>
<p>RGB value</p>
<p><small>The 17 standard colors are: <font color="aqua" style="background:black;">aqua</font>, black, <font color="blue">blue</font>, <font color="fuchsia">fuchsia</font>, <font color="gray">gray</font>, <font color="grey">grey</font>, <font color="green">green</font>, <font color="lime">lime</font>, <font color="maroon">maroon</font>, <font color="navy">navy</font>, <font color="olive">olive</font>, <font color="purple">purple</font>, <font color="red">red</font>, <font color="silver" style="background:black;">silver</font>, <font color="teal">teal</font>, <font color="white" style="background:black;">white</font>, and <font color="yellow" style="background:black;">yellow</font>.</small></p>
</section>
<!-- Background color-->
<section>
<h3>Property: Background-color</h3>
<p>The background-color property changes the color of the background.</p>
<pre><code class = "html">
p {
background-color: black;
background-color: #000000;
background-color: rgb(0,0,0);
}
</code></pre>
</section>
<!-- Font family-->
<section>
<h3>Property: Font-family</h3>
<p>The font-family property defines which font is used.</p>
<pre><code class = "html">
p {
font-family: "Times New Roman";
font-family: serif;
font-family: "Arial", sans-serif;
}
</code></pre>
<p>Specific font name</p>
<p>Generic name</p>
<p>Comma-separated list</p>
</section>
<!-- Font size -->
<section>
<h3>Property: Font-size</h3>
<p>The font-size property specifies the size of the font.</p>
<pre><code class = "html">
p {
font-size: 12px;
font-size: 1.5em;
font-size: 100%;
}
</code></pre>
<p>Pixels</p>
<p>"em"</p>
<p>Percentage</p>
</section>
<!-- Fonts-->
<section>
<h3>Property: Fonts (shorthand)</h3>
<pre><code class = "html">
p {
font-style: italic;
font-weight: bold;
font-size: 10px;
font-family: sans-serif;
}
</code></pre>
OR
<pre><code class = "html">
p {
font: italic bold 10px sans-serif;
}
</code></pre>
</section>
<!-- Connecting HTML to CSS-->
<section>
<h3>Connecting CSS to HTML</h3>
<p class = "green">3 ways</p>
<p>"Inline"</p>
<p>"Embedded"</p>
<p>"External"</p>
</section>
<!-- Inline -->
<section>
<h3>Connecting CSS to HTML: Inline</h3>
<pre><code class = "html">
<p style="color:red">Some text.</p>
</code></pre>
<p>Uses the HTML attribute style.</p>
<p>Difficult to use in large projects</p>
<p>Not preferred.</p>
</section>
<!-- Embedded -->
<section>
<h3>Connecting CSS to HTML: Embedded</h3>
<pre><code class = "html">
<head>
<style type="text/css">
p {
color: blue;
font-size: 12px;
}
</style>
</head>
</code></pre>
<p>Inside <head> element.</p>
<p>Uses <style> tag.</p>
<p>Can only be used in one html file</p>
</section>
<!-- External-->
<section>
<h3>Connecting CSS to HTML: Linked</h3>
<pre><code class = "html">
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
</code></pre>
<p>Shared resource for several pages.</p>
<p>Reduced file size & bandwidth</p>
<p>Easy to maintain in larger projects.</p>
<p>Preferred by nerds everywhere!</p>
</section>
<!-- Exercise-->
<section>
<h3>Let's develop it</h3>
<ul>
<li>Create a new .css file</li>
<li>Add a link to the file in the head of the portfolio made last time</li>
<li>Add styles to change the colors, background colors or fonts of different parts of </li>
<li>Try using ids and classes to change specific elements</li>
</ul>
</section>
<!-- Cascading-->
<section>
<h3>Cascading</h3>
<p>Styles "cascade" down until changed</p>
<pre><code class = "html">
p{
color:blue;
font-family: 'Helvetica';
}
.red{
color:red;
}
#special{
font-family: Arial;
}
</code></pre>
<pre><code class = "html">
<p>Paragraph</p>
<p class ="green">Paragraph</p>
<p class ="red">Paragraph</p>
<p class = "red" id ="special">Paragraph</p>
</code></pre>
</section>
<!-- Properties-->
<section>
<h3>CSS Properties</h3>
<p>Many CSS properties have self-explanatory names:</p>
<ul>
<li>background-color</li>
<li>font-family</li>
<li>font-size</li>
<li>color</li>
<li>width</li>
<li>height</li>
</ul>
<p><a href = "https://developer.mozilla.org/en-US/docs/CSS/CSS_Reference">Comprehensive list of all CSS properties</a></p>
</section>
<!-- Question-->
<section>
<h2>Questions?</h2>
<div style = "font-size:1200%; height:100%; margin-top:30%" class ="blue">?
<div class ="clear"></div></div>
</section>
</div>
<footer>
<div class="copyright">
HTML/CSS ~ Girl Develop It ~
<a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/3.0/80x15.png" /></a>
</div>
</footer>
</div>
<script src="reveal/lib/js/head.min.js"></script>
<script src="reveal/js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'reveal/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal/plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'reveal/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'reveal/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>