HTML Flashcards
Where do you put non-visible content about the HTML document?
Where do you put visible content about the HTML document?
Inside the body
Where do the head and body and tags go in a valid HTML document?
The head is above the body and contains information about the page, instead of info within the main part of browser window
the body is the visible part under the head, and will show in browser window
What is the purpose of a DOCTYPE declaration?
DOCTYPE declaration to tell a browser which version of HTML the page is using (although browsers usually display the page even if it is not included).
Give five examples of HTML element types.
p, h1, h2, footer, header
What is the purpose of HTML attributes?
name and value
attribute signifies extra info
value is in double quotes
Give an example of an HTML entity (escape character).
Ampersand
How do block-level elements affect the document flow?
Always start on a new line, impact document flow
Eg:
h1 p ul li
div is block level
<address>
Contact information.
Article content.
</address>
A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.
How do inline elements affect the document flow?
Always appear to continue on same line
a b em img
span Inline
elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.
s tag means strike through - represents something that is no longer relevant
del is better for delete or insert here tag, semantic meaning behind the tag
there is also <cite>
constinue on same line as nearby elements</cite>
What are the default width and height of a block-level element?
A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.
DEFAULT: HEIGHT OF CONTENT
WIDTH: changes how it will actually look on the page
What are the default width and height of an inline element?
Inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.
Note: An inline element does not start on a new line and only takes up as much width as necessary.
pseudo display: inline-block -> the only way you can change the height and width of an inline element
What is the difference between an ordered list and an unordered list in HTML?
Ordered list - numbered
Unordered list - bullet point
list style type: none - to get rid of the bullets or numbers
there are also nested lists
always nest new UL’s within the Li, not as a direct child. Ul / Ol should only have direct li children
Is an HTML list a block element or an inline element?
Block element, they are also by default indented - you can change that with list style property
What HTML tag is used to link to another website?
An anchor tag
href attribute gives you the referance
What is an absolute URL?
Value of href attribute will be full web address when linking to other website
Absolute URL is a direct path to a website, starts with HTTPs
Domain and root are direct
What is a relative URL?
When linking to other pages in same in the same site, you don’t need to specify the domain
How do you indicate the relative link to a parent directory?
../filename
How do you indicate the relative link to a child directory?
example/index.html
How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
“index.html”
How do you indicate the relative link to the same directory?
index.html
What is the purpose of an HTML form element?
send user data to a server and keep info then send something back
to collect info from visitors
info is sent in name value pairs
Give five examples of form control elements.
checkbox, radio, text area, password input, drop-down menu, label, button
buttons default inside a form is “submit” if you don’t want it to be submit, you can change it to button
type=text
name value pairs
type submit
type=password
type=email
value=save
action
Give three examples of type attribute values for HTML elements.
type=text
name value pairs
type submit
type=password
type=email
Is an HTML input element a block element or an inline element?
inline
form action
form method
actio is the url where the web address will end up
method is like get, post
NAME VALUE PAIRS IN FORMS - why important?
name=Jessica
email=lihfurfn
this is what shows up in query strings
What are the six primary HTML elements for creating tables?
table, tr td th thead tbody
What purpose do the thead and tbody elements serve?
thead makes sure to keep that specific heading on the top of a page in a browser
helps screen readers
In this relatively simple example, we create a table listing information about a group of students with a and a , with a number of rows in the body.
The HTML element defines a set of rows defining the head of the columns of the table.
Give two examples of data that would lend itself well to being displayed in a table.
financial reports, TV
schedules, and sports results.
rowspan and colspan
What is the default flex-direction of a flex container?
What is the default flex-wrap of a flex container?
nowrap
mutable list
Value can be changed
lists alwats start with a square bracket
add remove change and search items in list
sorted()
automatically sorts in an alphabetical order as a new list
tuples are immutable
use parenthesis, you cannot edit or append within the list, they are memory efficient. If you assign a tuple, the computer only assigns one memory type since it cannot be changed.
for loop for ln lists and tuples
buffet = (‘Chicken’, ‘Beef’, ‘Shrimp’, ‘Fries’, ‘Salad’)
for i in buffet:
print(i)
How to change a tuple
newBuffet = list(buffet)
print(newBuffet)
newBuffet[3] = “spagghetti”
newBuffet[0] = “sandwhich”
buffet = tuple(newBuffet)
buffet
Tuples are immutable
use parenthesis, you cannot edit or append within the list, they are memory efficient. If you assign a tuple, the computer only assigns one memory type since it cannot be changed.
Tuples are immutable
use parenthesis, you cannot edit or append within the list, they are memory efficient. If you assign a tuple, the computer only assigns one memory type since it cannot be changed.
LAMBDA functiins is anonymous
You can use lambda functions in soituations wjere we would need a function that is going to be used only once
Stats
concerned with collection, organization. analuysis, interpretation and presentation of data - a science of collecting and analyzing data taken from a sample population
N = total population, n = sample population
Data Scientists refer to a sample as one single data point
Features for independent or predictor are different, target variables>
Data is a usually a number, for a unit of observation and has context
Data types?
qunatitative, qulatitative, Date and Type
Quantitative
continuous (like filling gas, can have a decimal) or discreet(whole number - how many are in the class)
Qualitative
Ordinal - there is a ranking 1, 2 ,3 ,4 5 a is better than c like grading system - Nominal -colors are equal, ethinicities etc. Nominal data, no hierarchy
Fundamental Ideas
Estimates of Location - Variance - jow off on the mean
UNcertainty
probability - what are the chances
Centra; tendencey measures, which caoture the center around which the data is distributed
Mean Median(such that one half of data lies above the blow: 50th percetiles) and mode(used for qualitative data how often people use the most
=Variation
or variabl=ility measurss, whcih descrivbe data spread, i.e. how far from the meean
Mean
arithmetic mean, weighted mean, geometric mean
Mean – average
all the numbers, add togetherm, divide the number by all
weighted mean
take the weight, multiple by that number, then divide - HW 15%, quiz 15%, mid-term. final etc. – take the weight multiply by all values dive by total weight
Geometric mean
Multiply all numbers, take the nth root. if you have 5 numbers take the 5th root
Median
find the center point, number of 50%, if there is an odd number, its two center indexes like 1, 2, 4, 5, 5, 7, 8 ,8 take 5 and 5 and divine by two (for even numbers )
covariance
take the first value, subtract the mean then multiply two together and when