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: README.md
+54-37Lines changed: 54 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -29,14 +29,13 @@ Please set up the following:
29
29
* Download the tutorial files on this page within the zip file
30
30
31
31
###### Download the files for this class:
32
-
- Go to https://github.com/GalvanizeOpenSource/Learn-To-Code-HTML-CSS
33
-
- Click on the button on the right-hand side that says "Download ZIP"
34
-
- Go to your downloads folder and double click on the .zip file to unzip it
35
-
- IMPORTANT! leave all the individual files in the downloaded folder (if you would like to move it out of the downloads folder move the entire folder, not individual items)
36
-
- From Atom: file > open, select the folder and then click "Open"
37
-
- From Atom: if the file tree does not appear on the left hand View > Toggle Tree View -- this will show you the entire folder within Atom
38
-
-*Now if you already know some of what we're talking about,* you're all set to poke around in the files -- index.html and CSS/style.css are the two files we will using.
39
-
32
+
1. Go to https://github.com/GalvanizeOpenSource/Learn-To-Code-HTML-CSS
33
+
2. Click on the button on the right-hand side that says "Download ZIP"
34
+
3. Go to your downloads folder and double click on the .zip file to unzip it
35
+
4. IMPORTANT! Leave all the individual files in the downloaded folder (if you would like to move it out of the downloads folder move the entire folder, not individual items)
36
+
5. From Atom: file > open, select the folder and then click "Open"
37
+
6. From Atom: if the file tree does not appear on the left hand View > Toggle Tree View -- this will show you the entire folder within Atom
38
+
7.*Now if you already know some of what we're talking about,* you're all set to poke around in the files -- index.html and CSS/style.css are the two files we will using.
40
39
41
40
Patience! Setting up your computer takes time and can be tricky, especially across platforms.
42
41
@@ -59,17 +58,17 @@ e.g. Element = <tag attribute=”blahblah”>content content</tag>
59
58
Tags are used to mark up the beginning and end of an HTML element.
60
59
61
60
Almost everything in HTML needs to start and end with a tag
62
-
Everything is wrapped like layers of an onionm`<opened>` and `</closed>`
63
-
e.g. `<div>”Hello!”</div>`
64
-
Note: not every tag is like this!
65
-
66
-
*Common Tags:*
67
-
`<html></html>` designates document as HTML
68
-
`<div></div>` notes a block element in the page
69
-
`<a></a>` anchor, activates a link in the page
70
-
`<head></head>` contains meta information
71
-
`<body></body>` contains browser information
72
-
`<span></span>` notes an inline element
61
+
Everything is wrapped like layers of an onion,`<opened>` and `</closed>`
62
+
-e.g. `<div>”Hello!”</div>`
63
+
-*Note: not every tag is like this!*
64
+
65
+
Common Tags:
66
+
-`<html></html>` designates document as HTML
67
+
-`<div></div>` notes a block element in the page
68
+
-`<a></a>` anchor, activates a link in the page
69
+
-`<head></head>` contains meta information
70
+
-`<body></body>` contains browser information
71
+
-`<span></span>` notes an inline element
73
72
74
73
Irregular Tags:
75
74
-`<img />` creates an image in the page
@@ -79,18 +78,6 @@ Irregular Tags:
79
78
-`<input />` creates an input field
80
79
81
80
#### HTML Attributes:
82
-
83
-
84
-
85
-
#### HTML Elements:
86
-
An element in HTML represents some kind of structure, generally and element
87
-
consists of a start tag, perhaps some attributes, some content, and an end tag.
88
-
89
-
```html
90
-
<p>This is an element, it consists of p tags and content.</p>
91
-
```
92
-
93
-
#### HTML attributes:
94
81
HTML attributes inform the browser on what to do with a tagged piece of content.
95
82
Attributes generally appear as name-value pairs.
96
83
```
@@ -102,19 +89,49 @@ The most common attributes are:
102
89
- href=”” - hyperlink reference to an internal or external link
103
90
- src=”” - source file to an image, video, etc.
104
91
- style=”” - add some color, font, margins, etc.
105
-
^ There’s a MUCH better way to do this via CSS - more on that later!
92
+
- ^ *There’s a MUCH better way to do this via CSS - more on that later!*
106
93
107
94
How do we check elements for whether they're talking to the browser? Use the **inspect element** feature!
108
95
96
+
But... how do we make HTML... better?
97
+
109
98
## Overview of CSS
110
-
- Specificity
111
-
- id's vs Classes
112
-
- syntax
113
99
114
-
####Specificity
115
100
What Does CSS Stand for?
101
+
- Cascading - prioritizing certain values over others
102
+
- Style - focusing on layout, colors, fonts, etc.
103
+
- Sheet - another name for the file we use here
104
+
105
+
The internet used to be ugly. Enter CSS - a consolidated way to make it prettier.
106
+
107
+
Three primary objects:
108
+
- Elements: e.g. h1, div, body, a - default HTML (already reviewed)
109
+
- IDs: everything that starts with a “#”
110
+
- Classes: everything that starts with a “.”
111
+
112
+
Syntax of CSS:
113
+
```
114
+
h1 { // this is either an element, class, or ID
115
+
font-size: 24px; // syntax is name: value;
116
+
font-weight: bold;
117
+
color: #000000; // hexadecimal, RGB, etc.
118
+
}
119
+
```
120
+
Space doesn’t matter, but “onion” rules apply
121
+
122
+
#### What are IDs?
123
+
IDs are attributes that are used only on one element ONLY and noted with a “#” symbol in CSS
124
+
e.g.
125
+
```
126
+
HTML: <a id=”leesName”>Lee Ngo</a>
127
+
CSS: #leesName { color: white; }
128
+
```
129
+
IDs are used to direct functions to unique elements in the HTML so that there’s no confusion
130
+
131
+
ex: clicking to a specific part of page
132
+
116
133
117
-
####id's vs Classes
134
+
####Ids vs Classes
118
135
Classes are used when you need to style multiple elements in a document, while
119
136
id's are used to style specific elements on a page.
0 commit comments