Skip to content

Commit 07d1092

Browse files
committed
Merge pull request #122 from charlieegan3/gh-pages
HTML Tutorial Improvments
2 parents 76776b0 + ded246a commit 07d1092

8 files changed

Lines changed: 30 additions & 33 deletions

File tree

115 KB
Loading
-9.32 KB
Binary file not shown.

html/lesson3/example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<img src="assets/images/ada_lovelace.jpg" height="60px"/>
1111
</div>
1212
<div class="title">
13-
<h2> Hi, I'm Ada Lovelace</h2>
13+
<h2>Hi, I'm Ada Lovelace</h2>
1414
</div>
1515
</header>
1616

html/lesson3/tutorial.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Add the heading `<h2>`, underneath the `<div>` wrapping the image, within the `<
101101

102102
```html
103103
<div>
104-
<h2> Hi, I'm Ada Lovelace</h2>
104+
<h2>Hi, I'm Ada Lovelace</h2>
105105
</div>
106106
```
107107

@@ -135,7 +135,7 @@ Make the `div` element surrounding the heading inline. Start by adding a class `
135135

136136
```html
137137
<div class="title">
138-
<h2> Hi, I'm Ada Lovelace</h2>
138+
<h2>Hi, I'm Ada Lovelace</h2>
139139
</div>
140140
```
141141
and then the relevant CSS
@@ -168,22 +168,19 @@ and make the picture a bit smaller
168168

169169
### What is the box model?
170170

171-
An element can be visualised as a box. The box model tells browsers how the element and its attributes relate to each other.
171+
An element can be visualised as a box. The box model is a way of describing the stacking of spatial properties of an element, those which effect it's size &amp; spacing on the page. These are: `padding`, `margin`, `border` as well as `height` and `width`.
172172

173-
Characteristics that define the box model are `padding`, `margin`, `border`, `height` and `width`.
173+
**<span style="color: rgb(130,171,182);">blue</span>** represents the values for `height` and `width`. Typically these values are set implicitly based on the content.
174174

175-
**<span style="color: LightSkyBlue;">blue</span>** is where `height` and `width` are defined. These properties don't always need to be set. By default they will use relevant sizing dimensions based on the inner content.
175+
**<span style="color: rgb(185,197,124);">green</span>** represents the `padding` &mdash; the space inside the `border`. `padding` adds to the total size of the box. So setting `padding-left: 10px;` and `width: 20px;` would make the element **30px** wide on the page.
176176

177-
**<span style="color: mediumpurple;">purple</span>** shows the `padding` &mdash; the space between the content and the `border`. The padding also adds to the total width of the box. So if you set `padding: 10px;` and `width: 20px;` your element will be **30px** long.
177+
**<span style="color: rgb(244,211,139);">yellow</span>** is the `border` &mdash; the edge around the content and `padding`. It can be styled in various ways and represents the outer most visible part of an element.
178178

179-
**black** is the `border` &mdash; the edge around the box. Its _thickness_, _style_ and _color_ can be defined.
179+
**<span style="color: rgb(239,195,144);">orange</span>** is the `margin` &mdash; the spacing outside the border. This separates the element from other elements on the page.
180180

181-
**<span style="color: gold;'">yellow</span>** is the `margin` &mdash; the transparent area around the box. This separates it from other elements.
182-
183-
_only the bottom margin is visible in our example. `padding`, `margin` and `border` can be defined for any or all sides of the box._
184-
185-
![](assets/images/padding_and_margin-bottom.png)
181+
Note: `padding`, `margin` and `border` can be applied to any combination of sides, below all three are applied in equal measure to all four sides around the content.
186182

183+
![](assets/images/box-model.png)
187184

188185
### Styling the header
189186

@@ -221,7 +218,7 @@ Let's add some content! Add the following inside the `div` in the html file
221218

222219
```html
223220
<div>
224-
<b> Me on the internet</b>
221+
<b>Me on the internet</b>
225222
<ul>
226223
<li><a href="https://www.facebook.com/augusta.ada.lovelace">facebook</a> </li>
227224
<li><a href="http://en.wikipedia.org/wiki/Ada_Lovelace">wikipedia</a> </li>
@@ -235,7 +232,7 @@ Add a class `sidebar` to the div we just defined. This is so that we can change
235232

236233
```html
237234
<div class="sidebar">
238-
<b> Me on the internet</b>
235+
<b>Me on the internet</b>
239236
...
240237
```
241238

@@ -293,7 +290,7 @@ Remove the list bullets and change the default margin and padding of the **u**no
293290

294291
```css
295292
ul.social-media {
296-
list-style:none;
293+
list-style: none;
297294
margin-left: 10px;
298295
padding-left: 20px;
299296
}
@@ -333,7 +330,7 @@ We only want links that are within the list to be affected. So we will specifica
333330
```css
334331
.social-media li a {
335332
color: #4c4066;
336-
text-decoration:none;
333+
text-decoration: none;
337334
text-shadow: 1px 0px #ffffff;
338335
border-left: 7px solid #fdcc38;
339336
padding-left: 10px;
@@ -358,7 +355,7 @@ The sidebar is now almost perfect. Tweak a couple of other properties so that th
358355

359356
```css
360357
.sidebar b {
361-
margin-left:36px;
358+
margin-left: 36px;
362359
color: #4c4066;
363360
font-size: 19px;
364361
}

