-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathslides-en-glitch.html
More file actions
executable file
·1019 lines (792 loc) · 34.4 KB
/
slides-en-glitch.html
File metadata and controls
executable file
·1019 lines (792 loc) · 34.4 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 lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Canada Learning Code</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
<link rel="stylesheet" href="framework/css/slideshow.css" data-noprefix>
<link rel="stylesheet" href="framework/css/fonts.css" data-noprefix>
<link rel="stylesheet" href="framework/css/highlightjs/github.css" data-noprefix>
<link rel="stylesheet" href="framework/css/a11y/plugin.css">
<link rel="stylesheet" href="framework/css/styles.css" data-noprefix>
<link rel="shortcut icon" href="framework/img/favicon.ico">
<!-- Takes care of CSS3 prefixes -->
<script src="framework/scripts/prefixfree.min.js"></script>
<!-- opens all links in a new window -->
<base target="_blank">
</head>
<!-- Timer/progress bar: Define the presentation duration using "data-duration" in minutes. -->
<body class="en" data-duration="360">
<main>
<section class="slide welcome highlight">
<h1><img class="logo-stacked" src="framework/img/workshop/codemobilelogo.png" alt="Canada Learning Code logo">Welcome!</h1>
<div class="instructions">
<!-- ADD WIFI INFO HERE -->
<!--<h2>Get <br>Connected</h2>
<ul>
<li><strong>Wifi:</strong> wifi network</li>
<li><strong>Password:</strong> wifi password</li>
</ul>
<hr>-->
<h2>Download<br> & Install</h2>
<ol class="downloads">
<!--<li>Learner files (zip file): <a href="https://github.com/ladieslearningcode/codemobile-html-css/archive/master.zip">bit.ly/codemobile-html-css</a>
<ul>
<li>unzip the learner file (<em>extract all</em> if you’re on a PC)</li>
<li>open <code>slides-en-glitch.html</code> in the browser to view the slides</li>
</ul>
</li>-->
<li>Slides: <a href="https://bit.ly/codemobile-slides-glitch">https://bit.ly/codemobile-slides-glitch</a></li>
<li>Chrome Browser: <a href="https://www.google.ca/chrome/browser/desktop/">google.ca/chrome</a></li>
<li>Create a free account on Glitch: <a href="https://glitch.com/signin">https://glitch.com/signin</a></li>
</ol>
</div>
<footer>
<a class="left" rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" src="framework/img/cc-by-nc.png" /></a>
<p class="left">Content created by <a prefix="cc: http://creativecommons.org/ns#" href="http://canadalearningcode.ca" property="cc:attributionName" rel="cc:attributionURL">Canada Learning Code</a></p>
<p class="right">Use the left <span class="arrow">←</span> and right <span class="arrow">→</span> arrow keys to navigate</p>
</footer>
</section>
<section class="slide intro">
<!--<img class="logo" src="framework/img/llc-logo-white.png" alt="Ladies Learning Code logo">-->
<br><h1 class="heading-bg">
<span>Introduction to<br>HTML & CSS</span>
</h1>
<ul>
<li><a href="http://twitter.com/learningcode">@learningcode</a></li>
<li><a href="https://twitter.com/search?q=%23codemobile&src=typd">#codemobile</a></li>
</ul>
<footer>
<a class="left" rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" src="framework/img/cc-by-nc.png" /></a>
<p class="left">Content created by </a> <a prefix="cc: http://creativecommons.org/ns#" href="http://canadalearningcode.ca" property="cc:attributionName" rel="cc:attributionURL">Canada Learning Code</a></p>
<p class="right">Use the left <span class="arrow">←</span> and right <span class="arrow">→</span> arrow keys to navigate</p>
</footer>
</section>
<section class="slide centered" data-markdown>
<script type="text/template">
#WELCOME
<img alt="Code Mobile Logo" src="framework/img/workshop/codemobilelogo.png" style="padding-left:10%; padding-right:10%;"/> <br>
<a href= "http://codemobile.rocks"> [codemobile.rocks] </a>
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#Coders' code
1. Be friendly and welcoming
1. Be respectful of others by choosing words and actions with care
1. Be mindful of how much space you take up in conversations
1. Ask questions
1. Take care of your body
1. No photos or audio/video recordings
</script>
</section>
<section class="slide title" data-markdown data-toc>
<script type="text/template">
#What is Code?
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#Code is...
**...a set of instructions that tell a computer what to do**.
<ul>
<li class="delayed">Computers don’t understand human languages like English</li>
<li class="delayed">They only understand a different kind of language: computer, or “programming" languages</li>
<li class="delayed">Computer languages are written in code</li>
<li class="delayed">There are lots of computer languages!</li>
</ul>
</script>
</section>
<section class="slide title" data-markdown>
<script type="text/template">
# Today's Project
## We're creating websites using HTML & CSS
</script>
</section>
<section class="slide title" data-markdown data-toc>
<script type="text/template">
#Why Do We Make Websites?
</script>
</section>
<section class="slide title" data-markdown data-toc>
<script type="text/template">
##...To share information!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
# How is a website made?
<ol>
<li class="delayed">Draw it on a piece of paper and take a photo</li>
<li class="delayed">Use a writing program like Microsoft Word</li>
<li class="delayed">Yell at the computer until it makes a website</li>
<li class="delayed">Write code</li>
</ol>




