Skip to content

Commit 607fe29

Browse files
Simplified HTML exercises & homepage markup. Reduced exercise time.
1 parent 64ec3d9 commit 607fe29

3 files changed

Lines changed: 53 additions & 83 deletions

File tree

-3.82 KB
Loading

index.html

Lines changed: 44 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ <h2>Setting Up Our Work Flow</h2>
177177
<section class="slide">
178178
<h2 id="making-changes">Making changes</h2>
179179

180-
<p>Let's make a change. Replace the “your name here” content, save the file, and refresh your browser.</p>
180+
<p>Let's make a change. Replace the “your name here” content, save the file, then refresh your browser.</p>
181181

182182
<p>This will be your work flow for the day.</p>
183183

@@ -293,7 +293,7 @@ <h2>Nesting HTML tags</h2>
293293
</section>
294294

295295
<section class="slide">
296-
<h2>Exercise #1 - Updating your home page (10 mins)</h2>
296+
<h2>Exercise #1 - Updating your home page (5 mins)</h2>
297297

298298
<ol>
299299
<li>In the Sublime Text editor, update your name in the <code>h1</code> tag if you haven’t already.</li>
@@ -318,20 +318,24 @@ <h2>Exercise #1 - Updating your home page (10 mins)</h2>
318318
<section class="slide project" data-markdown>
319319
##Adding more HTML & content
320320

321-
All three pages have the same headings, navigation links and footer information. Though the home page header and navigation look different from the other two pages, don't worry about that just yet. Right now we are just concentrating on adding the HTML.
321+
All three pages have the same headings, navigation links and footer information. Though the home page header and navigation *look* different from the other two pages, don't worry about that just yet. Right now we are just concentrating on adding the HTML.
322322

323323
![project home page](framework/img/workshop/project1.jpg)
324324
![project about page](framework/img/workshop/project2.jpg)
325325
![project contact page](framework/img/workshop/project3.jpg)
326326

327-
It's best to write as much HTML as possible before adding CSS to ensure that the proper tags are being used and to help keep your code organized and semantic.
327+
**Protip!** It's best to write as much HTML & content as possible before adding CSS to ensure that the proper tags are being used. This will help keep your code organized and [semantic](http://en.wikipedia.org/wiki/Semantic_HTML).
328328
</section>
329329

330330
<section class="slide" data-markdown>
331331
##Navigation menu & Lists
332332

333+
Navigational elements are commonly created using lists.
334+
333335
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`).
334336

337+
Since the order of the list items doesn't matter for creating nav items, an unordered list can be used.
338+
335339
```xml
336340
&lt;ul&gt;
337341
&lt;li&gt;Unordered list item&lt;/li&gt;
@@ -344,39 +348,28 @@ <h2>Exercise #1 - Updating your home page (10 mins)</h2>
344348
&lt;li&gt;Ordered list item&lt;/li&gt;
345349
&lt;/ol&gt;
346350
```
347-
348-
Navigational elements are commonly created using lists. Since the order of the list items doesn't matter for creating nav items, an unordered list can be used.
349-
</section>
350-
351-
<section class="slide" data-markdown>
352-
##Class exercise: Add a navigation
353-
354-
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**.
355-
356-
It should look like this:
357-
358-
![nav list](framework/img/workshop/nav-list.png)
359351
</section>
360352

361353
<section class="slide" data-markdown>
362354
##Links & Attributes
363355

364356
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.
365357

366-
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.
358+
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*.
367359

368360
```xml
369361
Visit &lt;a href="http://ladieslearningcode.com">Ladies Learning Code&lt;/a>.
370362
```
371363

372-
In the above example, `href` is the *attribute*, `http://ladieslearningcode.com` is the *value* of that attribute.
364+
In the above example, `href` is the *attribute*, `http://ladieslearningcode.com` is the *value*.
365+
373366
Also, note that the clickable text goes in between the opening and closing a tags.
374367
</section>
375368

376369
<section class="slide" data-markdown>
377370
##Links: Absolute vs Relative
378371

379-
This is an example of an **absolute hyperlink**. It's "fully resolved" and starts with `http://` much like typing a url into the browser.
372+
This is an example of an **absolute hyperlink**. Much like typing a URL into the browser, it's "fully resolved" and starts with `http://`.
380373