html/lesson4/example.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ <h1> Grace Hopper</h1>
1414
</div>
1515
<div id="resources">
1616
<ul>
17-
<li> <a href="http://www.personal.psu.edu/djd5202/ass6.html">Computer Scientist</a></li>
18-
<li> <a href="http://www.youtube.com/watch?v=1-vcErOPofQ">Grace Hopper on Letterman</a></li>
19-
<li> <a href="http://en.wikipedia.org/wiki/Grace_Hopper">Wikipedia</a></li>
20-
<li> <a href="http://en.wikiquote.org/wiki/Grace_Hopper">Wikiquote</a></li>
17+
<li><a href="http://www.personal.psu.edu/djd5202/ass6.html">Computer Scientist</a></li>
18+
<li><a href="http://www.youtube.com/watch?v=1-vcErOPofQ">Grace Hopper on Letterman</a></li>
19+
<li><a href="http://en.wikipedia.org/wiki/Grace_Hopper">Wikipedia</a></li>
20+
<li><a href="http://en.wikiquote.org/wiki/Grace_Hopper">Wikiquote</a></li>
2121
</ul>
2222
</div>
2323
</header>

html/lesson4/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Before styling the header, reset the default styling of the page. This ensures c
7070

7171
```css
7272
body {
73-
padding:0;
74-
margin:0;
73+
padding: 0;
74+
margin: 0;
7575
}
7676
```
7777

@@ -159,7 +159,7 @@ Color the `<h1>` so it stands out and is not the same as the other text on the p
159159

160160
## Adding a toolbar
161161

162-
Add some of the resources we used to find out more information about Grace.
162+
Add some of the resources we used to find out more information about Grace.
163163
This should be placed before the header closing tag.
164164

165165
```html
@@ -181,7 +181,7 @@ First let's remove the bullet from the list of links
181181

182182
```css
183183
#resources ul {
184-
list-style:none;
184+
list-style: none;
185185
margin: 0;
186186
padding: 0;
187187
}
@@ -459,7 +459,7 @@ Extend `header` and set its position to fixed
459459
position: fixed;
460460
```
461461

462-
> Refresh the page. Notice how the header size has now collapsed to the size of its content?
462+
> Refresh the page. Notice how the header size has now collapsed to the size of its content?
463463

464464
Fix this by setting the width
465465

html/lesson5/example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Anita Borg</h1>
2323
<ul>
2424
<li>1995 Augusta Ada Lovelace Award</li>
2525
<li>1995 EFF Pioneer Award</li>
26-
<li> 1996 Presidential Commission on the Advancement of Women and Minorities in Science, Engineering, and Technology
26+
<li>1996 Presidential Commission on the Advancement of Women and Minorities in Science, Engineering, and Technology
2727
</li>
2828
<li>2002 8th Annual Heinz Award for Technology, the Economy and Employment</li>
2929
<li>2002 Honorary Doctor of Science and Technology</li>
@@ -63,7 +63,7 @@ <h2>
6363
</p>
6464

6565
<p>
66-
Now for a bit of advice: Don't underestimate yourself, but learn to know yourself. Learn to understand your strengths and believe in yourself. Be rationally optimistic. Optimism is a wonderful thing, it gets you where you're going. If you aren't optimistic that you will accomplish something, you never go after it. Pessimism is just plain self-defeating. Fantasize about the future and what you can do about it. We're in this fabulous bunch of fields where there are all sorts of futuristic things to be doing. The reality is almost outstripping some of our fantasies at this point. Keep an active fantasy life about what you can do and what your possibilities are. Have principles and work towards them, but be patient with yourself when you can't change the whole world. You can't do it all by yourself. So seek out other women in places like this. Seek out like-minded souls to talk to when you're in the middle of a struggle. And mentor others. The same questions that you have today are going to come up with young women in twenty years when you are up here on this stage. Be patient and keep answering them and keep answering them and keep helping people.
66+
Now for a bit of advice: Don't underestimate yourself, but learn to know yourself. Learn to understand your strengths and believe in yourself. Be rationally optimistic. Optimism is a wonderful thing, it gets you where you're going. If you aren't optimistic that you will accomplish something, you never go after it. Pessimism is just plain self-defeating. Fantasize about the future and what you can do about it. We're in this fabulous bunch of fields where there are all sorts of futuristic things to be doing. The reality is almost outstripping some of our fantasies at this point. Keep an active fantasy life about what you can do and what your possibilities are. Have principles and work towards them, but be patient with yourself when you can't change the whole world. You can't do it all by yourself. So seek out other women in places like this. Seek out like-minded souls to talk to when you're in the middle of a struggle. And mentor others. The same questions that you have today are going to come up with young women in twenty years when you are up here on this stage. Be patient and keep answering them and keep answering them and keep helping people.
6767
</p>
6868
</div>
6969
</div>

html/lesson6/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</aside>
3131

3232
<article id="women-have-always-coded">
33-
<h1> Women have always coded </h1>
33+
<h1>Women have always coded </h1>
3434
<p>
3535
Programming has always been women's work.
3636
</p>
@@ -53,7 +53,7 @@ <h1> Women have always coded </h1>
5353
<h1>Women Programmers</h1>
5454

5555
<section id="ada">
56-
<h3> Ada Lovelace</h3>
56+
<h3>Ada Lovelace</h3>
5757
<figure>
5858
<img src="assets/images/ada_lovelace.jpg"/>
5959
<figcaption>
@@ -64,7 +64,7 @@ <h3> Ada Lovelace</h3>
6464
</section>
6565

6666
<section id="grace">
67-
<h3> Grace Hopper</h3>
67+
<h3>Grace Hopper</h3>
6868
<figure>
6969
<img src="assets/images/grace.jpg"/>
7070
<figcaption>
@@ -75,7 +75,7 @@ <h3> Grace Hopper</h3>
7575
</section>
7676

7777
<section id="anita">
78-
<h3> Anita Borg</h3>
78+
<h3>Anita Borg</h3>
7979
<figure>
8080
<img src="assets/images/anita.jpg" width='230px'/>
8181
<figcaption>

0 commit comments

Comments
 (0)