<div class="dropdown">
<button class="dropbtn">Attributions</button>
<div class="dropdown-content">
<a href="https://www.flickr.com/photos/baldiri/5734993652">Wireframing photo</a>
<a href= "https://www.flickr.com/photos/ivanwalsh/4457223020">Microsoft word photo</a>
<a href= "https://pixabay.com/en/social-social-networks-1206614/]">Social Media illustration</a>
<a href="https://pixabay.com/en/code-programming-hacking-html-web-820275/">Code photo</a>
</div>
</script>
</section>
<section class="slide title" data-markdown data-toc>
<script type="text/template">
#Websites are made using code!
</script>
</section>
<section class="slide centered" data-markdown data-toc>
<script type="text/template">
#What does code look like?
<img src= "framework/img/code.JPG" alt="Matrix style green code falling down a computer screen.">
</script>
</section>
<section class="slide centered" data-markdown data-toc>
<script type="text/template">
#What does code look like?
<img src= "framework/img/code1.JPG" alt="HTML code in a code editor on a computer screen.">
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#How do we read websites?
* We use a browser to read and interact with websites on the internet
* Browsers read the code we write and turn it into the websites we consume
<img src= "framework/img/browsers.jpg" alt="">
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Let's take a look!
We can use **Chrome Developer tools** to review the code that makes up a website, and change how it looks on our screen.
1. Open [this website](offline-docs/superhero-profile/black-panther.html)
1. Right-click / two-finger tap on the page and select **Inspect Element**
Try changing the heading!