381374
```xml
382375
Visit &lt;a href="http://ladieslearningcode.com">Ladies Learning Code&lt;/a>.
@@ -393,27 +386,9 @@ <h2>Exercise #1 - Updating your home page (10 mins)</h2>
393386
<section class="slide" data-markdown>
394387
##HTML5 Sectioning Tags
395388

396-
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.
397-
398-
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:
399-
400-
```xml
401-
&lt;div&gt;
402-
&lt;h1&gt;Jane Smith&lt;/h1&gt;
403-
&lt;h2&gt;Web Developer + City Girl&lt;/h2&gt;
404-
405-
&lt;div&gt;
406-
&lt;ul&gt;
407-
&lt;li&gt;&lt;a href="">Home&lt;/a>&lt;/li&gt;
408-
&lt;li&gt;&lt;a href="">About&lt;/a>&lt;/li&gt;
409-
&lt;li&gt;&lt;a href="">Contact&lt;/a>&lt;/li&gt;
410-
&lt;/ul&gt;
411-
&lt;/div&gt;
412-
&lt;/div&gt;
413-
414-
```
389+
Sometimes, multiple HTML elements need to be grouped together for organization and/or for styling. Prior to HTML5, the `&lt;div&gt;` tag was used for grouping elements. While it is still valid, HTML5 introduced a number of semantic tags that better describe blocks of content. You've already seen two of them: `&lt;header&gt;` and `&lt;footer&gt;`. We'll be using two more today: `&lt;nav&gt;` and `&lt;section&gt;`.
415390

416-
The `&lt;div&gt;` is still valid but HTML5 introduced a number of semantic tags that better describe blocks of content such as `&lt;header&gt;`, `&lt;footer&gt;`, `&lt;nav&gt;`, `&lt;section&gt;`. The above example can be changed to this:
391+
For the navigation, adding a `&lt;nav&gt;` tag around the list will make it more semantic. It can also be grouped with the headings by adding it *inside* of the `&lt;header&gt;` tag.
417392

418393
```xml
419394
&lt;header&gt;
@@ -422,20 +397,33 @@ <h2>Exercise #1 - Updating your home page (10 mins)</h2>
422397

423398
&lt;nav&gt;
424399
&lt;ul&gt;
425-
&lt;li&gt;&lt;a href="">Home&lt;/a>&lt;/li&gt;
426-
&lt;li&gt;&lt;a href="">About&lt;/a>&lt;/li&gt;
427-
&lt;li&gt;&lt;a href="">Contact&lt;/a>&lt;/li&gt;
400+
&lt;li&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt;
401+
&lt;li&gt;&lt;a href="about.html"&gt;About&lt;/a&gt;&lt;/li&gt;
402+
&lt;li&gt;&lt;a href="contact.html"&gt;Contact&lt;/a&gt;&lt;/li&gt;
428403
&lt;/ul&gt;
429404
&lt;/nav&gt;
430405
&lt;/header&gt;
431406
```
432-
More about HTML5 here: http://html5doctor.com
407+
**Extra resource:** More about HTML5 here: http://html5doctor.com
408+
</section>
409+
410+
<section class="slide">
411+
<h2>Class exercise: Add a navigation</h2>
412+
413+
<p>Let’s go back to <strong>index.html</strong> and add the navigation for the three pages: <strong>Home</strong>, <strong>About</strong>, <strong>Contact</strong>.</p>
414+
<p>Eventually we’ll have 3 HTML pages to link to as well, <strong>index.html</strong>, <strong>about.html</strong> and <strong>contact.html</strong>. Let's also add <em>relative</em> links to these pages in the navigation list. It should look like this:</p>
415+
416+
<p><img src="framework/img/workshop/nav-list.png" alt="nav list" title=""></p>
417+
418+
<div class="presenter-notes">
419+
<p>Anything titled “class exercise” is meant to be a type along exercise. The code is there as reference. </p>
420+
</div>
433421
</section>
434422

435423
<section class="slide" data-markdown>
436-
##Good file naming habits
424+
##Creating HTML pages
437425

438-
To create an HTML page, name your file using an `.html` extension and it will open in your default browser (much like .pdf for PDF files or .doc for Word files). Before we start another exercise, let's go over some best practices.
426+
To create an HTML page, name your file using an `.html` extension and it will open in your default browser (much like .pdf for PDF files or .doc for Word files). Here are some best practices and good file naming tips.
439427

440428
* Use lowercase letters.
441429
* **about.html** instead of **About.html** or **ABOUT.html**
@@ -451,7 +439,7 @@ <h2>Exercise #1 - Updating your home page (10 mins)</h2>
451439
</section>
452440

453441
<section class="slide">
454-
<h2>Exercise #2 - Adding pages and content (20mins)</h2>
442+
<h2>Exercise #2 - Adding pages and content (10mins)</h2>
455443

456444
<p>We are just adding HTML content so don’t worry about how to style the page just yet. Writing code often requires a lot moving, deleting and adding content. Here are some more shortcuts that will come in handy to speed up your work flow.</p>
457445
<p>
@@ -466,39 +454,21 @@ <h2>Exercise #2 - Adding pages and content (20mins)</h2>
466454
<li>Create an new page (cmnd/ctrl + n) and name it <strong>about.html</strong>
467455
<ul>
468456
<li>Save it in the same folder as <strong>index.html</strong> (project folder)</li>
469-
<li>Be sure to include all the <a href="/#slide14">basic HTML tags</a></li>
470-
<li>Update the <code>title</code> tag to update the page title</li>
471-
<li>Add the HTML5 header and nav markup referenced in <a href="index.html#slide23">HTML5 Sectioning Tags</a></li>
472-
<li>Add <strong>relative</strong> links to navigate between pages</li>
473-
<li>Add the footer content created in <strong>index.html</strong></li>
457+
<li>Copy all the contents from <strong>index.html</strong> into your new page. It's is all the same content right now.</li>
458+
<li>Update the <code>title</code> tag to reflect the contents of the page. (e.g. Your Name | About Me )</li>
474459
</ul>
475460
</li>
476461
<li>Create a new page and name it <strong>contact.html</strong>
477462
<ul>
478-
<li>Follow the same instructions as the About page (or just copy it and update the page title)</li>
463+
<li>Follow the same instructions as the About page.</li>
479464
</ul>
480465
</li>
481-
<li>
482-
Add the same navigation markup and relative links to <strong>index.html</strong> <em>BUT</em> since the structure and style is different, put the nav HTML <strong>above</strong> the header tag, not inside like About and Contact. The order of the HTML will matter when we add CSS to it later. Here is the code sample for reference for the home page (index.html).
483-
</li>
484-
<pre><code>&lt;nav&gt;
485-
&lt;ul&gt;
486-
&lt;li&gt;&lt;a href=""&gt;Home&lt;/a&gt;&lt;/li&gt;
487-
&lt;li&gt;&lt;a href=""&gt;About&lt;/a&gt;&lt;/li&gt;
488-
&lt;li&gt;&lt;a href=""&gt;Contact&lt;/a&gt;&lt;/li&gt;
489-
&lt;/ul&gt;
490-
&lt;/nav&gt;
491-
492-
&lt;header&gt;
493-
&lt;h1&gt;Jane Smith&lt;/h1&gt;
494-
&lt;h2&gt;Web Developer + City Girl&lt;/h2&gt;
495-
&lt;/header&gt;
496-
</code></pre>
466+
<li>Test the navigation. Are all the links going to the proper page?</li>
497467
</ol>
498468
<p>If you get stuck, you can take a peek in the <strong>examples</strong> folder: <a href="project/examples/exercise2-home.html">exercise2-home.html</a>, <a href="project/examples/exercise2-about.html">exercise2-about.html</a>, <a href="project/examples/exercise2-contact.html">exercise2-contact.html</a></p>
499469

500470
<div class="presenter-notes">
501-
<p>Check in with learners after 20mins. If majority of people have not started step 3, give them 5-10 more minutes. If they are still not done after that, let them know they'll have some time in the next exercise to finish up.</p>
471+
<p>Check in with learners after 10mins. If majority of people have not finished, give them 5-10 more minutes. If they are still not done after that, let them know they'll have some time in the next exercise to finish up.</p>
502472
</div>
503473
</section>
504474

@@ -548,7 +518,7 @@ <h2>Exercise #2 - Adding pages and content (20mins)</h2>
548518
<section class="slide">
549519
<h2>Adding images</h2>
550520

551-
<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>
521+
<p>Images are an example of a void element/self-closing tag. 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>
552522

553523
<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>
554524

@@ -599,7 +569,8 @@ <h2>Adding images</h2>
599569
<section class="slide" data-markdown>
600570
##Exercise #3 - Update the About page (15 mins)
601571

602-
Add some more content to your About page. If you need to reference what you page should look like before adding these updates, take a look at [exercise2-about.html](project/examples/exercise2-about.html) in the **examples** folder.
572+
Add a profile picture, heading and some information to your About page to make it look like this:
573+
[exercise3-about.html](project/examples/exercise3-about.html).
603574

604575
Use the `&lt;section>` tag to create a new sectioning block for the page content. Add it *between* the `&lt;header>` tag and the `&lt;footer>` like this:
605576

@@ -622,8 +593,8 @@ <h2>Adding images</h2>
622593
&lt;/footer&gt;
623594
```
624595

