forked from preet-indochino/LLC-HTML-CSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·2103 lines (1889 loc) · 91.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
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">
<!-- 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>Your instructor today</h2>
<div>
<img src="assets/preet_avatar.jpg" width="72" height="72" alt="preet jassi" />
<h4>Preet Jassi</h4>
<br />
<a href="http://www.erudianart.com" target="_blank">erudianart.com</a>
<a href="http://twitter.com/erudianart" target="_blank">@erudianart</a>
</div>
<br clear="left" />
</div>
<p style="padding-top: 75px; margin-bottom: 0; font-size: 0.9em; color: #999;">
( 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>Make sure your computer is setup</li>
<li>Web development breakdown</li>
<li>Dive into HTML</li>
</ul>
<h3 style="margin-top: 1em;">Afternoon</h3>
<ul>
<li>CSS basics</li>
<li>Getting your website online</li>
<li style="color: #ccc;">Upload your website</li>
</ul>
</article>
<!-- SLIDE 2: Development Environment -->
<article class='slide slide-subhead'>
<h1>Development Environment</h1>
<p>4 tools you 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 web pages 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. Code 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 that'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. Hackasaurus 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, use Ctrl/Cmd+Shift+B in Chrome to toggle visibility.)
</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>
Do you already have your own hosted website? FTP software will let you copy the files you work on today to somewhere 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 easily read (not humans).</p>
<p>So 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>Whitespace through indentation (tabs) make your more HTML human-readable.</p>
<pre class='prettyprint'><!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<body>
</body>
</html></pre>
<p class="sidenote">(Later on, you might also notice how 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>
<p class="centered sidenote">Think about HTML tags like the beams of a house.<br />
It's what holds up a webpage.</p>
<p class="centered"><img src="assets/house_beam.jpg" width="300" height="232" alt="house beam" /></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 with 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>While <code><html></code> is the always the "root" node and has <strong>no</strong> parent nodes.</li>
<li>Notice too 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> (Command+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>But remember: HTML tags are like the beams of a house -- they denote structure, not content.) </p>
<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>
<pre class="prettyprint"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"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 class="sidenote">(If HTML tags are the beams of a house, you still need to put up walls for it to be liveable.)</p>
<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>
<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>Using a copy of <code>barebones.html</code>, I'm going to edit it to answer the below questions and 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?
<div class="show-hint" onclick="javascript:showHint('title-tag'); this.style.display = 'none';">click here to show answer...</div>
<div id="title-tag" class="hint-solution">It will update the browser tab/window name.</div>
</li>
<li>
What's the difference between putting a tag in-between the <code><head></code> tag versus the <code><body></code> tag?
<div class="show-hint" onclick="javascript:showHint('head-vs-body'); this.style.display = 'none';">click here to show answer...</div>
<div id="head-vs-body" class="hint-solution"><code><head></code> is for "meta" instructions that the browser will use to render content differently such as the tab title, or the character set to use when displaying a Japanese website, or links to external CSS or JS files.<br />
<code><body></code> should be used for all the content that actually gets displayed in the main part of the web browser.</div>
</li>
</ul>
</article>
<!-- SLIDE 29: HTML -->
<article class='slide slide-list'>
<h2>Exercise #1 (15 minutes)</h2>
<ol class="spacey_list">
<li>View/open <a href="exercises/1_BASIC_HTML_WEBSITE/index.html" target="_blank"><code>exercises/1_BASIC_HTML_WEBSITE/index.html</code></a> in Chrome.</li>
<li>Make a local copy of <code>index.html</code> in the same <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 Sublime Text and edit some the content within some of the opening and closing tags.</li>
<li>Make sure to save <code>copy.html</code> after changes have been made (Ctrl/Cmd+S).</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.<br />
Notice how Sublime Text will hint at you when/where you might not have closed a tag.)
</div>
<div class="cheatsheet">
<div>
<h3>Text Formatting</h3>
<code><hl></code>, <code><h2></code>, ... <code><h6></code>
- hierarchical heading levels from 1 to 6 with 1 being the most important<br />
<code><p></code> - paragraph<br />
<code><b></code> or <code><strong></code> - bold<br />
<code><i></code> or <code><em></code> - italics or emphasis<br />
</div>
<div>
<h3>Section Formatting</h3>
<code><blockquote></code> - indented block of code<br />
</div>
<div>
<h3>Input & Forms</h3>
<code><button></code> - clickable button<br />
<code><textarea></code> - multiline text area for user input<br />
</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 31: HTML -->
<article class='slide slide-list'>
<h2>Exercise #1 - Exploration Questions</h2>
<ul class="spacey">
<li>What are acceptable tags that lend well to being nested and what should never be nested?</li>
<li>How is whitespace treated? What happens when you use multiple spaces or line breaks?</li>
</ul>
</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>Void (or empty) HTML Tags</h2>
<p><span class="keyword">Void tags</span> don't format content -- instead they are used to render or embed objects in our page. These tags <strong>do not</strong> come in pairs like <code>h1</code> or <code>p</code> tags. You only type the tag once.</p>
<p>However, In some versions of HTML <span class="sidenote">(specifically XHTML... remember <code>DOCTYPE</code>?)</span> they "self-close" with a back slash (<code>/</code>) immediately before the left angled bracket (<code>></code>). In HTML5, it is not required to self close.</p>
<p>The most often used example of this is the <code><br /></code> or <code><br></code> tag used to create a <strong>line break</strong>.</p>
<pre class="prettyprint"><p>This text<br />goes over<br />several<br />lines.</p>
</pre>
<p>This text<br />goes over<br />several<br />lines.</p>
</article>
<!-- SLIDE 34: HTML -->
<article class='slide slide-list'>
<h2>Void (or empty) HTML 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 />
<code><img></code> or <code><img /></code> - an image <em>*We'll get to this one very soon.</em><br />
<code><link></code> or <code><link /></code> - define a relationship to an external resource like an external style sheets. <em>*We'll get to this one later today.</em><br />
</div>
</div>
<br clear="all" />
<p class="sidenote">Practice some of these tags below:</p>
<textarea class="coder-editor"></textarea>
</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> define <em>content</em>.</li>
<li><strong>Void HTML tags</strong> render special objects that are sometimes <em>sort of like content</em> or <em>seem structural</em> depending on the void tag.</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 data that we don't see right away but is used by the browser to help render special content like hyperlinks, images, or video.</p>
<p><span class="keyword">Attributes</span> are used to provide additional information or instruction.</p>
<p class="sidenote">Here's that same <code>img</code> tag but now it's using an <strong>attribute</strong>, <code>src</code>, 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>Let's look at that again: images are an example of a <span class="keyword">void tag</span> <strong>with</strong> 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>single or double quotes</em> since occassionally 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>url 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 are <strong>required</strong> (like <code>src</code>) and others are <strong>optional</strong>:</p>
<p><code>width</code> and <code>height</code> attributes tell the browser what dimension to <em>display</em> the image at.</p>
<p class="sidenote" style="margin-top: -15px;">(This is useful so the page doesn't jump around when loading very large images, or while on a very slow internet connection such as dial-up or 2G/3G. Also, width/height values don't necessarily have to match the image's <em>actual</em> width/height.)</p>
<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 optional 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 has 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 <span style="font-size: 22px;">(Group exercise - Part 1)</span></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 Sublime Text. <span class="sidenote">(It's simply a copy of <code>barebones.html</code>.)</span></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/mod/c4cm</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 typing in a url into 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 let's instead embed <code>llc.gif</code> which we have locally.</li>
</ol>
<p class="centered" style="font-size: 2.5em;">This is an example of a <span class="keyword">relative path</span>.</p>
<p>It's based on using the html file that you're working on as the starting point to find your image source.</p>
<p>Right now, <code>llc.gif</code> in the <strong>same folder</strong> as <code>index.html</code>.</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 Sublime Text.</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 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> infront 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>
<div>How many folders does this relative path go up?</div>
<div class="show-hint" onclick="javascript:showHint('nested-img-path'); this.style.display = 'none';">click here to show answer...</div>
<div id="nested-img-path" class="hint-solution">Four.</div>
</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> infront 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">Transvering <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>Hyperlinks</h2>
<p>The <code><a></code> <em>anchor</em> tag is used to tell the browser that we want to link to somewhere else on our site or on the web.</p>
<p>The <code>a</code> tag comes in pairs and the content between the opening and closing tags is what is displayed as the link text (by default it is 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 class="sidenote">But wait! This link doesn't take me anywhere!</p>
</article>
<!-- SLIDE 47: HTML -->
<article class='slide slide-list'>
<h2>Hyperlinks</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>Remember, the clickable text that the user sees goes <strong>in between</strong> 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 using <code>index.html</code> from the <code>2_WORKING_WITH_IMAGES</code> folder in Sublime Text.</li>
<li>Create a text link using the <code><a></code> tag that points to "http://ladieslearningcode.com".</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 "http://ladieslearningcode.com".<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 changes have been made (Ctrl/Cmd+S) and before confirming your edits in Chrome.</p>
</article>
<!-- SLIDE 49: HTML -->
<article class='slide slide-list'>
<h2>Getting ready for Exercise #3</h2>
<p>We're eventually aiming to have 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 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>Eventually there will be <code>about.html</code> and <code>contact.html</code>. Use the <code><a></code> tag with a <code>href</code> attribute to link all your pages together.</li>
<li>Based on <code>index.html</code>, create those 2 new files for About and Contact in the same <code>website</code> folder as <code>index.html</code>.</li>
<li>Make sure that all your webpages have descriptive and unique <code><title></code>'s.</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>As time goes on, it has become easier and easier to embed multimedia content into websites.</p>
<p>From YouTube, you can find an <strong>Embed Code</strong> to put into your website <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 similiar. <a href="assets/google_map_embed.jpg" target="_blank">Click here for 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>. (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 further breakdown.</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>CSS basics</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/christinatruong" 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/christinatruong" 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/christinatruong" 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/christinatruong" 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 in an <code><h1></code> will have this style applied to it.<br /><span class="sidenote">(We'll get into more complex ones later.)</span></li>
<li>A <span class="keyword">property</span> is a label used to determine the type of style to be applied to
the element (like color). You can see a list of them in this <a href="http://www.cheatography.com/davechild/cheat-sheets/css2/">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'>