Skip to content

Commit 16cfc9a

Browse files
Revised morning slides, moved void elements to extras.
1 parent c4cc961 commit 16cfc9a

2 files changed

Lines changed: 118 additions & 33 deletions

File tree

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6+
<title>Ladies Learning Code: Intro to HTML & CSS</title>
7+
<!-- Don't alter slideshow.css, CSSS slide deck needs it to work -->
8+
<link rel="stylesheet" href="css/slideshow.css">
9+
10+
<!-- Theme-specific styles -->
11+
<link href='http://fonts.googleapis.com/css?family=Quicksand|Pacifico|Open+Sans:400,300' rel='stylesheet' type='text/css'>
12+
<link rel="stylesheet" href="css/font-awesome.css">
13+
<link rel="stylesheet" href="css/highlightjs-themes/monokai.css">
14+
<link rel="stylesheet" href="css/theme-llc.css">
15+
<link rel="shortcut icon" href="img/favicon.ico">
16+
17+
<!-- Workshop-specific styles -->
18+
<link rel="stylesheet" href="css/workshop.css">
19+
20+
<!-- Takes care of CSS3 prefixes! -->
21+
<script src="scripts/prefixfree.min.js"></script>
22+
</head>
23+
24+
<body>
25+
26+
<base target="_blank">
27+
28+
<main>
29+
<section class="slide">
30+
<h2>Void / Self-closing Element</h2>
31+
32+
<p>Void tags don’t format content — instead, they embed objects in the page. These tags <strong>do not</strong> come in pairs since they do not wrap content like the other tags we’ve been using so far. They <em>are</em> the content!</p>
33+
34+
<p>The syntax is slightly different in the latest version of HTML so you may see it written in two ways. Prior to HTML5, these tags were self-closed with a forward slash immediately before the right angled bracket (<code>/&gt;</code>). In HTML5, void tags are not required to self close.</p>
35+
36+
<p>A common void tag is the <code>&lt;br /&gt;</code> or <code>&lt;br&gt;</code> tag used to create a line break.</p>
37+
38+
<pre><code class="xml">&lt;p&gt;This text&lt;br&gt;goes over&lt;br&gt;several&lt;br&gt;lines.&lt;/p&gt;</code></pre>
39+
40+
<!-- example -->
41+
<p>This text<br>goes over<br>several<br>lines.</p>
42+
43+
<p>Another example of a void element is the horizontal rule, <code>&lt;hr&gt;</code> or <code>&lt;hr /&gt;</code>.</p>
44+
45+
<!-- example -->
46+
<hr>
47+
</section>
48+
</main><!-- cls main section -->
49+
50+
<footer>
51+
<p class="license"><a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" src="img/cc-by-nc.svg" /></a> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://ladieslearningcode.com" property="cc:attributionName" rel="cc:attributionURL">Ladies Learning Code</a></p>
52+
<p class="instructions">Use the left <i class="fa fa-arrow-left"></i> and right <i class="fa fa-arrow-right"></i> arrow keys to navigate</p>
53+
</footer>
54+
55+
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
56+
<script src="scripts/slideshow.js"></script>
57+
58+
<!-- Uncomment the plugins you need -->
59+
<script src="scripts/plugins/css-edit.js"></script>
60+
<script src="scripts/plugins/css-snippets.js"></script>
61+
<script src="scripts/plugins/css-Ctrls.js"></script>
62+
<!-- <script src="plugins/code-highlight.js"></script>-->
63+
64+
<script src="scripts/plugins/markdown/marked.js"></script>
65+
<script src="scripts/plugins/markdown/markdown.js"></script>
66+
<script src="scripts/plugins/highlight/highlight.js"></script>
67+
<script>hljs.initHighlightingOnLoad();</script>
68+
69+
<!-- Prettify -->
70+
<script src="scripts/plugins/prettify.js"></script>
71+
<script src="scripts/plugins/lang-css.js"></script>
72+
<script src="scripts/plugins/prism.js"></script>
73+
74+
<script>
75+
var slideshow = new SlideShow();
76+
77+
// Grabs all the .snippet elements
78+
var snippets = document.querySelectorAll('.snippet');
79+
for(var i=0; i<snippets.length; i++) {
80+
new CSSSnippet(snippets[i]);
81+
}
82+
83+
// Opens all links in a new window
84+
var links = document.getElementsByTagName("a");
85+
for (var i = 0; i < links.length; i++) {
86+
var link = links[i];
87+
link.addEventListener(function() {
88+
window.open(this.href);
89+
});
90+
}
91+
92+
jQuery(document).ready(function(){
93+
jQuery(".snippet").before("<span class=\"edit\">edit me</span>");
94+
});
95+
</script>
96+
</body>
97+
</html>

