-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
261 lines (235 loc) · 6.76 KB
/
index.html
File metadata and controls
261 lines (235 loc) · 6.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!-- Color pallet used : https://colorhunt.co/palette/222831393e4600adb5eeeeee -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Website that contains all the CSS taught in Web Development Bootcamp by Dr. Angela Yu"
/>
<title>CSS Helpbook</title>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<h1 id="page-heading">CSS Helpbook</h1>
<hr />
<ol id="main-list">
<li id="1.InlineCSS">
<h2 class="list-title">Inline CSS</h2>
<p class="list-description">
Inline CSS is the most basic way to style an HTML element. It is
applied directly to the HTML element using the style attribute.
</p>
<p class="list-description">
Inline CSS is not recommended because it is not reusable and it
clutters the HTML code.
</p>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code><h1 style="color: red;">Hello World</h1></code></pre>
</li>
<li id="2.InternalCSS">
<h2 class="list-title">Internal CSS</h2>
<p class="list-description">
Internal CSS is a way to style an HTML element by using the style
element inside the head element.
</p>
<p class="list-description">
Internal CSS is not recommended because it is not reusable and it
clutters the HTML code.
</p>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code><head>
<style>
h1 {
color: red;
}
</style>
</head>
</code></pre>
</li>
<li id="3.ExternalCSS">
<h2 class="list-title">External CSS</h2>
<p class="list-description">
External CSS is a way to style an HTML element by using a separate CSS
file.
</p>
<p class="list-description">
External CSS is recommended because it is reusable and it does not
clutter the HTML code.
</p>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code><head>
<link rel="stylesheet" href="styles.css" />
</head>
</code></pre>
</li>
<li id="4.CSS-Syntax">
<h2 class="list-title">CSS Syntax</h2>
<p class="list-description">
CSS Syntax is the way to write CSS code. It is made up of selectors
and declarations.
</p>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code>selector {
property: value;
}
</code></pre>
</li>
<li id="5.CSS-Selectors">
<h2 class="list-title">CSS Selectors</h2>
<p class="list-description">
CSS Selectors are used to select the HTML element that you want to
style.
</p>
<p class="list-description">Selectors available in CSS are:</p>
<ul class="list-description">
<li>Classes</li>
<li>IDs</li>
</ul>
<p class="list-description">
For more information on CSS Selectors:
<a href="https://devdocs.io/css/css_selectors">Devdocs.io</a>
</p>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code>/* Classes */
.class {
property: value;
}
/* IDs */
#id {
property: value;
}
</code></pre>
</li>
<li id="6.Favicons">
<h2 class="list-title">Favicons</h2>
<p class="list-description">
Favicons are the small icons that appear on the browser tab.
</p>
<p class="list-description">
Favicons are created using the
<a href="https://favicon.io/favicon-converter/">Favicon.io</a> tool.
</p>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code><head>
<link rel="icon" href="favicon.ico" />
</head></code></pre>
</li>
<li id="7.DisplayProperty">
<h2 class="list-title">CSS:Display Property</h2>
<p class="list-description">
The display property specifies the display behavior (the type of
rendering box) of an element.
</p>
<p class="list-description">
The display property can take the following values:
</p>
<ul class="list-description">
<li>block</li>
<li>inline</li>
<li>inline-block</li>
<li>none</li>
</ul>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code>/* block */
h1 {
display: block;
}
/* inline */
h1 {
display: inline;
}
/* inline-block */
h1 {
display: inline-block;
}
/* none */
h1 {
display: none;
}</code></pre>
<p class="list-description">
<span class="sub-heading">Common Inline Elements</span><br /><br />
- Spans (<span>) <br />
- Images (<img>) <br />
- Anchors (<a>) <br />
- Buttons (<button>) <br />
- Inputs (<input>) <br />
- Textareas (<textarea>)
</p>
<p class="list-description">
<span class="sub-heading">Common Block Elements</span><br /><br />
- Divs (<div>) <br />
- Paragraphs (<p>) <br />
- Headers (<h1>, <h2>, <h3>, <h4>, <h5>,
<h6>) <br />
- Lists (<ul>, <ol>, <li>) <br />
- Tables (<table>, <tr>, <th>, <td>)
</p>
</li>
<li id="8.Positioning">
<h2 class="list-title">CSS:Positioning</h2>
<p class="list-description">
The position property specifies the type of positioning method used
for an element.
</p>
<p class="list-description">
The position property can take the following values:
</p>
<ul class="list-description">
<li>static</li>
<li>relative</li>
<li>absolute</li>
<li>fixed</li>
<li>sticky</li>
</ul>
<p class="list-description">
<strong>Example:</strong>
</p>
<pre class="list-code">
<code>/* static */
h1 {
position: static;
}
/* relative */
h1 {
position: relative;
}
/* absolute */
h1 {
position: absolute;
}
/* fixed */
h1 {
position: fixed;
}
/* sticky */
h1 {
position: sticky;
}</code></pre>
</li>
</ol>
</body>
</html>