forked from EliseWei/gdi-core-intermediate-html-css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass3.html
729 lines (650 loc) · 28.3 KB
/
class3.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
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Class 3 ~ Intermediate HTML/CSS ~ Girl Develop IT</title>
<meta name="description" content="This is the official Girl Develop It Intermediate Core HTML/CSS curriculum. It was developed through the contributions of Julie Pagano, Jen Myers, Alexis Goldstein and Izzy Johnston.
The course is meant to be taught in 4 two-hour sections. 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/gdilight.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">
<!-- For the slides -->
<link rel="stylesheet" href="css/slides.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" alt=""/>
<h3>Intermediate HTML and CSS</h3>
<h4>Class 3</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>
<!-- HTML5 Forms-->
<section>
<section>
<h2>HTML5 Forms</h2>
<p>Forms are nothing new to HTML, but HTML5 has supercharged them with new field types, new attributes, browser-based validation, and a variety of new user interactions.</p>
</section>
<section>
<h2>New Form Fields</h2>
<ul>
<li>email</li>
<li>url</li>
<li>search</li>
<li>number</li>
<li>range</li>
<li>date</li>
<li>… <a href="http://html5doctor.com/html5-forms-input-types/" rel="externl" target="_blank">and more</a></li>
</ul>
</section>
<section>
<h2>New Form Attributes</h2>
<ul>
<li>placeholder</li>
<li>autofocus</li>
<li>required</li>
<li>pattern</li>
<li>list</li>
<li>novalidate</li>
<li>… <a href="http://html5doctor.com/html5-forms-introduction-and-new-attributes/" rel="external" target="_blank">and many others</a></li>
</ul>
</section>
</section>
<section>
<section>
<h2>HTML5 Forms: email</h2>
<pre><code><input type="email" name="email" required
placeholder="[email protected]"></code></pre>
<form method="post" class="example-form">
<input type="email" name="email" required
placeholder="[email protected]">
<input type="submit" value="See it in action">
</form>
</section>
<section>
<h2>HTML5 Forms: url</h2>
<pre><code><input type="url" name="url" required
placeholder="http://mydomain.com">
<input type="url" name="github_url"
placeholder="http://myusername.github.com"></code></pre>
<form method="post" class="example-form">
<input type="url" name="url" required placeholder="http://mydomain.com"><br>
<input type="url" name="github_url" placeholder="http://myusername.github.com"><br>
<input type="submit" value="See it in action">
</form>
</section>
<section>
<h2>HTML5 Forms: search</h2>
<pre><code><input type="search" name="search" required
placeholder="Ex: A8123"
pattern="^P[0-9]{4,5}$"
minlength="5" maxlength="6"></code></pre>
<form method="post" class="example-form">
<p style="font-size: .75em;"><label>Search by Product ID:</label>
<input type="search" name="search" required placeholder="Ex: P8123" pattern="^P[0-9]{4,5}$" minlength="5" maxlength="6">
<input type="submit" value="See it in action">
<br>
<small>Product IDs start with a 'P', followed by 4 or 5 numbers</small>
</p>
</form>
</section>
<section>
<h2>HTML5 Forms: number</h2>
<pre><code><input type="number" name="number" required
placeholder="Quantity"
step="12" min="12" max="144"></code></pre>
<form method="post" class="example-form">
<input type="number" name="number" required placeholder="Quantity" step="12" min="12" max="144" style="min-width: 100px;">
<input type="submit" value="See it in action">
</form>
</section>
<section>
<h2>HTML5 Forms: range</h2>
<pre><code><input type="range" name="range" required
min="0" max="100" step="10"
value="20">
<output for="range" id="rating">20</output></code></pre>
<form method="post" class="example-form">
<input type="range" name="range" required min="0" max="100" step="10" value="20"
oninput="showVote(value)">
<output for="range" id="rating">20</output>
<script>var showVote = function(value) {document.querySelector('#rating').value = value;}</script>
</form>
<p><small>There’s JS behind the scenes that modifies the value shown.</small></p>
</section>
<section>
<h2>HTML5 Forms: date</h2>
<pre><code><form method="post" novalidate>
<input type="date" name="date" required>
<form></code></pre>
<form method="post" novalidate class="example-form">
<input type="date" name="date" required>
<input type="submit" value="See it in action">
</form>
</section>
<section>
<h2>HTML5 Forms: datalist</h2>
<pre><code><input type="text" name="favorite_woman"
placeholder="Who is your hero?"
list="women" required>
<datalist id="women">
<option value="Ada Lovelace" >
<option value="Grace Hopper">
<option value="Frances Allen">
<option value="Barbara Liskov">
<option value="Anita Borg">
<option value="Maria Klawe">
</datalist></code></pre>
<form method="post" class="example-form">
<input type="text" name="favorite_women" required
placeholder="Who is your hero?" list="women">
<datalist id="women">
<option value="Ada Lovelace" >
<option value="Grace Hopper">
<option value="Frances Allen">
<option value="Barbara Liskov">
<option value="Anita Borg">
<option value="Maria Klawe">
</datalist>
<input type="submit" value="See it in action">
</form>
</section>
</section>
<section>
<section>
<h2>HTML5 Form Browser Support</h2>
<p><a href="http://caniuse.com/#feat=forms" rel="external" target="_blank">Can I Use HTML5 Form Features</a></p>
<p><strong>There’s no reason to <em>not</em> start using these fields now!</strong></p>
<p>But, sometimes you'll need a JavaScript fallback for the fancier parts like date pickers.</p>
<p><a href="http://diveintohtml5.info/forms.html" rel="external" target="_blank">Dive Into HTML5 Forms</a></p>
</section>
</section>
<!-- Let's Develop It-->
<section>
<h2>Let's Develop It</h2>
<p>There’s a new form on our Women In Computing page.</p>
<p>Enhance it to use new HTML5 input types and basic browser validation.</p>
<p><small>Sorry, making it submit somewhere is beyond the scope of this class…</small></p>
</section>
<!-- What is Microdata-->
<section>
<section>
<h2>Microdata</h2>
</section>
<section>
<h2>Microdata</h2>
<p class="yellow">Micro-what?</p>
<p class="fragment">From the W3C spec:</p>
<blockquote class="fragment">Sometimes, it is desirable to annotate content with specific machine-readable labels...</blockquote>
<blockquote class="fragment">Microdata allows nested groups of namevalue pairs to be added to documents, in parallel with the existing content.</blockquote>
<a href="http://www.w3.org/TR/microdata/#overview" target="_blank">Microdata Overview</a>
</section>
<section>
<h2>Microdata</h2>
<p class="yellow">Sounds <strong>BORING</strong></p>
<p>Why should I care?</p>
<img src="images/bored-cat.jpg" style="max-height:300px;" alt=""/>
</section>
<section>
<h2>Microdata</h2>
<p>Wouldn't it be great if the search results for your restaurant looked like this?</p>
<img src="images/place-microdata.png" alt=""/>
</section>
<section>
<h2>Microdata</h2>
<p>Or if search results for your book looked like this?</p>
<img src="images/person-microdata.png" alt=""/>
</section>
<section>
<h2>Microdata</h2>
<p>Or if search results for your recipe looked like this?</p>
<img src="images/recipe-microdata.png" alt=""/>
</section>
</section>
<!-- Rich Snippets-->
<section>
<section>
<h2>Rich Snippets</h2>
<blockquote class="fragment">The more information a search result snippet can provide, the easier it is for users to decide whether that page is relevant to their search.</blockquote>
<a href="http://support.google.com/webmasters/bin/answer.py?hl%3Den%26answer%3D99170" target="_blank">Rich snippets</a>
</section>
<section>
<h2>Rich Snippets</h2>
<blockquote class="fragment">With rich snippets, webmasters with sites <strong>containing structured</strong> content...can label their content to make it clear that each labeled piece of text represents a certain type of data: for example, a restaurant name, an address, or a rating.</blockquote>
<a href="http://support.google.com/webmasters/bin/answer.py?hl%3Den%26answer%3D99170" target="_blank">Rich snippets</a>
</section>
</section>
<!-- Structure attributes-->
<section>
<section>
<h2>Microdata Structure</h2>
<p>We will add microdata to our favorite pizza restaurant</p>
<pre><code contenteditable>
<div>
L'Amourita Pizza
Located at 123 Main St, Albuquerque, NM.
Phone: 206-555-1234
<a href="http://pizza.com">http://pizza.com</a>
</div>
</code></pre>
</section>
<section>
<h2>Microdata Structure</h2>
<p>We need to define three things to add microdata to our sites:</p>
<ul>
<li class="fragment">Itemscope attribute</li>
<li class="fragment">Itemtype attribute</li>
<li class="fragment">Itemprop attribute</li>
</ul>
</section>
</section>
<!-- Item scope-->
<section>
<section>
<h2>Microdata Structure</h2>
<p class="yellow">Itemscope</p>
<pre><code contenteditable>
<div itemscope>
L'Amourita Pizza
Located at 123 Main St, Albuquerque, NM.
Phone: 206-555-1234
<a href="http://pizza.com">http://pizza.com</a>
</div>
</code></pre>
</section>
<section>
<h2>Microdata Structure</h2>
<p class="yellow">Item scope</p>
<p>Sets the "scope" of what we are describing with the microdata.</p>
<p>All elements nested inside the div with "itemscope" will adhere to the vocabulary we specify with "itemtype". (i.e. person, place, recipe)</p>
</section>
</section>
<!-- Item type-->
<section>
<section>
<h2>Microdata Structure</h2>
<p class="yellow">Itemtype</p>
<pre><code contenteditable>
<div itemscope itemtype="http://schema.org/Organization">
L'Amourita Pizza
Located at 123 Main St, Albuquerque, NM.
Phone: 206-555-1234
<a href="http://pizza.com">http://pizza.com</a>
</div>
</code></pre>
</section>
<section>
<h2>Microdata Structure</h2>
<p class="yellow">Itemtype</p>
<p>Points you to the place where a microdata type is defined</p>
<p>Since we're defining a business, we want to point to the definition of an <strong>Organization</strong></p>
<p><a href="http://schema.org" target="_blank">http://schema.org</a> defines several type including <a href="http://data-vocabulary.org/Organization" target="_blank">Organization</a></p>
</section>
</section>
<!-- Item properties-->
<section>
<section>
<h2>Microdata Structure</h2>
<p class="yellow">Itemprop</p>
<pre><code contenteditable>
<div itemscope itemtype ="http://schema.org/Organization">
<span itemprop ="name">L'Amourita Pizza</span>
Located at 123 Main St, Albuquerque, NM.
Phone: <span itemprop ="tel">206-555-1234</span>
<a href="http://pizza.com" itemprop ="url">http://pizza.com</a>
</div>
</code></pre>
</section>
<section>
<h2>Microdata Structure</h2>
<p class="yellow">Itemprop</p>
<p>Itemprop is a property of your Item's type. The available properties are listed on the relevant page at <a href="http://schema.org/docs/schemas.html" target="_blank">http://schema.org/docs/schemas</a></p>
<p>For our <strong>Organization</strong> example, the available include are: name, url, address, telephone, and location. For the full list: <a href="http://schema.org/Organization" target="_blank">http://schema.org/Organization</a></p>
</section>
<section>
<h2>Microdata Structure</h2>
<p class="yellow">Itemprop</p>
<p>Itemprop is a property of your Item's type. The available properties are listed on the relevant page at <a href="http://schema.org/docs/schemas.html" target="_blank">http://schema.org/docs/schemas</a></p>
<p>Here are properties of a <a href="http://schema.org/Recipe" target="_blank">Recipe</a></p>
<img src="images/recipe-itemprop.png" alt=""/>
</section>
</section>
<!-- Nested Microdata-->
<section>
<section>
<h2>Nested Microdata</h2>
<p>We have specified ALMOST everything for our <strong>Organization</strong>, but we still don't have entries for the address</p>
<pre><code contenteditable>
<div itemscope itemtype ="http://schema.org/Organization">
<span itemprop ="name">L'Amourita Pizza</span>
Located at 123 Main St, Albuquerque, NM.
Phone: <span itemprop ="tel">206-555-1234</span>
<a href="http://pizza.com" itemprop ="url">http://pizza.com</a>
</div>
</code></pre>
<p class ="fragment">Addresses are their own unique <strong>itemtype</strong>. So we need to <em>nest</em> the address information inside a new element with the <strong>itemtype</strong> set to Address</p>
</section>
<section>
<h2>Nested Microdata</h2>
<pre><code contenteditable>
<div itemscope itemtype ="http://schema.org/Organization">
<span itemprop ="name">L'Amourita Pizza</span>
Located at
<span itemprop ="address" itemscope itemtype ="http://schema.org/PostalAddress">
<span itemprop ="streetAddress">123 Main St</span>,
<span itemprop ="addressLocality">Albuquerque</span>,
<span itemprop ="addressRegion">NM</span>.
</span>
Phone: <span itemprop ="tel">206-555-1234</span>
<a href="http://pizza.com" itemprop ="url">http://pizza.com</a>
</div>
</code></pre>
</section>
</section>
<!-- Microdata Resources-->
<section>
<h2>Microdata Resources</h2>
<ul>
<li>To make sure google sees your page the way you expect (in terms of the microdata), use this tool: <a href="http://www.google.com/webmasters/tools/richsnippets" target="_blank">http://www.google.com/webmasters/tools/richsnippets</a></li>
<li>Getting started guide: <a href="http://schema.org/docs/" target="_blank">http://schema.org/docs/gs.html></a></li>
<li>Tutorial on microdata from Mark Pilgrim: <a href="http://diveintohtml5.info/extensibility.html" target="_blank">http://diveintohtml5.info/extensibility.html</a></li>
<li>Google overview of using Microdata for an Organization: <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=146861" target="_blank">http://www.google.com/support/webmasters/bin/answer.py?answer=146861</a></li>
</ul>
</section>
<!-- Let's Develop It-->
<section>
<h2>Let's Develop It</h2>
<p>Use the <a href="http://schema.org/Person" target="_blank">Person</a> schema to describe the women in tech. Feel free to add more info than we have to use more itemprops!</p>
</section>
<!-- Multimedia-->
<section>
<section>
<h2>
<img src="images/html5-logo/html5_multimedia.svg" height="50" alt=""/>
Multimedia
</h2>
<p>Audio and video are first class citizens in HTML5</p>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_multimedia.svg" height="50" alt=""/>
Multimedia
</h2>
<p>Useful as a replacement for flash on mobile devices</p>
<p>Flash makes mobile devices sad :(</p>
</section>
</section>
<!-- Video -->
<section>
<section>
<h2>
<img src="images/html5-logo/html5_multimedia.svg" height="50" alt=""/>
Video
</h2>
<p class="yellow">The Dream</p>
<p>The video element was created to make it unnecessary to use plugins to display video content on your pages.</p>
<p>The idea is to simplify and streamline video content delivery.</p>
<pre><code>
<video src="demo.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
</code></pre>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_multimedia.svg" height="50" alt=""/>
Video
</h2>
<p class="yellow">The Reality</p>
<p>If you want to support ALL browsers and ALL video encodings, you will still need a plugin as a last-resort fall back plan.</p>
<p>This is because not all browsers read video the same way, and older browsers (like IE<9) don't support the video element at all.</p>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_multimedia.svg" height="50" alt=""/>
Video
</h2>
<p class="yellow">The Reality</p>
<pre class="massive"><code contenteditable><video id="movie" width="320" height="240" preload controls>
<source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"' />
<source src="pr6.mp4" />
<object width="320" height="240" type="application/x-shockwave-flash" data="flowplayer-3.2.1.swf">
<param name="movie" value="flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"clip": {"url": "http://wearehugh.com/dih5/pr6.mp4", "autoPlay":false, "autoBuffering":true}}' />
<p>Download video as <a href="pr6.mp4">MP4</a>, <a href="pr6.webm">WebM</a>, or <a href="pr6.ogv">Ogg</a>.</p>
</object>
</video>
<script>
var v = document.getElementById("movie");
v.onclick = function() {
if (v.paused) {
v.play();
} else {
v.pause();
}
});
</script></code></pre>
</section>
</section>
<!-- Audio-->
<section>
<h2>
<img src="images/html5-logo/html5_multimedia.svg" height="50" alt=""/>
Audio
</h2>
<pre><code contenteditable>
<audio controls>
<source src="music.mp3" type="audio/mpeg"/>
<source src="music.aac" type="audio/mp4" />
<source src="music.ogg" type="audio/ogg"/>
<!-- now include flash fall back -->
</audio>
</code></pre>
</section>
<!-- Multimedia Resources-->
<section>
<h2>
<img src="images/html5-logo/html5_multimedia.svg" height="50" alt=""/>
Multimedia
</h2>
<p>If the dream is still far from reality, what's a dev to do?</p>
<p>The good news is, devs are working on it all the time</p>
<p><a href="http://diveintohtml5.info/video.html#" target="_blank">Video on the Web</a></p>
<p><a href="http://www.mirovideoconverter.com/" target="_blank">Miro Video Converter</a></p>
<p><a href="http://html5doctor.com/native-audio-in-the-browser/" target="_blank">Native Audio in the Browser</a></p>
</section>
<!-- Canvas-->
<section>
<section>
<h2>
<img src="images/html5-logo/html5_effects_3d.svg" height="50" alt=""/>
Canvas
</h2>
<ul>
<li>Environment for creating dynamic images</li>
<li>Canvas element + javascript = dynamic content!</li>
</ul>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_effects_3d.svg" height="50" alt=""/>
Canvas
</h2>
<ul>
<li>
<a href="http://www.datapointed.net/visualizations/math/factorization/animated-diagrams/#" target="_blank">Animated Factorization</a>
</li>
<li>
<a href="http://bomomo.com/" target="_blank">http://bomomo.com/</a>
</li>
<li>
<a href="http://canvasrider.com/" target="_blank">http://canvasrider.com/</a>
</li>
<li>
<a href="http://lights.elliegoulding.com/" target="_blank">http://lights.elliegoulding.com/</a>
</li>
<li>
<a href="http://codepen.io/jackrugile/pen/DGenc" target="_blank">Codepen.io</a>
</li>
</ul>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_effects_3d.svg" height="50" alt=""/>
Canvas
</h2>
<p>The first step is to add a canvas element to your HTML. Make sure you give it an id:</p>
<pre><code contenteditable>
<canvas id="myCanvas" width="400" height="400">
Your browser doesn’t support Canvas.
</canvas>
</code></pre>
<p class="fragment">Unfortunately, everything else (all the cool stuff) is actually in JavaScript and outside the scope of this class</p>
</section>
</section>
<!-- Geo location-->
<section>
<section>
<h2>
<img src="images/html5-logo/html5_device_access.svg" height="50" alt=""/>
Device Access
</h2>
<p>Rich, device-aware features and experiences</p>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_device_access.svg" height="50" alt=""/>
Geolocation
</h2>
<a href="https://maps.google.com/" target="_blank">Google Map</a>
<p>Browsers using HTML5 can locate you through IP addresses, WiFi connections, and GPS towers (for mobile phones and tablets)</p>
<p>But all the cool interactive stuff is, once again, done in JavaScript</p>
<p class="fragment yellow">You didn't expect HTML and CSS to do EVERYTHING, did you?</p>
</section>
</section>
<!-- Storage-->
<section>
<section>
<h2>
<img src="images/html5-logo/html5_offline_storage.svg" height="50" alt=""/>
Storage
</h2>
<p><a href="http://html5demos.com/storage" target="_blank">storage</a></p>
<p><a href="http://html5demos.com/storage-events" target="_blank">storage-events</a></p>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_offline_storage.svg" height="50" alt=""/>
Storage
</h2>
<ul>
<li class="fragment">You can use HTML5 Web Storage to persist simple data.</li>
<li class="fragment">
Two kinds of HTML5 Web Storage:
<ul>
<li>SessionStorage for per-window data</li>
<li>LocalStorage for global, persistent data (stored to hard drive through the browser)</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_offline_storage.svg" height="50" alt=""/>
SessionStorage
</h2>
<ul>
<li class="fragment">Ever accidentally bought two of the same kind of ticket, because you were shopping the same site in multiple windows/tabs?</li>
<li class="fragment">Session Storage provides a good way to prevent this.</li>
<li class="fragment">Session Storage is not saved to the user’s hard drive</li>
<li class="fragment">It only lasts for the time that a browser window or tab is open and viewing a specific site.</li>
</ul>
</section>
<section>
<h2>
<img src="images/html5-logo/html5_offline_storage.svg" height="50" alt=""/>
LocalStorage
</h2>
<ul>
<li class="fragment">With Local Storage, we can save data to the user’s computer, via the browser.</li>
<li class="fragment">When a user revisits a site in the same browser they first visited in, any data saved to Local Storage can be retrieved.</li>
<li class="fragment">Local Storage is browser-specific: Information you save while browsing with Firefox will NOT be available to Safari.</li>
</ul>
</section>
</section>
<!-- Questions? -->
<section>
<h2>Questions?</h2>
<div style="font-size:1000%; height:100%; margin-top:20%" class="blue">?
</div>
</section>
</div>
<footer>
<div class="copyright">
Intermediate 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 src="js/jquery-1.8.2.min.js"></script>
<script src="js/slides.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>
<script>
$(function(){
$('.example-form').on('submit', function(event){
alert('The form can submit!');
event.preventDefault();
});
});
</script>
</body>
</html>