625-
1. Inside of the `section` tag, add a profile picture.
626-
1. After the image tag, add an `h2` for the page title.
596+
1. Inside of the `section` tag, add a profile picture using the `img` tag.
597+
1. After your profile picture, add an `h2` for the About page title.
627598
1. After the `h2`, add a couple of paragraphs about you, or use placeholder text.
628599

629600
**Bonus:** Try adding a couple links. Ask a mentor how to get a link to open in a new tab/window.

project/examples/exercise2-home.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<title>Jane Smith</title>
5+
<title>Jane Smith | Web Developer + City Girl</title>
66
</head>
77
<body>
8-
9-
<nav>
10-
<ul>
11-
<li><a href="exercise2-home.html">Home</a></li>
12-
<li><a href="exercise2-about.html">About</a></li>
13-
<li><a href="exercise2-contact.html">Contact</a></li>
14-
</ul>
15-
</nav>
16-
178
<header>
189
<h1>Jane Smith</h1>
1910
<h2>Web Developer + City Girl</h2>
11+
12+
<nav>
13+
<ul>
14+
<li><a href="exercise2-home.html">Home</a></li>
15+
<li><a href="exercise2-about.html">About</a></li>
16+
<li><a href="exercise2-contact.html">Contact</a></li>
17+
</ul>
18+
</nav>
2019
</header>
2120

2221
<footer>

0 commit comments

Comments
 (0)