forked from LinnAlexandra/LLC-HTML-CSS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·2085 lines (1872 loc) · 91.7 KB
/
index.html
File metadata and controls
executable file
·2085 lines (1872 loc) · 91.7 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
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
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ladies Learning Code - HTML + CSS</title>
<meta name="viewport" content="width=1280">
<link rel="shortcut icon" href="favicon.ico">
<!-- CoderDeck core and extension CSS files -->
<link rel="stylesheet" href="src/deck.js/core/deck.core.css" type="text/css">
<link rel="stylesheet" href="src/deck.js/extensions/navigation/deck.navigation.css">
<link rel="stylesheet" href="src/deck.js/extensions/status/deck.status.css">
<link rel="stylesheet" href="src/deck.js/extensions/hash/deck.hash.css">
<link rel="stylesheet" href="src/deck.js/extensions/menu/deck.menu.css">
<link rel="stylesheet" href="src/css/prettify.css">
<link rel="stylesheet" href="src/css/deck.coder.css">
<link rel="stylesheet" href="src/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="src/codemirror/theme/default.css">
<!-- Custom for LLC -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<!-- <link href='http://fonts.googleapis.com/css?family=Istok+Web' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Podkova' rel='stylesheet' type='text/css'> -->
<link rel="stylesheet" id='style-theme-link' href="src/css/coderdeck.css" type="text/css" >
<style type="text/css"></style>
<script type="text/javascript">
function showHint(answerContainerId) {
var preTags = document.getElementById(answerContainerId).style.display = "block";
}
</script>
</head>
<body class="deck-container">
<script type='text/coderdeck' id='coderdeck-default'>
<html>
<head>
<script src='src/jquery.min.js'>SCRIPTEND</head>
<body>CODE</body>
</html>
</script>
<script type='text/coderdeck' id='coderdeck-style-example'>
<html>
<title>test</title>
<style>CODE</style>
<body>
<h1>I'm a H1 heading</h1>
<h2>I'm a H2 heading</h2>
<p>Pargraph of text <p> here</p>
<div class='stuff'>I'm a div <div> with class "stuff"</div>
<div id='my-div'>I'm a <div> with id "my-div"</div>
</body>
</html>
</script>
<div id="presentation">
<!-- **************************************** -->
<!-- SLIDE 0: Workshop intro -->
<article class='slide slide-title'>
<div class="workshop_title">
<h1>Introduction to HTML & CSS</h1>
</div>
<div class="instructor_holder">
<h2 class="centered">Your instructors today</h2>
<div>
<img src="assets/greg_avatar.png" width="72" height="72" alt="greg sullivan" />
<h4>Greg Sullivan — HTML</h4>
greg [at] swivelbase.com
<br />
<a href="http://swivelbase.com" target="_blank">swivelbase.com</a>
</div>
<div>
<img src="assets/linn_avatar.png" width="72" height="72" alt="linn øyen farley" />
<h4>Linn Øyen Farley — CSS</h4>
linn [at] drollic.net
<br />
<a href="http://drollic.net" target="_blank">drollic.net</a>
//
<a href="http://twitter.com/Linndelicate" target="_blank">@Linndelicate</a>
</div>
<br clear="left" />
</div>
<p style="padding-top: 75px; margin-bottom: 0; font-size: 0.9em; color: #999;">
(Original slides by <a href="http://klab.ca/+" target="_blank">Pearl Chen</a>; interactive code slides thanks to
<a href="http://cykod.github.com/CoderDeck/" target="_blank" style="color: #999;">CoderDeck</a>)
</p>
</article>
<!-- SLIDE 1: Course Outline -->
<article class='slide slide-list'>
<h2>Course Outline</h2>
<h3 style="margin-top: 1em;">Morning</h3>
<ul>
<li>What is a website?</li>
<li>What do we need to make one?</li>
<li>Introducing HTML</li>
</ul>
<h3 style="margin-top: 1em;">Afternoon</h3>
<ul>
<li>Introducing CSS</li>
<li>Getting your website online</li>
</ul>
</article>
<!-- SLIDE 2: Development Environment -->
<article class='slide slide-subhead'>
<h1>Web Development Tools</h1>
<p>What you’ll need to get started</p>
</article>
<!-- SLIDE 3: Web Browser -->
<article class='slide slide-list'>
<h2>1. Web Browser</h2>
<p>
Choose a modern Web browser that has good development tools to help make building webpages easier.
</p>
<div class="centered contains_sidebyside_icons">
<a href="https://www.google.com/chrome" target="_blank"><img src="assets/ChromeIcon.png" width="125" height="125" alt="Chrome" /></a>
<br/>
<a href="https://www.google.com/chrome" target="_blank">Google Chrome</a>
</div>
<br clear="all" />
<br />
<br />
<br />
<p class="sidenote centered">
(If you are unable to install Chrome:
<br />
install
<a href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">Firefox</a> <b>and</b>
<a href="http://getfirebug.com/" target="_blank">Firebug</a>.)
</p>
</article>
<!-- SLIDE 4: Code Editor -->
<article class='slide slide-list'>
<h2>2. Text Editor</h2>
<p>Although you could write code in Notepad or TextEdit, choose a text editor with code colour highlighting and other helpful features.</p>
<p>There are many, <em>many</em> free and paid options. I recommend this one (it’s free to evaluate):</p>
<div class="centered contains_sidebyside_icons">
<a href="http://www.sublimetext.com" target="_blank"><img src="assets/SublimeTextIcon.jpg" width="125" height="125" alt="Sublime Text 2" /></a>
<br />
<a href="http://www.sublimetext.com/" target="_blank">Sublime Text</a>
</div>
<br clear="all" />
</article>
<!-- SLIDE 5: Hackasaurus -->
<article class='slide slide-list'>
<h2>3. X-Ray Goggles</h2>
<p>
Use this bookmarklet to “inspect” any webpage and see how it’s built. Click and <strong><em>drag</em></strong> the orange box into your bookmarks bar to install.
</p>
<p class="sidenote centered">
(If you can’t see your bookmarks bar, you can turn it on from the View menu.)
</p>
<br /><br /><br />
<div class="centered contains_sidebyside_icons">
<a id="hackasaurus" href="javascript:(function(){var script=document.createElement('script');script.src='http://webxray.hackasaurus.org/webxray.js';script.className='webxray';document.head.appendChild(script);})();">X-Ray Goggles</a>
<br /><br />
(from <a href="http://hackasaurus.org/en-US/goggles/install/" target="_blank">Hackasaurus</a> by Mozilla)
</div>
<br clear="all" />
<br />
<br />
<br />
</article>
<!-- SLIDE 6: FTP -->
<article class='slide slide-list'>
<h2>4. File Transfer Program (FTP)</h2>
<p>
FTP software lets you upload your webpages to a server where the rest of the world can see them!
</p>
<div class="centered contains_sidebyside_icons">
<a href="http://cyberduck.ch/" target="_blank"><img src="assets/CyberduckIcon.png" width="125" height="125" alt="CyberDuck" /></a>
<br />
<a href="http://cyberduck.ch/" target="_blank">CyberDuck</a>
</div>
<br clear="all" />
<br />
<br />
<br />
<p class="sidenote centered">
Again, there are many, many free and paid options.
<br />
<a href="http://filezilla-project.org/" target="_blank">FileZilla</a>
is good when you're more advanced.
</p>
</article>
<!-- SLIDE 7 -->
<article class='slide slide-subhead'>
<h1>Organizing your files</h1>
<p>Websites, webpages, and file structures</p>
</article>
<!-- SLIDE 8: What is a website? -->
<article class='slide slide-list'>
<h2>What is a website?</h2>
<p>A
<span class="keyword">website</span>
is made up of many
<span class="keyword">webpages</span>.
</p>
<div class="centered">
<img src="assets/website_structure.gif" width="580" heigth="320" alt="website structure" />
</div>
</article>
<!-- SLIDE 9: What is a website? -->
<article class='slide slide-list'>
<h2>What is a website?</h2>
<p>These webpages closely match a file folder structure.</p>
<div class="centered">
<img src="assets/website_structure.gif" width="440" alt="website structure" /> <img src="assets/folder_structure-simple.png" width="362" height="152" alt="folder structure" />
</div>
</article>
<!-- SLIDE 10: What is a website? -->
<article class='slide slide-list'>
<h2>What is a website?</h2>
<p>Essentially this folder is located on a dedicated computer (also known as a <span class="keyword">server</span>) that <span class="keyword">hosts</span> websites.</p>
<div class="centered">
<img src="assets/webserver_download.png" width="738" height="531" alt="web request process" />
</div>
</article>
<!-- SLIDE 11: What is a website? -->
<article class='slide slide-list'>
<h2>Good file naming habits</h2>
<ul class="spacey_list">
<li>
Keep your file names in <strong>all lowercase</strong>.<br />
<span class="sidenote"><code>about.html</code> instead of <code>About.html</code> or <code>ABOUT.html</code></span>
</li>
<li>
Avoid <code>s p a c e s</code> in your file name. Use underscores <code>(_)</code> or dashes <code>(-)</code> instead. Dashes are generally preferred for SEO.<br />
<span class="sidenote"><code>business_hours.html</code> or <code>business-hours.html</code> instead of <code>business hours.html</code><br />
(The browser will interpret it as <code>business%20hours.html</code>)</span>
</li>
<li>
For the same reason, avoid symbols like <code># & *</code> in your file name.
</li>
<li>
Keep your file names concise, yet meaningful.<br />
<span class="sidenote"><code>about.html, contact.html</code> instead of <code>page1.html, page2.html</code></span>
</li>
</ul>
</article>
<!-- SLIDE 12 -->
<article class='slide slide-list'>
<h2>A basic webpage</h2>
<p>
A webpage is mainly built using 3 web languages:
</p>
<table width="100%">
<tr>
<td width="33%" class="centered"><strong>HTML</strong> (Hypertext Markup Language) <br>
is the markup language.</td>
<td width="33%" class="centered"><strong>CSS</strong> (Cascading Style Sheets) <br>
is the style sheet language.</td>
<td width="33%" class="centered"><strong>JavaScript</strong><br>
is the programming language.</td>
</tr>
<tr>
<td class="centered"><img src="assets/TRIAD-html.gif" width="267" height="241" alt="content layer" /></td>
<td class="centered"><img src="assets/TRIAD-css.gif" width="261" height="241" alt="Presentation Layer" /></td>
<td class="centered"><img src="assets/TRIAD-js.gif" width="274" height="241" alt="Behaviour Layer" /></td>
</tr>
<tr>
<td class="centered">It should define the <strong>content</strong>.</td>
<td class="centered">It should define the <strong>presentation</strong></td>
<td class="centered">It should define <strong>behaviour</strong>.</td>
</tr>
</table>
</article>
<!-- SLIDE 13 -->
<article class='slide slide-subhead'>
<h1>Dive into HTML</h1>
<p>The content layer</p>
<p><img src="assets/TRIAD-html.gif" width="267" height="241" alt="content layer" /></p>
</article>
<!-- SLIDE 14: HTML -->
<article class='slide slide-list'>
<h2>What is HTML?</h2>
<p>HTML was created for <span class="keyword">web browsers</span> to read.</p>
<p>This makes perfect sense to a web browser:</p>
<pre class="prettyprint"><!DOCTYPE html><html><head><title></title></head><body></body></html></pre>
</article>
<!-- SLIDE 15: HTML -->
<article class='slide slide-list'>
<h2>What is HTML?</h2>
<p>Indentation can make your HTML easier for humans to read.</p>
<pre class='prettyprint'><!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<body>
</body>
</html></pre>
<p class="sidenote">(Later on, you might notice automatic colour coding in your code editor helps a lot too.)</p>
</article>
<!-- SLIDE 16: HTML -->
<article class='slide slide-list'>
<h2>HTML tags</h2>
<p>The structure of a webpage is defined by HTML <span class="keyword">tags</span>. Angled brackets denote tags, like this:</p>
<p class="centered" style="font-size: 3em;"><code><tag></code></p>
</article>
<!-- SLIDE 17: HTML -->
<article class='slide slide-list'>
<h2>HTML tags</h2>
<p>Tags typically come in <strong>pairs</strong> – an opening tag and a closing tag. The closing tag is indicated by a forward slash:</p>
<p class="centered" style="font-size: 3em;"><code><tag><<span style="color:red;">/</span>tag></code></p>
<p class="sidenote">Some examples:</p>
<pre class="prettyprint" style="width: 45%; float: left;"><!DOCTYPE html>
<strong><html></strong>
<head>
<title> </title>
</head>
<body>
</body>
<strong></html></strong></pre>
<pre class="prettyprint" style="width: 45%; float: right;"><!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<strong><body></strong>
<strong></body></strong>
</html></pre>
<br clear="all" />
</article>
<!-- SLIDE 18: HTML -->
<article class='slide slide-list'>
<h2>HTML tags</h2>
<p>The are many different HTML tags. Each are used to add <span class="keyword"><a href="http://www.adobe.com/devnet/html5/articles/semantic-markup.edu.html" target="_blank" style="color:#B1009A;">semantics</a></span> (meaning) to the content on the as well as for structure.</p>
<p>Practice writing a <code>body</code> tag with me here:</p>
<textarea class="coder-editor coder-editor-full"></textarea>
<script type="coder-solution"><body></body></script>
</article>
<!-- SLIDE 19: HTML -->
<article class='slide slide-list'>
<h2>HTML tags</h2>
<p>Tags can be "nested" within other tags, like this:</p>
<p class="centered" style="font-size: 2.5em;"><code><tag><span style="font-size: 1.3em; color: purple;"><tag></tag></span></tag></code></p>
<p class="centered sidenote">(This relationship is often referred to using the terms “parent” node and “child” nodes.)</p>
<br />
<p class="sidenote" style="margin-bottom: 0px;">Example of basic tags needed to build a website:</p>
<ul class="sidenote">
<li><code><title></title></code> is nested between opening <code><head></code> and closing <code></head></code> tags</li>
<li><code><head></code> is the parent node and <code><title></code> is the child node.</li>
<li>Going further, <code><head></code> is also (at the same time) a child node of <code><html></code>.</li>
<li><code><html></code> is the always the “root” node and has <strong>no</strong> parent nodes.</li>
<li>Notice that <code><head></code> and <code><body></code> are on the same level. They are both child nodes of <code><html></code>.</li>
</ul>
<pre class="prettyprint" style="width: 45%; float: left;"><!DOCTYPE html>
<html>
<head>
<strong><title></strong> <strong></title></strong>
</head>
<body>
</body>
</html></pre>
<pre class="prettyprint" style="width: 45%; float: right;"><!DOCTYPE html>
<html>
<strong><head></strong>
<title> </title>
<strong></head></strong>
<body>
</body>
</html></pre>
<br clear="all" />
</article>
<!-- SLIDE 20: HTML -->
<article class='slide slide-list'>
<h2>HTML tags</h2>
<p>Tags can be "nested" within other tags, like this:</p>
<p class="centered" style="font-size: 2.5em;"><code><tag><span style="font-size: 1.3em; color: purple;"><tag></tag></span></tag></code></p>
<p>Let's practice writing an <code>html</code> tag with a <code>head</code> and <code>body</code> tag nested inside:</p>
<textarea class="coder-editor coder-editor-full"></textarea>
<script type="coder-solution"><html>
<head>
</head>
<body>
</body>
</html></script>
<br clear="all" />
<p class="centered sidenote"><strong>Remember:</strong> The innermost tag must be closed <strong>before</strong> trying to open up a new tag.<br />
This would be incorrect: <html><head><body></html></head></body> </p>
</article>
<!-- SLIDE 21: HTML -->
<article class='slide slide-list'>
<h2>HTML tags</h2>
<p>Tags can be "nested" within other tags, like this:</p>
<p class="centered" style="font-size: 2.5em;"><code><tag><span style="font-size: 1.3em; color: purple;"><tag></tag></span></tag></code></p>
<p>Now where does the <code>title</code> tag get nested? Practice here:</p>
<textarea class="coder-editor coder-editor-full"><html>
<head>
</head>
<body>
</body>
</html></textarea>
<script type="coder-solution"><html>
<head>
<title></title>
</head>
<body>
</body>
</html></script>
<br clear="all" />
<p class="centered sidenote"><strong>Remember:</strong> The innermost tag must be closed <strong>before</strong> trying to open up a new tag.<br />
This would be incorrect: <html><head><title></html></head></title> </p>
</article>
<!-- SLIDE 22: HTML -->
<article class='slide slide-list'>
<h2>HTML in a web browser</h2>
<p>If you ever forget the basic tags needed to build a basic webpage, <a href="exercises/barebones.html"><code>exercises/barebones.html</code></a> is available to copy and use.</p>
<p>Let’s open it up in our code editor!</p>
<div class="reminders"><p>Most computers are set to open <code>.html</code> files in the default web browser so <strong>right-click</strong> (Ctrl+click or 2-finger click on Mac) and select the “<strong>open with...</strong>” option.</p></div>
</article>
<!-- SLIDE 23: HTML -->
<article class='slide slide-list'>
<h2>HTML in a web browser</h2>
<p>So if I view <a href="exercises/barebones.html" target="_blank"><code>barebones.html</code></a> in a web browser, I don't see anything interesting yet...</p>
<div class="reminders single-line"><p>If Chrome is not your default web browser, <strong>right-click</strong> and select the “<strong>open with...</strong>” option.</p></div>
</article>
<!-- SLIDE 24: HTML -->
<article class='slide slide-list'>
<h2>HTML in a web browser</h2>
<p>But I can right-click and select <strong>View Page Source</strong> to see what the HTML is to confirm that it's not a blank file.</p>
<p class="sidenote">(I suggest that you do this any time you see something you like so you can reverse-engineer it.)</p>
<p class="centered"><img src="assets/llcodedotcom_viewsource.gif" width="468" height="362" alt="view source" style="margin-right: 30px;" /></p>
</article>
<!-- SLIDE 25: HTML -->
<article class='slide slide-list'>
<h2>HTML Document Types</h2>
<p>What about the 1st line?</p>
<pre class='prettyprint'><!DOCTYPE html></pre>
<p>This is a <span class="keyword">Document Type Declaration</span> a.k.a <code>DOCTYPE</code>. This indicates to the web browser what <strong>version</strong> of HTML the file is written in. This helps the browser render the content correctly based on the rules denoted by the <code>DOCTYPE</code>.</p>
<p class="sidenote">Consider how old versions of Microsoft Office or Photoshop have problems opening files that were created in later versions of the software. For example, it could be an <a href="http://www.alistapart.com/articles/doctype/">older document type</a> like the ones below, or the newer "HTML5" one that we're using above.</p>
<pre class="prettyprint"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"></pre>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"></pre>
</p>
</article>
<!-- SLIDE 26: HTML -->
<article class='slide slide-list'>
<h2>HTML content</h2>
<p>Your webpage’s content goes in between the opening and closing HTML tags like this:</p>
<p class="centered" style="font-size: 3em;"><code><tag><span style="color: #333;">Content</span></tag></code></p>
<pre class="prettyprint"><!DOCTYPE html>
<html>
<head>
<title><strong>Home</strong></title>
</head>
<body><strong>
You are currently looking at index.html.
</strong></body>
</html></pre>
</article>
<!-- SLIDE 27: HTML -->
<article class='slide slide-list'>
<h2>HTML content</h2>
<p>The human-viewable content of a HTML tag goes in between the opening and closing tags like this:</p>
<p class="centered" style="font-size: 3em;"><code><tag><span style="color: #333;">Content</span></tag></code></p>
<p>Practice writing a <code>body</code> tag with some human-viewable content here:</p>
<textarea class="coder-editor"></textarea>
<script type="coder-solution"><body>Hello!</body></script>
<br clear="all" />
</article>
<!-- SLIDE 28: HTML -->
<article class='slide slide-list'>
<h2><code><head></code> vs <code><body></code></h2>
<p>I’m going to edit a copy of <code>barebones.html</code> to answer the questions below and to prepare you for the following exercise you’ll do on your own time.</p>
<ul class="spacey_list">
<li>
What happens when I change the content in the <code><title></code> tag?
</li>
<li>
What’s the difference between putting a tag in-between the <code><head></code> tag versus the <code><body></code> tag?
</li>
</ul>
</article>
<!-- SLIDE 29: HTML -->
<article class='slide slide-list'>
<h2>Exercise #1 (15 minutes)</h2>
<ol class="spacey_list">
<li>Make a local copy of <code>index.html</code> in the <code>1_BASIC_HTML_WEBSITE</code> folder and rename it <code>copy.html</code>.<div class="sidenote">(This is so you can always refer back to index.html when needed.)</div></li>
<li>Open <code>copy.html</code> in Chrome to see the original version.</li>
<li>Open <code>copy.html</code> in your text editor and edit the content within the opening and closing tags.</li>
<li>Make sure to save <code>copy.html</code> after changes have been made.</li>
<li>View how <code>copy.html</code> has changed in Chrome by refreshing the webpage.</li>
<li>Explore some of the HTML tags listed on the <strong>next slide</strong> by adding them to your <code>copy.html</code>. Re-save and re-view in Chrome.</li>
</ol>
</article>
<!-- SLIDE 30: HTML -->
<article class='slide slide-list'>
<h2>Exercise #1 - Basic HTML tags</h2>
<div class="sidenote">
(Don't forget that viewable content goes in-between opening and closing tag pairs. Most text editors will give you hints when you might not have closed a tag.)
</div>
<div class="cheatsheet">
<div>
<h3>Hierarchy</h3>
<p>
<code><hl></code>, <code><h2></code>, <code><h3></code>, <code><h4></code>, <code><h5></code> and <code><h6></code> – Heading levels 1 to 6<br />
<code><p></code> – Paragraph<br />
</p>
</div>
<div>
<h3>Text Formatting</h3>
<p><code><b></code> or <code><strong></code> – Bold<br />
<code><i></code> or <code><em></code> – Italics or emphasis<br /></p>
</div>
<div>
<h3>Section Formatting</h3>
<p>
<code><blockquote></code> – A block quote for extended quotations<br /></p>
</div>
</div>
<br clear="all" />
<p class="sidenote">You can practice writing some of these tags in the area below:</p>
<textarea class="coder-editor"></textarea>
<br clear="all" />
</article>
<!-- SLIDE 32 -->
<article class='slide slide-subhead'>
<h1>Going deeper</h1>
<p>Get to know HTML even better</p>
</article>
<!-- SLIDE 33: HTML -->
<article class='slide slide-list'>
<h2>Empty Tags</h2>
<p><span class="keyword">Empty tags</span> don’t format content – instead they are used to render or embed objects in our page.</p>
<p>These tags <strong>do not</strong> come in pairs of opening and closing tags like <code>h1</code> or <code>p</code> tags; instead, there is only an opening tag that “self-closes” with a back slash (<code>/</code>) immediately before the right-angled bracket (<code>></code>).</p>
<p class="centered" style="font-size: 3em;"><code><tag /></code></p>
</article>
<!-- SLIDE 34: HTML -->
<article class='slide slide-list'>
<h2>Empty Tags</h2>
<div class="cheatsheet">
<div>
<br />
(Remember, XTHML requires void elements to be self closed, HTML5 <code>DOCTYPE</code> accepts either syntax)<br />
<code><hr></code> or <code><hr /></code> - horizontal rule<br />
<code><br></code> or <code><br /></code> - line break<br />
<code><input></code> or <code><input /></code> - text input boxes<br />
<hr />
<p>
<code><img /></code> – An image <em>(We'll cover images very soon.)</em><br />
<code><link /></code> – An external resource like a style sheet. <em>(We'll cover this in more detail this afternoon.)</em><br />
</p>
</div>
</div>
</article>
<!-- SLIDE 35: HTML -->
<article class='slide slide-list'>
<h2>Quick review:</h2>
<ul>
<li><strong>HTML tags</strong> define <em>structure</em>.</li>
<li><strong>Text between opening & closing tags</strong> makes up our <em>content</em>.</li>
<li><strong>Empty HTML tags</strong> render special objects like line breaks and images.</li>
</ul>
<p>Consider the <code>img</code> tag. Not very exciting right?</p>
<textarea class="coder-editor"><p>Kicking up HTML a notch.</p>
<img />
<p>Do you agree?</p></textarea>
</article>
<!-- SLIDE 36: HTML -->
<article class='slide slide-list'>
<h2>Attributes</h2>
<p>Sometimes we need to define values that users don’t see, but that are used by the browser to render content like hyperlinks, images, or video.</p>
<p class="sidenote">Here's that same <code>img</code> tag but now it's using an HTML <span class="keyword">attribute</span> to tell my webpage where to find a source image:</p>
<textarea class="coder-editor coder-editor-full"><p>Kicking up HTML a notch.</p>
<img src="http://goo.gl/7eSU5" />
<p>Do you agree?</p></textarea>
<br clear="all" />
<div class="reminders single-line"><p>Remember, <code>img</code> is a void HTML tag so it's <strong>not</strong> <code><img>http://goo.gl/7eSU5</img></code></p></div>
</article>
<!-- SLIDE 37: HTML -->
<article class='slide slide-list'>
<h2>Working with images</h2>
<p>Images are an example of an <span class="keyword">empty tag</span> with an <span class="keyword">attribute</span>.</p>
<pre class="prettyprint"><img src="http://goo.gl/7eSU5" /></pre>
<ul>
<li><code>src</code> is the <em>attribute</em></li>
<li><code>http://goo.gl/7eSU5</code> is the <em>value</em> of that attribute<br />
<span class="sidenote">Values are typically surrounded by <em>double quotes</em> since values may contain spaces.</span></li>
</ul>
<p>With an <code>img</code> tag, the value of the <code>src</code> attribute tells the browser what the <em>source</em> of our image is.</p>
</article>
<!-- SLIDE 38: HTML -->
<article class='slide slide-list'>
<h2>Working with images</h2>
<p>Tags can have more than one attribute, some <strong>required</strong> (like <code>src</code>) and others are <strong>optional</strong>:</p>
<ul style="margin-top: -1em;">
<li><code>width</code> and <code>height</code> tell the browser what dimension to <em>display</em> the image at.</li>
</ul>
<hr />
<p>For example, without <code>width</code> and <code>height</code> attributes, the browser displays image at original size.</p>
<pre class="prettyprint"><img src="http://goo.gl/7eSU5" /></pre>
<img src="http://goo.gl/7eSU5" />
<hr />
<p>Now with a manipulated width and height (about 50% smaller):</p>
<pre class="prettyprint"><img src="http://goo.gl/7eSU5" width="320" height="262" /></pre>
<img src="http://goo.gl/7eSU5" width="320" height="262" />
</article>
<!-- SLIDE 39: HTML -->
<article class='slide slide-list'>
<h2>Working with images</h2>
<p>Another important image attribute:</p>
<ul style="margin-top: -1em;">
<li><code>alt</code> is <em>alternative text</em> to display to visually impaired web visitors using screen readers. It also shows up when there's a "broken image" due to typos or moved files.<br />
<span class="sidenote">(The img tag will work without the alt attribute but it's required to be "<a href="http://validator.w3.org/"target="_blank">valid</a>" HTML markup,<br /> which is why you might see <code>alt=""</code> often used.)</span></li>
</ul>
<textarea class="coder-editor"><img
src="http://goo.gl/7eSU5"
width="160"
height="131"
alt="HTML LOLcat" /></textarea>
</article>
<!-- SLIDE 40: HTML -->
<article class='slide slide-list'>
<h2>Working with images</h2>
<p>In the <code>exercises/2_WORKING_WITH_IMAGES</code> folder, there’s an <code>index.html</code> file and 3 images of various types.</p>
<div class="reminders"><p>To make your web development life easier, turn on the option to see the file extension type in Explorer (<a href="http://windows.microsoft.com/en-US/windows-vista/Show-or-hide-file-name-extensions" target="_blank">Windows instructions</a>) or Finder (<a href="http://osxdaily.com/2012/01/13/show-filename-extensions-in-mac-os-x/" target="_blank">Mac instructions</a>).</p></div>
<p>Image file type comparison:</p>
<ul style="margin-top: -1em;">
<li>
<span class="keyword">.gif</span> – Smaller file size when used for line art, charts, and images with minimal colour variation
</li>
<li>
<span class="keyword">.jpg</span> – Smaller file size when used for photographs with lots of rich colours or gradients
</li>
<li>
<span class="keyword">.png</span> – Larger file size, but provides the best quality and is great for images with transparent backgrounds
</li>
</ul>
<center>
<div class="sidenote">As a gif: 600 x 247, 8kb</div>
<img src="assets/img-example-gif.gif" />
<br />
<div class="sidenote">As a jpeg: 600 x 247, 9kb</div>
<img src="assets/img-example-jpg.jpg" />
<br />
<div class="sidenote">As a png: 600 x 247, 18kb</div>
<img src="assets/img-example-png.png" />
</center>
</article>
<!-- SLIDE 41: HTML -->
<article class='slide slide-list'>
<h2>Working with images</h2>
<p>Code along with me:</p>
<ol class="spacey_list">
<li>Open <a href="exercises/2_WORKING_WITH_IMAGES/index.html" target="_blank"><code>exercises/2_WORKING_WITH_IMAGES/index.html</code></a> in your text editor.</li>
<li>Click on the above link to also view <code>index.html</code> in Chrome. </li>
<li>Use the <code>img</code> tag to embed an image of our fave LOL cat using <code>http://goo.gl/7eSU5</code> for the value of the <code>src</code> attribute.</li>
<li>Save and refresh the webpage in the browser to make sure you got it right.</li>
</ol>
<p class="centered" style="font-size: 2.5em;">This is an example of an <span class="keyword">absolute path</span>.</p>
<p>It’s “fully resolved” and starts with <code>http://</code> much like a url from the browser’s URL bar.</p>
</article>
<!-- SLIDE 42: HTML -->
<article class='slide slide-list'>
<h2>Working with images <span style="font-size: 22px;">(Group exercise – Part 2)</span></h2>
<p>Code along with me:</p>
<ol>
<li>Return to our <code>img</code> tag in <code>index.html</code> and use <code>llc.gif</code>, a file we have locally, as our image source.</li>
</ol>
<p class="centered" style="font-size: 2.5em;">This is an example of a <span class="keyword">relative path</span>.</p>
<p>Relative paths use the HTML file that you’re working on as the starting point to find the location of your image.</p>
<p>Right now, <code>llc.gif</code> is in the <strong>same folder</strong> as <code>index.html</code>, so we can simply use the filename as our image source.</p>
<ol start="2">
<li>Open the <a href="exercises/2_WORKING_WITH_IMAGES/images/images.html" target="_blank"><code>images.html</code></a> file in the <code>img</code> folder in your text editor.</li>
<li>Click on the above link to also view <code>images.html</code> in Chrome. </li>
<li>Note that there’s already an <code>img</code> tag in <code>images.html</code> trying to embed <code>llc.gif</code>.</li>
</ol>
</article>
<!-- SLIDE 43: HTML -->
<article class='slide slide-list'>
<h2>Working with images <span style="font-size: 22px;">(Group exercise – Part 3)</span></h2>
<p>To write a <span class="keyword">relative path</span> that goes <strong><em>up</em></strong> a folder, start the path with <code>../</code></p>
<pre class="prettyprint"><img src="<strong>../</strong>llc.gif" /></pre>
<p>Code along with me:</p>
<ol class="spacey_list">
<li>Return to our <code>img</code> tag in <code>images.html</code> and add <code>../</code> in front of <code>llc.gif</code>.</li>
</ol>
<hr />
<p class="sidenote"><strong>Note:</strong> "<code>../</code>" can be used multiple times if you have many nested folders.</p>
<pre class="prettyprint"><img src="<strong>../../../../</strong>llc.gif" /></pre>
</article>
<!-- SLIDE 44: HTML -->
<article class='slide slide-list'>
<h2>Working with images <span style="font-size: 22px;">(Group exercise - Part 4)</span></h2>
<p>However, it's best practice to organize your images into its own folder to keep your website's file structure tidy.</p>
<p class="sidenote">We tend to also organize JavaScript and CSS files into their own "js" or "css" folder.</p>
<p>So let's <strong>move all of our images into the <code>images</code> folder</strong> of <code>2_WORKING_WITH_IMAGES</code>.</p>
<p>Uh oh! Now our image will be broken in <code>index.html</code> since the image is no longer in the same folder. Let's fix that...</p>
</article>
<!-- SLIDE 45: HTML -->
<article class='slide slide-list'>
<h2>Working with images <span style="font-size: 22px;">(Group exercise – Part 5)</span></h2>
<p>To write a <span class="keyword">relative path</span> that goes <strong><em>into</em></strong> a folder, start path with the <strong>folder name</strong> followed by a backslash (<code>/</code>).</p>
<pre class="prettyprint"><img src="<strong>images/</strong>llc.gif" /></pre>
<ol class="spacey_list">
<li>Return to <code>index.html</code> and add <code>images/</code> in front of <code>llc.gif</code>.</li>
</ol>
<br /><br /><br />
<hr />
<p class="sidenote">An aside: You can go into multiple nested folders:</p>
<pre class="prettyprint"><img src="<strong>folder1/folder2/folder3/</strong>llc.gif" /></pre>
</article>
<!--
Bonus: Give this file structure? How would you include the image?
<p class="sidenote">Transferring <em>over</em> to a parallel folder level would be:</p>
<pre class="prettyprint">src="../folder/images/llc.gif"</pre>
-->
<!-- SLIDE 46: HTML -->
<article class='slide slide-list'>
<h2>Links</h2>
<p>The <code><a></code> tag – called an <em>anchor</em> tag – is used to create a link.</p>
<p><code><a></code> tags come in pairs, and the content between the opening and closing tags is what is displayed as the link text (typically underlined).</p>
<br />
<pre class="typ">Visit <span class="str"><a></span>Ladies Learning Code<span class="str"></a></span>.</pre>
<p>Visit <a>Ladies Learning Code</a>.</p>
<br />
<p>But wait! This link doesn't take me anywhere!</p>
</article>
<!-- SLIDE 47: HTML -->
<article class='slide slide-list'>
<h2>Links</h2>
<p>We need a way of setting the URL <span class="sidenote">(e.g. <code>http://ladieslearningcode.com</code>)</span> that the browser will request when someone clicks on the link.</p>
<p>Once again, we need to use <span class="keyword">attributes</span>.</p>
<pre class="prettyprint">Visit <a <strong>href="http://ladieslearningcode.com"</strong>>Ladies Learning Code</a>.</pre>
<p>Visit <a href="http://ladieslearningcode.com" target="_blank">Ladies Learning Code</a>.</p>
<ul>
<li><code>href</code> is the <em>attribute</em></li>
<li><code>http://ladieslearningcode.com</code> is the <em>value</em> of that attribute</li>
<li>The <strong>clickable text</strong> goes in between the opening and closing <code><a></code> tags.</li>
</ul>
</article>
<!-- SLIDE 48: HTML -->
<article class='slide slide-list'>
<h2>Exercise #2 (10–15 minutes)</h2>
<ol class="spacey_list">
<li>Continue editing <code>index.html</code> from the <code>2_WORKING_WITH_IMAGES</code> folder in your text editor.</li>
<li>Create a text link using the <code><a></code> tag that points to <code>http://ladieslearningcode.com</code></li>
<li>Using your knowledge of the <code><a></code> tag, try to create a <em>clickable image</em> using both the <code><img></code> and <code><a></code> tags. Clicking on the image should open up <code>http://ladieslearningcode.com</code><br />
<span class="sidenote">(Hint: This involves nested HTML tags.)</span>
</li>
</ol>
<p class="sidenote">Make sure to save <code>index.html</code> after making changes and before viewing those changes in Chrome.</p>
</article>
<!-- SLIDE 49: HTML -->
<article class='slide slide-list'>
<h2>Getting ready for Exercise #3</h2>
<p>We’re going to build a <strong>3-page</strong> website that uses a standard 2-column webpage layout.</p>
<p class="centered"><img src="assets/2-column-webpage.png" width="703" height="411" alt="" /></p>
</article>
<!-- SLIDE 50 -->
<article class='slide slide-list'>
<h2>Getting ready for Exercise #3</h2>
<p>Code along and review with me!</p>
<p>Make a new <code>index.html</code> in the <code>exercises/website</code> folder.</p>
<ol>
<li>What’s the <strong>very first line</strong> we need to type?</li>
<li>What <strong>three</strong> HTML tags should every website have?</li>
<li>What HTML tag do I need to change in order to update the browser tab with a descriptive tab name? And where does it go?</li>
</ol>
<p>Here is the start of your top navigation menu.<br /><span class="sidenote">NOTE: <code>nav</code> is an HTML5 tag that represents a section with navigation links. <!-- (Don't worry, <code><nav></code> is nothing too special but we'll use it later in CSS.) --></span></p>
<pre class="prettyprint">
<nav>
Home About Contact
</nav>
</pre>
<ol start="4">
<li>In between which tag do I paste this code since it’s content that should be <strong>visible to the user</strong>?</li>
</ol>
</article>
<!-- SLIDE 51 -->
<article class='slide slide-list'>
<h2>Exercise #3 (now until lunch)</h2>
<p>On your own:</p>
<ol class="spacey_list">
<li>There will be two more pages: <code>about.html</code> and <code>contact.html</code>. Use the <code><a></code> tag with an <code>href</code> attribute to link all your pages together.</li>
<li>Create two new files for About and Contact by duplicating <code>index.html</code> within the <code>website</code> folder. Name these files <code>about.html</code> and <code>contact.html</code>.</li>
<li>Make sure that all your webpages have a descriptive and unique <code><title></code>.</li>
<li>Confirm that you can click between all the pages using the navigation links. Fix them if needed.</li>
<li>Update <code>about.html</code> with a picture and bio.<br />
<span class="sidenote">(You can even try adding a YouTube video based on the notes on the next slide.)</span></li>
<li>Update <code>contact.html</code> with contact info.<br />
<span class="sidenote">(You can even try adding a Google Map.)</span></li>
<li><strong>Don’t</strong> update <code>index.html</code> any more!<br/>
<span class="sidenote">We'll get to that <strong>after</strong> lunch.</span></li>
</ol>
</article>
<!-- SLIDE 52: HTML -->
<article class='slide slide-list'>
<h2>Bonus: Add video to your webpage</h2>
<p>It’s easier than ever to embed a video into your webpage!</p>
<p>From YouTube, you can find an <strong>Embed Code</strong> to put into your HTML <span class="sidenote">(click on "Share" button below video, then "Embed")</span>, and YouTube’s servers do all the rest of the work via the <code>iframe</code> tag.</p>
<pre class="prettyprint"><iframe width="560" height="315" src="http://www.youtube.com/embed/tlnFyjpV5Wo" frameborder="0" allowfullscreen></iframe></pre>
<iframe width="560" height="315" src="http://www.youtube.com/embed/tlnFyjpV5Wo" frameborder="0" allowfullscreen></iframe>
<p>Adding a Google Map is similar. <a href="assets/google_map_embed.jpg" target="_blank">Click here for an instructional screenshot.</a></p>
</article>
<!-- SLIDE 53: HTML -->
<article class='slide slide-list'>
<h2>HTML reference</h2>
<ul class="spacey_list">
<li>Download a <a href="http://woorkup.com/2009/12/16/html5-visual-cheat-sheet-reloaded/" target="_blank">cheatsheet of HTML tags</a>. (There is a copy in the <code>cheatsheets</code> folder.)</li>
<li>Try looking up individual tags using the HTML sections of <a href="https://developer.mozilla.org/en-US/docs/HTML/Element" target="_blank">Mozilla’s Developer Network</a> or the <a href="http://www.w3.org/community/webed/wiki/HTML/Elements" target="_blank">W3C</a> for more details on tag usage and attributes.</li>
<li>For further exploration, use the <a href="http://hackasaurus.org/en-US/goggles/install/" target="_blank">Hackasaurus X-Ray Goggles</a> to look at any webpage.</li>
<li>And don’t forget the “view source” option of your web browser!</li>
</ul>
</article>
<!-- SLIDE 54: CSS -->
<article class='slide slide-subhead'>
<h1>Introducing CSS</h1>
<p>The presentation layer</p>
<p><img src="assets/TRIAD-css.gif" width="261" height="241" alt="Presentation Layer" /></p>
</article>
<!-- SLIDE 55: CSS -->
<article class='slide slide-list'>
<h2>What is CSS?</h2>
<ul>
<li>CSS = cascading style sheet</li>
<li>stylesheet language with its own syntax rules that are different from HTML</li>
<li>Separates content (i.e. text) from presentation (i.e. text colour).</li>
<li>a style sheet contains a list of rules that <em>cascade</em> and can help to reduce redundancy and save time</li>
</ul>
<p>There are three ways to include (otherwise known as <em>referencing</em>)<br /> CSS in an HTML page: inline, internal and external.</p>
</article>
<!-- SLIDE 56: CSS -->
<article class='slide slide-list'>
<h2>Inline CSS</h2>
<p>The <code>style</code> <em><strong>attribute</strong></em> can be added to any visible HTML tag. This allows us to add CSS properties directly to the element. Let's practice using using the <code>background-color</code>, <code>color</code> and <code>font-size</code> <em><strong>property</strong></em>.</p>
<textarea class='coder-editor coder-editor-full'>
<h1>Welcome!</h1>
<p>This is my website.</p>
<h1>Social Media</h1>
<p>Follow me on
<a href="http://twitter.com/Linndelicate" target="_blank">Twitter</a>!
</p>
</textarea>
<script type='coder-solution'><h1 style="background-color: yellow;">Welcome!</h1>
<p style="font-size: 18px;">This is my website.</p>
<h1 style="background-color: pink;">Social Media</h1>
<p style="font-size: 18px;">Follow me on
<a href="http://twitter.com/Linndelicate" target="_blank"
style="color: red;">Twitter</a>!
</p>
</script>
</article>
<!-- SLIDE 57: CSS -->
<article class='slide slide-list'>
<h2>Internal CSS using selectors</h2>
<p>Rather than using a style attribute directly in the element, a <code><style></code> tag is declared and the CSS declarations go in between these <code><style></code> tags.<p>
<p>Here's the same result but using CSS <span class="keyword">selectors</span>.</p>
<textarea class='coder-editor coder-editor-full'>
<h1>Welcome!</h1>
<p>This is my website.</p>
<h1>Social Media</h1>
<p>Follow me on
<a href="http://twitter.com/Linndelicate" target="_blank">Twitter</a>!
</p>
</textarea>
<script type='coder-solution'>
<style>
h1 { background-color: black; color: white; }
p { font-size: 18apx; }
a { color: red; }
</style>
<h1>Welcome!</h1>
<p>This is my website.</p>
<h1>Social Media</h1>
<p>Follow me on
<a href="http://twitter.com/Linndelicate" target="_blank">Twitter</a>!
</p>
</script>
<br />
<p>NOTE: Internal CSS should be place between the <code><head></code> tags.</p>
</article>
<!-- SLIDE 58: CSS -->
<article class='slide slide-list'>
<h2>Common CSS terms</h2>
<p><strong>Selectors</strong>: used to determine which element(s) to apply the styles to. Can target an HTML tag (i.e. <code><h1></code> for a heading), class or ID.</p>
<p><strong>Declaration blocks</strong> consists of a list of declarations (rules to follow) wrapped in curly braces <code>{ }</code>.</p>
<p>Declarations are written using CSS <code>property: value</code> pairs.</p>
<pre class="prettyprint">
selector { property: value; }
</pre>
<pre class="prettyprint">
h1 { color: blue; }
</pre>
</article>
<!-- SLIDE 59: CSS -->
<article class='slide slide-list'>
<h2>CSS selectors and properties</h2>
<p>Here's a CSS declaration dissected:</p>
<p class="centered"><img src="assets/css.png" /></p>
<ul>
<li>A <strong>basic</strong> <span class="keyword">selector</span> will match its HTML tag name. In this case, all content that is a <code><h1></code> will have this style applied to it.<br /><span class="sidenote">(We'll get into more complex selectors later.)</span></li>
<li>A <span class="keyword">property</span> is a special label for some visual aspect of the selector such as colour or size. You can see a list of them in this <a href="http://www.cheatography.com/davechild/cheat-sheets/css2/" target="_blank">cheatsheet</a>.</li>
<li>The property <strong>value</strong> is specific to the property type. For example, <code>color</code> properties accept colour values like <code>blue</code> or <code>#FFFF00</code>. <code>font-size</code> properties accept units of measurements like <code>12px</code> (where "px" stands for pixels).</li>
</ul>
</article>
<!-- SLIDE 60: CSS -->
<article class='slide slide-list'>
<h2>CSS selectors and properties</h2>
<p>Here's a CSS declaration dissected:</p>
<p class="centered"><img src="assets/css.png" /></p>
<ul>
<li>Use <strong>curly braces</strong> (<code>{}</code>) to hold property:value sets.</li>
<li>You can define multiple property:value sets but you must end each one with a <strong>semi-colon</strong> (<code>;</code>).</li>
</ul>
</article>
<!-- SLIDE 61: CSS -->
<article class='slide slide-list'>
<h2>Changing the page's background colour</h2>
<p>View <code><a href="exercises/3_CSS/index.html" target="_blank">exercises/3_CSS/index.html</a></code> in your browser. Notice how we're using a transparent PNG so it's hard to read all the white letters on a white background.</p>
<p>Let's add a <code><style></code> tag between the <code><head></code> tags. Then add this:</p>
<pre class="prettyprint">body { background-color: gray; }</pre>
</article>
<!-- SLIDE 62: CSS -->
<article class='slide slide-list'>
<h2>Changing the font colour</h2>
<p>Now the text is a bit hard to read on the grey background. Because the <code><body></code> tag is the highest possible visible HTML tag, the <code>body</code> selector will also allow us to target the font colour on the <em>entire</em> page.</p>
<pre class="prettyprint">body { background-color: gray; <strong>color: white;</strong> }</pre>