index.html

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ <h2 id="making-changes">Making changes</h2>
207207
```
208208
Just like the different languages that we speak and write, HTML has to follow proper "grammar" rules. This is referred to as **syntax**. Tags are used to describe the content, **not** what they look like. That's what CSS is for.
209209

210-
The are many different HTML tags used to create structure and add semantics (meaning) to the content. For example, any content between the `&lt;html>&lt;/html>` tag tells the browser that it is HTML code and content between the `&lt;title>&lt;/title>` tag describes the web page title.
210+
The are many different HTML tags used to create structure and add semantics (meaning) to the content.
211211

212212
```xml
213213
&lt;p>I'm a paragraph because I'm wrapped by paragraph tags.&lt;/p>
@@ -292,10 +292,10 @@ <h2>Nesting HTML tags</h2>
292292
<section class="slide" data-markdown>
293293
##Exercise #1 - Updating your home page (10 mins)
294294

295-
1. In your text editor (Sublime Text), update your name.
295+
1. In the Sublime Text editor, update your name in the `h1` if you haven't already.
296296
1. Add your tag line under your name using the appropriate heading tag.
297297
1. Change the content in the `&lt;title>&lt;/title>` tag. Where do you see this change?
298-
1. Add a copyright message. Use a paragraph (`&lt;p>`) tag *inside* of the `&lt;footer>` tag.
298+
1. Add a copyright message using a paragraph (`&lt;p>`) tag *inside* of the `&lt;footer>` tag.
299299

300300
**Bonus:** Try using an HTML code for the copyright *symbol*. Here are some resources:
301301
http://character-code.com/ascii-table.php
@@ -321,7 +321,7 @@ <h2>Nesting HTML tags</h2>
321321
<section class="slide" data-markdown>
322322
##Navigation menu & Lists
323323

324-
There are two kinds of lists in HTML: ordered (`ol`) for numbered lists & undordered (`ul`) for lists with bullets. *Content must be included only within the list item* (`li`).
324+
There are two kinds of lists in HTML: ordered (`ol`) for numbered lists & unordered (`ul`) for lists with bullets. Content must be included **only within the list item** (`li`).
325325

326326
```xml
327327
&lt;ul&gt;
@@ -342,7 +342,7 @@ <h2>Nesting HTML tags</h2>
342342
<section class="slide" data-markdown>
343343
##Class exercise: Add a navigation
344344

345-
Let's go back to **index.html** and add an unordered list, before `&lt;header>`, as a navigation menu for the three pages: **Home**, **About**, **Contact**.
345+
Let's go back to **index.html** and add an unordered list, *before* `&lt;header>`, as a navigation menu for the three pages: **Home**, **About**, **Contact**.
346346

347347
It should look like this:
348348

@@ -354,7 +354,7 @@ <h2>Nesting HTML tags</h2>
354354

355355
The purpose for creating page navigation is to link to other pages. In addition to creating a list, we'll also need to add links to navigate between the three pages.
356356

357-
Links are represented by the `&lt;a>` (anchor) tag. Unlike the tags we've looked at so far, anchor tags need additional information to specify a link location. An **attribute** can provide additional information and is added inside the opening tag.
357+
Links are represented by the `&lt;a>` (anchor) tag. Unlike the tags we've looked at so far, anchor tags need additional information to specify where to link to. An **attribute** can provide additional information and is added inside the opening tag.
358358

359359
```xml
360360
Visit &lt;a href="http://ladieslearningcode.com">Ladies Learning Code&lt;/a>.
@@ -384,9 +384,9 @@ <h2>Nesting HTML tags</h2>
384384
<section class="slide" data-markdown>
385385
##HTML5 Sectioning Tags
386386

387-
Sometimes, multiple HTML elements need to be grouped together for organization and/or for styling. For example, the heading contains multiple elements (name and tagline) as well as the navigation on the about and contact page.
387+
Sometimes, multiple HTML elements need to be grouped together for organization and/or for styling. For example, the `header` contains multiple elements (name and tagline) as well as the navigation on the about and contact page.
388388

389-
Prior to HTML5, the `&lt;div&gt;` tag was used for grouping elements together to create page layouts. The header and footer of the page might look something like this:
389+
Prior to HTML5, the `&lt;div&gt;` tag was used for grouping elements together to create page layouts. The header of the page might look something like this:
390390

391391
```xml
392392
&lt;div&gt;
@@ -509,26 +509,6 @@ <h2>Exercise #2 - Adding pages and content (20mins)</h2>
509509
```
510510
</section>
511511

