You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: html/lesson3/tutorial.md
+14-17Lines changed: 14 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ Add the heading `<h2>`, underneath the `<div>` wrapping the image, within the `<
101
101
102
102
```html
103
103
<div>
104
-
<h2>Hi, I'm Ada Lovelace</h2>
104
+
<h2>Hi, I'm Ada Lovelace</h2>
105
105
</div>
106
106
```
107
107
@@ -135,7 +135,7 @@ Make the `div` element surrounding the heading inline. Start by adding a class `
135
135
136
136
```html
137
137
<divclass="title">
138
-
<h2>Hi, I'm Ada Lovelace</h2>
138
+
<h2>Hi, I'm Ada Lovelace</h2>
139
139
</div>
140
140
```
141
141
and then the relevant CSS
@@ -168,22 +168,19 @@ and make the picture a bit smaller
168
168
169
169
### What is the box model?
170
170
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 & spacing on the page. These are: `padding`, `margin`, `border` as well as `height` and `width`.
172
172
173
-
Characteristics that define the box model are `padding`, `margin`, `border`, `height` and `width`.
173
+
**<spanstyle="color: rgb(130,171,182);">blue</span>** represents the values for `height` and `width`. Typically these values are set implicitly based on the content.
174
174
175
-
**<spanstyle="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
+
**<spanstyle="color: rgb(185,197,124);">green</span>**represents the `padding`— 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.
176
176
177
-
**<spanstyle="color: mediumpurple;">purple</span>**shows the `padding`— 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
+
**<spanstyle="color: rgb(244,211,139);">yellow</span>**is the `border`— the edge around the content and `padding`. It can be styled in various ways and represents the outer most visible part of an element.
178
178
179
-
**black** is the `border`— the edge around the box. Its _thickness_, _style_ and _color_ can be defined.
179
+
**<spanstyle="color: rgb(239,195,144);">orange</span>** is the `margin`— the spacing outside the border. This separates the element from other elements on the page.
180
180
181
-
**<spanstyle="color: gold;'">yellow</span>** is the `margin`— 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
-

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.
186
182
183
+

187
184
188
185
### Styling the header
189
186
@@ -221,7 +218,7 @@ Let's add some content! Add the following inside the `div` in the html file
Copy file name to clipboardExpand all lines: html/lesson5/example.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ <h1>Anita Borg</h1>
23
23
<ul>
24
24
<li>1995 Augusta Ada Lovelace Award</li>
25
25
<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
27
27
</li>
28
28
<li>2002 8th Annual Heinz Award for Technology, the Economy and Employment</li>
29
29
<li>2002 Honorary Doctor of Science and Technology</li>
@@ -63,7 +63,7 @@ <h2>
63
63
</p>
64
64
65
65
<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.
0 commit comments