-
Notifications
You must be signed in to change notification settings - Fork 0
/
HTML.txt
121 lines (62 loc) · 3.97 KB
/
HTML.txt
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
WHAT IS HTML:
HTML provides the structure of a website
A front end devolper builds the "gateway to the product" (product being a webpage and the services therein): The Face of the Website, What clients using the website actually interact with.
Checkout Shoptalk Podcast with Chris Coyier
Use no spaces in file names. If spaces must be used, use-dashes, not_underscores.
(e.g. web-project.txt NOT web_project.txt)
WHAT IS THE ROLE OF HTML ("Hypertext Markup Language")?:
index.html is the file that will contain the homepage content
images is the folder that will contain all the images on the site
styles is the folder that will contain all the css styling code. (e.g. the coloration of text, background, etc.)
scripts is the folder that will contain the JavaScript code. Useable buttons, clickable links and
general interactive functionality.
html code provides paths to files in various locations, so that the website knows where to look to find specific files.
WHAT IS THE ROLE OF CSS ("Cascading Stylesheets")?:
CSS is a stylesheet language. It lets you apply styles selectively to files within an HTML document.
An Example of a CSS Rule Set is:
p {
color: red;
}
P is the HTML Selector. Different values select different things.
color is the property
red is the property value
color: red; is the Declaration
SYNTAX
Each Rule Set aside from the selector must be wrapped in curly brackets. {}
A colon : seperates the property from its values
A semicolon ; seperates one declaration from another
e.g. p {
color: red;
width: 500px;
border: 1px solid black;
}
Multiple Selectors can be used at once, seperated by commas.
e.g. p, li, h1 {
color: red;
width: 500px;
border: 1px solid black;
}
Anything in a CSS document between /* and */ is a CSS comment, which the browser ignores when it renders the code. This is a place for you to write helpful notes on what you are doing
WHAT IS THE ROLE OF JAVASCRIPT?:
JavaScript is the programming language that you use to add interactive features to your website. Some examples could be games, things that happen when buttons are pressed or data is entered in forms, dynamic styling effects, animation, and much more.
Putting JavaScript near the bottom of the HTML page is a good idea; because HTML files are loaded in the order they're written. If JavaScript is loaded first it may cause the page to break.
variables are containers that you store values in.
stared by declaring a variable with (var) followed by a name for that variable;
End variable statements with a semicolon;
JavaScript is case sensitive;
String A sequence of text known as a string. To signify that the value is a string, you must enclose it in quote marks. var myVariable = 'Bob';
Number A number. Numbers don't have quotes around them. var myVariable = 10;
Boolean A True/False value. The words true and false are special keywords in JS, and don't need quotes. var myVariable = true;
Array A structure that allows you to store multiple values in one single reference. var myVariable = [1,'Bob','Steve',10];
Refer to each member of the array like this:
myVariable[0], myVariable[1], etc.
Object Basically, anything. Everything in JavaScript is an object, and can be stored in a variable. Keep this in mind as you learn. var myVariable = document.querySelector('h1');
All of the above examples too.
Operators are basical mathematical symbols that produce a result based on two values.
e.g.: + - / = === (this checks to see if the two values are equalivilent
! (Not) !== (Does Not Equal)
Conditionals: if ; else
return: returns a value to be used outside of a function. The value will remain inside of the function if this is not specified.
Functions: Refer to a set of code as a specific variable, which can be called back to at any time.
This saves you from having to rewrite the same line of code in multiple places.
Typically are enclosed in parenthesis ()