More Related Content
Similar to Intro to HTML & CSS (20)
More from Colin Loretz (11)
Intro to HTML & CSS
- 19. <html>
<head>
<title>Our Page</title>
</head>
<body>
</body>
</html>
- 21. <html>
<head>
<title>Our Page</title>
</head>
<body>
<!-- code body here -->
</body>
</html>
- 34. <p>
Some text
<small>
some smaller text
</small>
</p>
- 50. <table>
<thead>
<th>Name</th>
<th>Price</th>
</thead>
<tbody>
<tr>
<td>Latte</td>
<td>$3.95</td>
</tr>
</tbody>
</table>
- 66. h2 { ... }
li { ... }
p { ... }
by element
- 67. .products { ... }
li.products { ... }
li .products { ... }
by class
- 68. #intro { ... }
div#intro { ... }
div #intro { ... }
by ID
- 77. margin
padding
height
width
- 79. div {
height: 50px;
width: 100px;
padding: 5px 10px 5px 10px;
margin: 5px 10px 5px 10px;
}
- 80. 5px
5px
10px 10px 50px 10px 10px
100px
5px
5px
- 81. HEIGHT
Height + padding-top + padding-bottom +
margin-top + margin-bottom
50px + 5px + 5px + 5px + 5px =
70px
WIDTH
Width + padding-left + padding-right +
margin-left + margin-right
50px + 10px + 10px + 10px + 10px =
90px
- 82. div {
margin: top right bottom left;
}
div {
margin: 5px 10px 5px 10px;
}
- 87. div {
float: left;
}
div {
float: right;
}