HTML Flashcards

1
Q

Where do you put non-visible content about the HTML document?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where do you put visible content about the HTML document?

A

Inside the body

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where do the head and body and tags go in a valid HTML document?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the purpose of a DOCTYPE declaration?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Give five examples of HTML element types.

A

p, h1, h2, footer, header

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of HTML attributes?

A

name and value

attribute signifies extra info

value is in double quotes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Give an example of an HTML entity (escape character).

A

Ampersand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do block-level elements affect the document flow?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do inline elements affect the document flow?

A

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>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the default width and height of a block-level element?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the default width and height of an inline element?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between an ordered list and an unordered list in HTML?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is an HTML list a block element or an inline element?

A

Block element, they are also by default indented - you can change that with list style property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What HTML tag is used to link to another website?

A

An anchor tag
href attribute gives you the referance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an absolute URL?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a relative URL?

A

When linking to other pages in same in the same site, you don’t need to specify the domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How do you indicate the relative link to a parent directory?

A

../filename

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How do you indicate the relative link to a child directory?

A

example/index.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How do you indicate the relative link to a grand parent directory?

A

../../

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How do you indicate the relative link to the same directory?

A

“index.html”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How do you indicate the relative link to the same directory?

A

index.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the purpose of an HTML form element?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Give five examples of form control elements.

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Give three examples of type attribute values for HTML elements.

A

type=text
name value pairs
type submit
type=password
type=email

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Is an HTML input element a block element or an inline element?

A

inline

26
Q

form action
form method

A

actio is the url where the web address will end up
method is like get, post

27
Q

NAME VALUE PAIRS IN FORMS - why important?

A

name=Jessica
email=lihfurfn

this is what shows up in query strings

28
Q

What are the six primary HTML elements for creating tables?

A

table, tr td th thead tbody

29
Q

What purpose do the thead and tbody elements serve?

A

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.

30
Q

Give two examples of data that would lend itself well to being displayed in a table.

A

financial reports, TV
schedules, and sports results.

31
Q

rowspan and colspan

A
32
Q

What is the default flex-direction of a flex container?

A
33
Q

What is the default flex-wrap of a flex container?

A

nowrap

34
Q

mutable list

A

Value can be changed

35
Q

lists alwats start with a square bracket

A

add remove change and search items in list

36
Q

sorted()

A

automatically sorts in an alphabetical order as a new list

37
Q

tuples are immutable

A

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.

38
Q

for loop for ln lists and tuples

A

buffet = (‘Chicken’, ‘Beef’, ‘Shrimp’, ‘Fries’, ‘Salad’)
for i in buffet:
print(i)

39
Q

How to change a tuple

A

newBuffet = list(buffet)
print(newBuffet)
newBuffet[3] = “spagghetti”
newBuffet[0] = “sandwhich”
buffet = tuple(newBuffet)
buffet

40
Q

Tuples are immutable

A

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.

41
Q

Tuples are immutable

A

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.

42
Q

LAMBDA functiins is anonymous

A

You can use lambda functions in soituations wjere we would need a function that is going to be used only once

43
Q

Stats

A

concerned with collection, organization. analuysis, interpretation and presentation of data - a science of collecting and analyzing data taken from a sample population

44
Q

N = total population, n = sample population

A
45
Q

Data Scientists refer to a sample as one single data point

A
46
Q

Features for independent or predictor are different, target variables>

A
47
Q

Data is a usually a number, for a unit of observation and has context

A
48
Q

Data types?

A

qunatitative, qulatitative, Date and Type

49
Q

Quantitative

A

continuous (like filling gas, can have a decimal) or discreet(whole number - how many are in the class)

50
Q

Qualitative

A

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

51
Q

Fundamental Ideas

A

Estimates of Location - Variance - jow off on the mean

52
Q

UNcertainty

A

probability - what are the chances

53
Q

Centra; tendencey measures, which caoture the center around which the data is distributed

A

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

54
Q

=Variation

A

or variabl=ility measurss, whcih descrivbe data spread, i.e. how far from the meean

55
Q

Mean

A

arithmetic mean, weighted mean, geometric mean

56
Q

Mean – average

A

all the numbers, add togetherm, divide the number by all

57
Q

weighted mean

A

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

58
Q

Geometric mean

A

Multiply all numbers, take the nth root. if you have 5 numbers take the 5th root

59
Q

Median

A

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 )

60
Q

covariance

A

take the first value, subtract the mean then multiply two together and when