-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes.txt
More file actions
175 lines (129 loc) · 8.15 KB
/
Notes.txt
File metadata and controls
175 lines (129 loc) · 8.15 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
Meta data - data about data. <meta> tag is used to convey data to browsers that isn't
displayed to users. Can describe pages, provide keywords, and vategorize type of information
in content on page. ex. <meta name=author" content="Lee Child"> tells search engine name
of author. Name states content and content is telling the name of that author.
<head> element is container for metadata pertaining to html doc itself. should be placed
between opening <html> tag and opening <body> tag. Head can contain titles, scripts, attachments
(css, java, etc) character encoding, metadata
<body></body> makes up most of the content. contains
heading elements allow placement of heads of sections. Broken down into series of graduated
sizes <h1> - <h6> 1 being largest 6 being smallest
A footer (<footer>) element typically contains: authorship information, terms and conditions, copyright
information, contact information and links to a company’s social media accounts.
The bottom of most websites is the footer.
<main> element represents most important content of the body. pertains to content that is
directly related to or expands upon the central topic of a document. should only be 1
main element per html page.
attribute is a word or phrase used inside an element's tag that controls its behavior.
for example, <img> allows you to place images inside webpage. the src attribute (written
<img src=""> is used to specify the image.
id is an attribute specific to names. <p id="paragraph">This is some text.</p> allows us
to reference it in our code later.
class is another attribute. one of the most popular. similar to id tag, but a bit different.
used to assign a category to 1 or more elements. can be used when all attributed elements
are related to a certain function or idea on page.
<a> element is code to create link to another page. instructs browser to display content
from another page. Anchor text is the clickable text that is displayed. by default,
unvisited links are blue, visited are purple, and actiive are red.
anchor element needs an antribute called href attribute. short for hypertext reference.
for example <a href="">check out this link</a> would display link with text check out this link
code should be organized by file and folder. code directory should contain code/html, code/style,
code/java, etc.
href attributes come in two types - explicit and implicit. implicit are used to create
link to another webpage that is located in same folder as the page the <a> tag is in.
Explicit links to files not contained in folder, typically external websites/links.
<nav> tag defines set of navigation links. Typically included on nav bars (rectangular strip
that include links to the main pages of a website)
<nav>
<a href=""></a>
<a href=""></a>
<a href=""></a>
</nav>
would make a strip with 3 links.
HTML blockquote element <blockquote> indicates that enclosed text is an extended quotation.
URL for the source of quote can be given with cite attribute (<blockquote cite=""><p></p></blockquote>
<iframe> represents nested browsing context, embedding another html page into current. src
attribute can be used to link to video url. width and height can be used to specify dimensions.
(<iframe width="in pixils" height="" src=""</iframe>
you can add autoplay=1 to make video autoplay, and mute=1 after to let it autoplay muted. loop=1 lets
video loop forever. controls=0 hides the controls in video player.
ajax - asyncronous javascript and xml. Set of tools that can be used to create asyncronous functions
normal webpages require user to issue a 'request' to the server to see a specific page.
Server then gathers necessary files and sends them over as a 'response'
if creator wants to make it so content can change dynamically, or based on user action, they
can utilie ajax. instead of requesting entire webpage be recreated, creator can just make the
new content is all that is requested from server. Way it works is that user creates an
'asyncronous 'request'' for just a specific section of the webpage.
xhr stands for xml http request
xhr is a set of apis that can be used by scripting languages. it is used to transfer xml, etc data to and from
web server using http. xhr works by making a communication path between client side and server side.
<script> is used to define javascript script. object is something w state and behavior. method
is something an object can do. alert is a javascript method that displays an alert box w ok button.
<html><scripts>aler("hello,world");</script></html>
common practice to seperate html and javascript files (save as .html or .js) and link to external
files within the code itself. <script src="hello_world.js></script>
document.getElementById returns an element. <h1 id="header_1>this is my heading</h1> we have
assigned the h1 element the Header_1 ID. document.getElementById("header_1").innerHTML will return the element
and innerHTML will perserve the markup language within the Element. Used to control or get information
from an element within the code. returns null if element not found
In a set of data that is organized into a hierarchical (based on rank) structure, a node is any individual element
in that structure.
read-eval-print-loop REPL. Simple computer programming environment that allows devs to write code
and see a near immediate result
Font element can be used to choose font attributes, such as color, type, and size. To specify
color, for example, you can use <font color="">text</font> "" can contain the COLOR, or its hexadecimal value
<b> makes text bold
<i> italicizes text
<u> underline
<strong> emphasizes text, typially auto bolds
<style> can define style information for an HTML doc.
<style>
p {color:red;} #color can be any rgb code written as rbg(x,y,z)
</style>
</p>
<div> defines a division or section in html doc. often used as a container for other html elements
to style them or make a specific change to the content within that partivular div tag.
<link> can be used to defin a link between a doc and external resource. common to use to link to a
style sheet.
<link rel="stylesheets" type="text/css" href"">
rel is short for relationship. attribute that specifies relationship between two docs. "stylesheet"
is a common value used to follow rel. this imports the specified stylesheet.
type is an attribute that tells browser what kind of resource. for example, if audeo, then type=audio.
when linking css files, text/css is used.
href is simply hypertext reference. specifies links address.
HTML comments begin with <!-- and close with -->
in CSS, to comment, you type /* and close with */
<ol> used for ordered list. each item within this element is contained within the list element <li>
<ul> is used for unordered list. typically bullet pointed as opposed to sequenced (1234etc) for ol.
also each element contained within li.
<span> connects inline (code contained within webpage and not externally linked)
<section> designates sections in a doc such as headers, footers, chapters, or any other section.
<section>
<h1>Cats</h1>
<p><span...></span><br>(break)</p>
</section>
<form> tag is used to create a form thhat allows users to input data. Typical way to write
<form action="" method="post">
<input> specifies a field where user can enter data.
<form action="" method="get">
First name: <input type="text" name="First_Name><br>
Last name: <input type'"text" name=Last_name><br>
Email: <input type="email" name="email"><br>
Password: <input type'"password" name="password"><br>
<input type="submit" value="submit">
</form>
type attribute specifies type of user input (checkbox, password, text, etc.)
name element defines name of the input block.
Value element specifies value of an input. if you use a button, value is text on button.
target attribute target="new" can open page in new tab. _blank can be used isntead of new
<em></em> emphasizes text
<article> tag represents self contained composition in a doc intended to be independantly distrubutable.
<detail> is used for content which is initially hidden but can be displayed if user wishes to see it
<summary> tag is used to define a summary for <details>
<details>
<summary></summary>
<p></p>
</details>
java-----
method - performs function ON the object
document.getElementById returns an element