512-
<section class="slide">
513-
<h2>Void / Self-closing Element</h2>
514-
515-
<p>Void tags don’t format content — instead, they embed objects in the page. These tags <strong>do not</strong> come in pairs since they do not wrap content like the other tags we’ve been using so far. They <em>are</em> the content!</p>
516-
517-
<p>The syntax is slightly different in the latest version of HTML so you may see it written in two ways. Prior to HTML5, these tags were self-closed with a forward slash (<code>/</code>) immediately before the right angled bracket (<code>&gt;</code>). In HTML5, void tags are not required to self close.</p>
518-
519-
<p>A common void tag is the <code>&lt;br /&gt;</code> or <code>&lt;br&gt;</code> tag used to create a line break.</p>
520-
521-
<pre><code class="xml">&lt;p&gt;This text&lt;br&gt;goes over&lt;br&gt;several&lt;br&gt;lines.&lt;/p&gt;</code></pre>
522-
523-
<!-- example -->
524-
<p>This text<br>goes over<br>several<br>lines.</p>
525-
526-
<p>Another example of a void element is the horizontal rule, <code>&lt;hr&gt;</code> or <code>&lt;hr /&gt;</code>.</p>
527-
528-
<!-- example -->
529-
<hr>
530-
</section>
531-
532512
<section class="slide" data-markdown>
533513
##Image Types
534514
There are many different file types that can be used for the web. Each type is best suited for specific kinds of images. Use the format that maintains the best quality while reducing the file size.
@@ -559,7 +539,9 @@ <h2>Void / Self-closing Element</h2>
559539
<section class="slide">
560540
<h2>Adding images</h2>
561541

562-
<p>Images are another example of a void element. Just like links, the image tag also requires an <em>attribute</em> to define the file path of the image file. However, it uses the <code>src</code> attribute (not <code>href</code>). The value can be an absolute or relative path. The below is an example of an absolute path.</p>
542+
<p>Images are an example of a void element. It doesn't need a closing tag because it <em>is</em> the content. Read more about void elements <a href="framework/extras-void-elements.html">here</a>.</p>
543+
544+
<p>Just like links, the image tag also requires an <em>attribute</em> to define the file path of the image file. However, it uses the <code>src</code> attribute (not <code>href</code>). The value can be an absolute or relative path. The below is an example of an absolute path.</p>
563545

564546
<pre><code>&lt;img src="http://fillmurray.com/200/300"&gt;</code></pre>
565547

@@ -657,7 +639,7 @@ <h2>Adding images</h2>
657639
<section class="slide" data-markdown>
658640
##CSS & HTML
659641

660-
CSS is a different language from HTMl and has its own syntax rules though the two are closely paired. CSS is made up of rules that refer to HTML elements and define what those elements should look like.
642+
Though CSS and HTML are closely paired, CSS is a different language and has its own syntax rules. CSS is made up of *declarations* that refer to HTML elements and define what those elements should look like.
661643

662644
CSS separates content (i.e. text) from presentation (i.e. text colour) and helps to reduce redundancy.
663645

@@ -787,12 +769,14 @@ <h2>Write some CSS</h2>
787769

788770
Create a new CSS file by selecting **File > New File** in Sublime Text or use a shortcut, **CMND/CNTRL + N**. Name the file with a **.css** extension. Some commonly used names are **global.css**, **main.css** or **style.css**.
789771

790-
Remember, external stylesheets are added using the `&lt;link>` tag.
772+
Let's add it to **about.html**.
773+
774+
**Protip!** Can't remember the syntax? Sublime Text has a shortcut. Simply type "link" with no brackets and press tab. Voila!
791775

792776
```
793777
&lt;link rel="stylesheet" href="css/style.css">
794778
```
795-
**Protip!** Can't remember the syntax? Sublime Text has a shortcut. Simply type "link" with no brackets and press tab. Voila!
779+
796780

797781
Let's do a quick check to see if it works and is linked properly by adding a background color on the entire viewport as a test.
798782

@@ -891,6 +875,10 @@ <h2>CSS Font Styles</h2>
891875
</div>
892876

893877
<p>Resource: <a href="http://reference.sitepoint.com/css/typography">Sitepoint Typographical Properties</a></p>
878+
879+
<div class="presenter-notes">
880+
<p>Explain what each property does while updating each example in the code editor.</p>
881+
</div>
894882
</section>
895883

896884
<section class="slide" data-markdown>
@@ -945,7 +933,7 @@ <h2>Lunchtime exercise!</h2>
945933
<p>Feel free to peek at the next exercise ;)</p>
946934

947935
<div class="presenter-notes">
948-
<p>Aim to get to lunch by 12:30-1:00pm. A 45min lunch is recommended. Let the learners know this is optional but most people tend to enjoy continuing with a bit of exercises over the break and this will help speed up the next exercise.</p>
936+
<p>Aim to get to lunch by 12:30-1:00pm. A 45min lunch is recommended. Let the learners know this is optional but most people tend to enjoy continuing on a bit of exercises over the break. This will help speed up the next exercise.</p>
949937
</div>
950938
</section>
951939
<section class="slide">

0 commit comments

Comments
 (0)