</script>
</section>
<section class="slide title" data-markdown data-toc>
<script type="text/template">
#Coding in HTML
##Let's build the internet!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#HTML: HYPER TEXT MARKUP LANGUAGE
<ul>
<li>HTML is a language</li>
<li>We use HTML to communicate with our browsers</li>
<li>When we use HTML, we are telling our browser information about our webpage and what kind of content to display</li>
</ul>
</script>
</section>
<section class="slide title" data-markdown data-toc>
<script type="text/template">
#SO… HOW DO WE READ AND WRITE IN HTML?
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#HTML is made up of Elements
<img src= "framework/img/elements.jpg" alt="Screenshot of webpage without styling. Arrows point out content sections; title, headline, paragraph, list.">
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#HTML Syntax
Tags are written with angled brackets `< >` and a forward slash `/` for the closing tag. Get to know these keys!
<!-- .element: width="70%" -->
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#HTML: THE CONTENT LAYER
Tags usually come in pairs — an opening tag and a closing tag — to wrap the content. Note the closing tag has a forward slash (/).
```html
<tag> opening tag --- closing tag </tag>
```
HTML tags describe the content inside of them to the web browser.
```html
<h1>This tag describes a heading</h1>
<p>This tag is for paragraphs.</p>
```
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Nested tags
Tags can be *nested* within other tags like this:
```html
<outertag>outer content <innertag>inner content</innertag> outer content</outertag>
```
Nested tags create a family tree-like relationship, often referred to as *parent* and *child* nodes.
The inner element is the child of the outer element.
```html
<parent>
<child></child>
</parent>
```
</script>
</section>
<section class="slide centered" data-markdown data-toc>
<script type="text/template">
#Ready to start coding?
<img src= "framework/img/cat.gif" alt="Cat furiously typing on a laptop.">
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Glitch
* Free easy-to-use website that lets you build websites, apps and more using code.
* Allows for collaboration on a project!
* Highlights mistakes which helps make the coding experience easier.
## Getting started
1. Go to [glitch.com](https://glitch.com/)

2. Choose new project

3. Select "hello-webpage"
</script>
</section>
<section id="basic-tags" class="slide" data-markdown>
<script type="text/template">
#Base HTML Tags
The tags below should be included in ** *all* ** HTML documents. Luckily Glitch gives us all of these already!!
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<!-- page content here (this is an HTML comment by the way) -->
</body>
</html>
```
**Offline resource: [HTML Reference](offline-docs/html-reference.htm)**
</script>
</section>
<section class="slide highlighted-tags" data-markdown>
<script type="text/template">
#THE HTML ELEMENT
* Always the first HTML tag & identifies the document as HTML
* It is the root element & ancestor of all other elements because everything is *nested* inside
* The `lang` *attribute* identifies the language
<pre><code><!DOCTYPE html>
<strong><html lang="en"></strong>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<!-- page content here -->
</body>
<strong></html></strong>
</code></pre>
</script>
</section>
<section class="slide highlighted-tags" data-markdown>
<script type="text/template">
#The HEAD ELEMENT
* Includes information about the page but *does not display content*
* The `<title></title>` element is the only required element
* Displayed in the browser tab, bookmarks and search engine results
* Is the first piece of content announced by screen readers
* Page content *never* goes here
<pre><code><!DOCTYPE html>
<html lang="en">
<strong><head></strong>
<meta charset="UTF-8">
<title>My page title</title>
<strong></head></strong>
<body>
<!-- page content here -->
</body>
</html>
</code></pre>
</script>
</section>
<section class="slide highlighted-tags" data-markdown>
<script type="text/template">
#THE BODY ELEMENT
All content to be displayed in the browser window goes between the `<body></body>` tags.
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My page title</title>
</head>
<strong><body></strong>
<!-- page content here -->
<strong></body></strong>
</html>
</code></pre>
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
# Attributes
* Provide additional information or instruction for the element
* Included *inside the opening HTML tag*
* Follow the syntax `attribute="value"` (note the quotes)
* There are many different attributes for each HTML element
```html
<tag attribute="value">content</tag>
```
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
# Attributes
We just saw two attributes in our basic HTML page example.
The `lang` attribute is used to classify the language.
```html
<html lang="en">
```
The `charset` attribute sets the character encoding.
```html
<meta charset="UTF-8">
```
</script>
</section>
<section class="slide title" data-markdown>
#Adding content
##Paragraphs, Headings, images and links
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Paragraphs
**Paragraphs**: whether it's one sentence or more, each paragraph needs its own pair of `<p></p>` tags.
```html
<p>This is a paragraph.</p>
<p>This is a longer paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non vero dolor expedita quasi reiciendis minus unde sapiente id eveniet saepe officia quibusdam aspernatur, sint voluptate ipsam ex magni. Aliquam, ex!</p>
```
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Exercise
##Edit the paragraph text on your site.
* We’re going to edit the content of our HTML code.
* The content is the words between the opening `<p>` and closing `</p>` tags.
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Headings
There are six heading tags ranging from `<h1>` to `<h6>` used to describe the *hierarchy* of the page structure. To decide which heading to use, think about how you would arrange an essay outline.
<div class="example essay-headings">
<p><strong>Essay Title</strong></p>
<ol>
<li>Introduction</li>
<li>First supporting idea
<ul>
<li>point 1</li>
<li>point 2</li>
</ul>
</li>
<li>Second supporting idea
<ul>
<li>point 1</li>
<li>point 2</li>
</ul>
</li>
<li>Conclusion</li>
</ol>
</div>
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Exercise
##Add some headings and paragraphs to your website!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Self-closing tags and images
Self-closing tags don't format content or require a closing tag. They are used to embed objects in the page; they *are* the content.
Images use a self-closing tag. It also requires a `src` *attribute* to tell the browser the location of the image file.
```html
<img src="path/to/image/file-name"/>
```
`alt` is another attribute that is added to images to provide *alternative text* to visually impaired web visitors using screen readers.
```html
<img src="http://placekitten.com/200/300" alt="kitten!"/>
```
##Example of `alt` when image does not load:
<img src="" alt="kitten!"/>
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Image file types
- `gif` - smaller file size when used for line art, charts, and images with minimal colour variation. <span class="note">(That's why animated gifs tend to look grainy but oh so fun!)</span>
- `jpg` - smaller file size when used for photographs with lots of rich colours or gradients
- `png` - larger file size but has the best quality and is great for images with transparent backgrounds
- `svg` - XML-based vector image format for 2D graphics with support for interactivity and animation
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Using Images in Glitch
In Glitch we store our pictures in the assets folder.

We need to add an asset in order to use it in our website and for that we need to upload our folder.

By clicking on the image you can easily 'copy' the link that you can then paste into your code!


</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Exercise
##Add an image!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
# Hyperlinks
A hyperlink references data, such as a web document, that the reader can directly follow, usually by clicking or hovering.
Use the anchor tag, `<a>` to create the link. It also needs an `href` attribute to provide information for the location of the resource.
```xml
<a href="https://canadalearningcode.ca">Canada Learning Code</a>
```
Here's the syntax for an email link.
```html
<a href="mailto:hello@myemail.com">hello@myemail.com</a>
```
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Exercise: Your Favourite Things
<ul>
<li>Our webpage is looking a little bare!</li>
<li>Let’s add some new content about you</li>
<li>After the last `<img>` tag , add a new `<h2>` tag to make a new section</li>
<li>Add some paragraphs `(<p>)` to talk about some of your favourite things for example: Movies, Books, Sports, Video Games, or pets!</li>
</ul>
</script>
</section>
<section class="slide title" data-markdown>
<script type="text/template">
#CSS Time
##Let's make everything <s>beautiful</s> look cool!
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#Why making ugly websites is important
* Making beautiful websites is hard
* Coders `!=` Designers (Some coders are designers, they are also unicorns🦄)
* If we were learning English, we wouldn’t be expected to write poetry right away
* This lets us focus on exploring with the code!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#CSS: Cascading Style Sheets
* Different language from HTML
* Stylesheet language with its own syntax rules
* Used to separate content (HTML) from presentation (CSS)
CSS requires these symbols: curly brackets `{ }`, colon `:`, semi-colon `;`

</script>
</section>
<section class="slide two-col-list" data-markdown>
<script type="text/template">
#What's the Difference?
* HTML
* Used for content
<h3>Headings</h3>
Paragraphs<br>
<br>
<a href="http://css.cool">Links</a><br>
* Lists (like this!)
* CSS
* Used for design
<div style="color: Turquoise;">Colours</div>
<div style="font-family: Impact, Charcoal, sans-serif !important;">Fonts</div>
<div style="background-color: Gold;">Backgrounds</div>
<div style="border: 5px solid plum;">Borders</div>
<div style="font-size: 72px;">Sizes</div>
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#A WEBPAGE WITHOUT CSS
<img src= "framework/img/nocss.jpg" alt="Website without CSS featuring plain text, linear layout, blue links, serif fonts.">
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#A WEBPAGE WITH CSS
<img src= "framework/img/css.jpg" alt="Website with CSS featuring styled text, multi-column layout, brand green links, sans-serif fonts.">
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#Where do we put CSS?
Open up the ```style.css``` file in the same folder as your ``index.html`` file. Glitch already connects these two files together for us!
```html
<link rel="stylesheet" href="style.css">
```
</script>
</section>
<section class="slide" data-markdown data-toc>
<script type="text/template">
#CSS is made up of rules
<ul>
<li>HTML elements have to follow these rules in order to look pretty! </li>
<li>For example, CSS can target all of the paragraphs on the page and tell them to turn the color red</li>
<li>OR CSS can target all of the list items on a page and tell them to be a font-size 16 pixels</li>
<li>There are many many other CSS rules!</li>
</ul>
**Offline resource: [CSS.cool](offline-docs/css-reference.htm)**
---
## Resources
* [MDN CSS documentation](https://developer.mozilla.org/en-US/docs/Web/CSS)
* [Search for FAQ on StackOverflow](https://stackoverflow.com/)
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Let's Try Rules Out!
```css
selector {
property: value;
}
```
- **Selectors** determine which HTML element or elements the rules apply to.
- **Properties** determine what property we want to make a rule about, like colour, or size.
- **Values** determine what that property will be set to: like red, or big.
```css
p {
color: red;
}
```
>In the above example, what is the selector? Property? Value?
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#What do these do?
Open the `style.css` file and test out the following:
```css
h1 {
text-align: center;
color: OrangeRed;
}
```
```css
p {
font-weight: bold;
font-size: 18px;
}
```
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Color
We can set background colours with the CSS property `background-color`:
```css
background-color: red;
```
Select the `body` element, and change its colour!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Text and Colors
We can change text colour with the `color` property:
```css
color:blue;
```
Select the `body` element, and change its colour!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Fonts in CSS
<ul>
<li>We can’t use just any font in your website</li>
<li>We need to pick from web-safe fonts</li>
<li>Set the font for your text using the `font-family` property</li>
```css
font-family: Impact, Charcoal, sans-serif;
```
</script>
</section>
<section class="slide nested-list" data-markdown>
<script type="text/template">
#Web safe fonts
Web safe refers to pre-installed fonts. Operating systems do not have the same defaults, so use a font *stack* to provide fallback options.
```css
font-family: Helvetica, Arial, sans-serif;
```
* Some common "web safe" are:
* <span style="font-family:Arial;">Arial</span>
* <span style="font-family:Verdana;">Verdana</span>
* <span style="font-family:Times New Roman;">Times New Roman</span>
* <span style="font-family:Georgia;">Georgia</span>
* <span style="font-family:Courier;">Courier</span>
Check out [cssfontstack.com](https://www.cssfontstack.com) for a complete list.
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Changing size with pixels
Pixels are tiny units that make up our screen.
We can change the size of our text with the `font-size` property using pixels:
```css
font-size: 64px;
```
Try making the `h1` on your site really big!
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Changing size with percentage
We can also change the size of elements using percentages. This helps ensure that elements are sized *in comparison to* the size of our window. We should use % when designing for multiple screen sizes (like mobile).
We can change the size of our images with the `width` property using percentage:
```css
width: 50%;
```
Try making the `img` elements on your site smaller.
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Stretch Goal: Selecting specific elements
We can use the `class` attribute to style specific elements on our website.
##In `index.html`
Give the element a name `class="small"`
```html
<img class="small" src="image.jpeg" alt="Image description">
```
##In `style.css`
Add that name to a new css rule `img.small`
```css
img.small {
width: 200px;
border-radius: 50%
}
```
</script>
</section>
<section class="slide" data-markdown>
<script type="text/template">
#Other Cool CSS Properties
Check out [CSS.cool](offline-docs/css-reference.htm) or try these CSS properties!
```css
color: #999999;
font-size: 18px;
font-family: ‘Comic Sans MS’;
font-weight: 100;
font-style: italic;
text-transform: uppercase;
text-shadow: 1px 1px 2px red;
text-align: center;
line-height: 26px;
text-decoration: underline;
padding: 10px 15px 12px 10px;
padding-top: 15px;
margin: 15px 5px 15px 10px;
margin-top: 5px;
opacity: 0.5;
border: 5px solid #FF0000;
border-bottom: 1px dashed #DDDDDD;
border-left: 2px dotted #00000;
border-radius: 5px;
```
</script>
</section>
<section class="slide first-website" data-markdown>
<script type="text/template">
<div class="text">
<h1>Ta-da!</h1>
<p>
You just created a website. HTML + CSS = website
</p>
</div>
</script>
</section>
<section class="slide title" data-markdown>
<script type="text/template">
#DEMOS
##Share what you made!
</script>
</section>
<section class="slide" data-toc data-markdown>
<script type="text/template">
# Today we covered...
<p>Basic elements of a website</p><!-- .element: class="delayed" -->
<p>How to use Glitch to build an easy website online</p><!-- .element: class="delayed" -->
<p>Adding content like headings, paragraphs, images</p><!-- .element: class="delayed" -->
<p>Styling our websites using CSS</p><!-- .element: class="delayed" -->
<p>Where to find HTML & CSS documentation, so we can continue learning from home</p><!-- .element: class="delayed" -->
</script>
</section>
<section class="slide small-type" data-markdown>
<script type="text/template">
#Next Steps
##Free webmaking tools:
* Continue creating websites online for free with [Glitch](https://glitch.com)
* Create websites offline with [Atom](https://atom.io)
##Keep practicing!
* Use your HTML knowledge in a videogame with [eraseallkittens.com](http://eraseallkittens.com)
* Spread the love by creating a [LoveBomb](http://lovebomb.me/) for a friend
* Check out [CodePen](https://codepen.io/projects/) for inspiration on your next project
* Review which [Canada Learning Code](https://canadalearningcode.ca) workshops are taking place near you
</script>
</section>
<!-- Last slide -->
<section class="slide last">
<h1>Thank you!</h1>
<h2 class="heading-bg">
<span>
Intro to HTML & CSS
</span>
</h2>
<ul>
<li><a href="http://twitter.com/learningcode">@learningcode</a></li>
<li><a href="https://twitter.com/search?q=%23codemobile&src=typd">#codemobile</a></li>
</ul>
<p class="attribution">Slide presentation originally created by <a href="http://christinatruong.com">Christina Truong</a> based on <a href="https://github.com/LeaVerou/csss">Lea Verou's SlideShow</a> and <a href="http://lab.hakim.se/reveal-js/">reveal.js</a>. Special thanks to all contributors to the slides: <a href="https://github.com/mattb0m)">mattb0m</a>, <a href="https://github.com/zoster">zoster</a>, <a href="https://github.com/hrtovey">hrtovey</a>, <a href="https://github.com/jessynd">jessynd</a>, <a href="https://github.com/melissacrnic">melissacrnic</a> and <a href="http://pixelles.ca/blog/2015/01/workshop-twine">Rebecca Cohen Palacios</a></p>
</section>
</main><!-- cls main section -->
<script src="framework/scripts/jquery-1.11.0.min.js"></script>
<script src="framework/scripts/slideshow.js"></script>
<!-- Uncomment the plugins you need -->
<script src="framework/scripts/plugins/css-edit.js"></script>
<script src="framework/scripts/plugins/css-snippets.js"></script>
<script src="framework/scripts/plugins/css-controls.js"></script>
<!-- <script src="plugins/code-highlight.js"></script>-->
<script src="framework/scripts/plugins/markdown/marked.js"></script>