Coding 2 Flashcards

1
Q

what is !DOCTYPE html?

A

its the first thing in a html document, it tells the browser that its html 5

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

what is the html tag?

A

it is the root element, meaning all other elements exist within it

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

what is the head tag?

A

child of html tag-

it is where we bundle information about our document, link fonts and titles. Not stuff you generally see on the web page

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

How many different types of elements can be in the head element

A

7

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

what is the meta tag?

A

child of the head tag-

it is a versatile tag. Each instance carries different information about the document such as the character encoding and the pages dimensions

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

what is charset?

A

goes with a meta tag-

tells the browser about the character encoding

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

what is viewport?

A

goes with a meta tag-

tells the browser about the pages dimensions

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

what is the title tag?

A

child of the head tag-

the text that is put here, goes on the browser tab when the web page is opened.

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

is the title tag required for all HTML documents?

A

Yes it is.

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

why is it important for HTML documents to have a title?

A

Webcrawlers look for this element to help them index the web page correctly which helps with SEO

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

What is SEO?

A

Search Engine Optimization

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

What is the link tag?

A

child of the head tag –

used to link the html page to other resources like fonts and stylesheets

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

what is the body tag?

A

child of the html tag-

this where the main displayable content of the webpage is put

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

what is the h1 tag?

A

a first level heading tag. It has default styling which will make it large and bold. There is only one of these on a page.

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

what is h2 -h6?

A

lower level heading tags, these also have default styling properties. More than one of these can be used per page

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

Should we skip lower level heading tags ? h2-h6?

A

no we should not skip them, just go in order - do not choose the head line tag based on shape or size. These will be adjusted in CSS

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

what is the importance of header tags?

A

they help web crawlers know what the page is about, so its also important for SEO

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

what is the p tag?

A

child of the body -

used to say that the text put here is a paragraph

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

what is the ul tag?

A

it is the unnumbered list tag, it creates a list of bulleted items

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

what is li tag?

A

it is a child of ul tag-

it is a listed item under a ul

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

what is an A tag?

A

its an anchor tag, which is used to create a clickable link that leads people to other websites or other pages on web page.

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

what is a div tag?

A

it is a basic generic container tag, that is used to group content together.

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

what do we wrap our elements in ?

A

opening and closing tags

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

what is the difference between opening and closing tags?

A

they are identical except for the fact that closing tags have a forward slash infront of the tag name

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

what is the anchor tag plus the href attribute used for?

A

it is used for creating a link that either links to another website or another page on the same website

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

what are shorthand properties?

A

are CSS properties that let you set the values of multiple other CSS properties simultaneously.

For instance, the CSS BACKGROUND property is a shorthand property that’s able to define the values of background-color, background-image, background-repeat, and background-position

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

what happens when you use a shorthand property and dont set a specific value?

A

the value is set to its default value, which means that it overrides previously set values.

FOR EXAMPLE

background-color: red;
background: url(images/bg.gif) no-repeat left top;

will not set the color of the background to red but to background-color’s default, transparent, as the second rule has precedence.

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

What is background-color’s default value?

A

transparent

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

what is the css property ‘border’?

A

its a shorthand property that sets an elements border

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

what values does the shorthand property border set?

A

border-width
border-style
border-border color

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

Can border be used to set the value for border-image?

A

no it cannot, it can only reset its value to the default value….which is none

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

border is best used when?

A

when you want all four borders to be the same.

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

what should you use if you want to make the borders different from each other?

A

you can use the longhand border-width, border-style, and border-color properties, which accept different values for each side

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

what should you use if you want to focus on one border at a time?

A

Alternatively, you can target one border at a time with the physical (e.g., border-top )

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

what is the default value of border?

A

none

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

Measurement values for properties when only one measurement is specified effects what?

A

all four sides

border-width: 2px

all four sides will be 2px

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

Measurement values for properties when two measurements are specified, effects what?

A

When 2 values are specified, the first width applies to the top and bottom, the second to the left and right

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

Measurement values for properties when 3 measurements are specified, effects what?

A

When three values are specified, the first width applies to the top, the second to the left and right, the third to the bottom.

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

Measurement values for properties when 4 measurements are specified, effects what?

A

When four values are specified, the widths apply to the top, right, bottom, and left in that order (clockwise).

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

when using multiple non measurable values on a border property, does the order matter?

A

no it doesn’t.

border: solid black 2px thinck;
OR
border: 2px solid black thick;

and it will render the same

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

what is the padding property?

A

it is a shorthand property that sets the padding area on all four sides of an element.

it increases the space between the content and the border

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

What is an elements padding area?

A

it is the area between its content and its border

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

can a value for the padding property ever be negative?

A

no it is not possible

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

the padding property is shorthand for what?

A

padding-top, padding-right, padding-bottom, and padding-left.

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

what are the possible values for padding tag?

A

either specific length measurements or percentage relative to the width of the containing block.

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

difference between using the padding on an element and using the padding in the body of a document?

A

when using padding on an element, it pushes the border out away from the inner content which can be text or a picture or anything,

when using padding on the body, the border itself is considered the content, so as the padding is increased things are pushed towards the center of the page and away from the edges.

so there are two ways to get something off of the edge of the browser page. Adjusting the padding on the element will move just that element. Adjusting the body will effect everything

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

why is html not considered a full fledged programming language?

A

because it doesn’t allow logical statements

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

what are logical statements?

A

logical statements are when you set up code to behave one way if a statement is true and behave another way if the behavior is not

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

what are tags used for?

A

marking off the beginning and usually the end of an element

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

do all tags have closing tags?

A

no some tags are closing tags so they do not have closing tags

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

what is an html element?

A

a function, a piece of content or a group content represented and sectioned off by tags

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

what are html attributes?

A

attributes are used for setting properties on an html element

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

class and id are attributes that can be used on all html elements except for?

A
  • base
  • meta
  • head
  • param
  • title
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

what element is the href attribute specific to?

A

a

the anchor element

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

what do we mean when we say html is about structuring content?

A

we mean it
1. specifies each and every one of its elements, whether seen by the user or not

  1. specifies the hierarchical relationship between elements in a document
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

elements that have the same hierarchical level are called what?

A

siblings

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

elements that are one step lower than another element are called what?

A

children

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

elements that are one step higher than another element are called what?

A

parents

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

elements that are two or more steps lower than another element are called what?

A

descendants

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

what goes in the header tag?

A

the h1 element - which is the most important header on the page. Its what the page is about.

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

how many h1 should be on a page?

A

only one

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

where does the header tag go?

A

in the body, before the main

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

where does h2 -h6 go?

A

in the main section

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

can we have more than one h2 - h6?

A

yes as many as you want

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

should we skip the order of h2 - h6?

A

no, you shouldn’t jump from h2 - h5

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

should we chose our headline based on the default styling properties of the h’s?

A

no you can adjust all of that in css

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

what is a css reset?

A

frontend developers often use what is called a CSS reset to zero out default styles and ensure a consistent user experience across browsers.

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

two ways to make a comment tag

A
  1. /* */

2. control + /

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

what is commenting out code?

A

intentionally using the comment tag around code to disable it so you can debug it or put it to the side for later

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

what is semantic html and what does it mean?

A

when you’re choosing an HTML element to wrap content, you should choose the one that most clearly aligns with the meaning of your content. For instance, if you’re putting a paragraph of content into the body of your HTML page, use a p element (and not, say, a div

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

what is the max-width/height property?

A

it sets the maximum width/height of a property.

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

what does max width over ride?

A

width

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

what does overflow: scroll do?

A

when the content of an element goes outside of the height and width you can use this to create a scroll bar

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

what overrides max width?

A

min width

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

what does min width/height do?

A

sets the minimum width/height of a property

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

why is a block like element like a gas?

A

because it will take up the size of whatever container/parent element it is put in. it stretches as far as it can up down and left and right

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

how much space does an image take up?

A

it takes up all the space it can, only being constrained by its natural height and width dimensions

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

if an image is larger than the div or parent element it is put in what happens?

A

the image exceeds the div or parent element

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

what happens when you put a image that larger than the browser window?

A

it gets a scroll bar

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

how do we resize an image?

A

in css, you mage the image the selector and change the width and the height

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

how do you set up a hyperlink that will open up the destination in a new tab?

A

(a href=”website.com”target=”_blank”)Name of link(/a)

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

how do you set up a link that opens up the user’s email client to send an email to a specific address?

A

(a href=”mailto:address@email.com”)name of link(/a)

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

how do you set up a link that opens the user’s email client to send an email to a person of the user’s choosing?

A

(a href=”mailto:”)name of link(/a)

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

what additional features can you add to the “mailto” href pattern?

A

you can cc , bcc, add a subject and add text in the body of the email

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

when adding additional features to “mailto” pattern with a destination email, do you put extra features inside the same quotations as the email? or do you create its own set?

A

you include it inside the same quotations

a href=”email.com?subject=check out this email”>email us(/a

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

when you’re adding one additional feature to a mailto pattern, what do you use to set apart the email and the additional feature?

A

you use a question mark ?

a href=”email.com?subject=check out this email”>email us(/a

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

when you’re adding two or more additional features to a mailto pattern, what do you use to set apart the email and the additional features?

A

you use the ? mark for the first one and then &’s for the rest

(a href=”email.com?subject=check out this email&cc=baysauce415@yahoo.com&bcc=halaup16@gmail.com”>email us(/a)

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

when adding additional features to a mailto pattern, does the whole value share one set of quotations?

A

yes, they all share one set of quotations

a href=”email.com?subject=check out this email&cc=baysauce415@yahoo.com&bcc=halaup16@gmail.com”>email us(/a

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

what is a good reason to leave the destination email blank when creating a mailto pattern?

A

for a share button, when you want the user to share something with their friends or associates

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

whens a good time to fill the email destination in a mailto pattern?

A

for contact info or to sign up or subscribe to something

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

is it possible to add additional features to a mailto pattern that has a blank email destination?

A

yes of course, just add the ? directly after the mailto pattern - they share one quotation as well

(a href=”mailto:?subject=hey there”)click here(/a)

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

when creating a href that opening in another window, does the target=”_blank” share the same quotations as the destination web address?

A

no it doesnt, it gets its own set of quotations, its its own attribute

(a href=”website.com”target=”_blank”)two different attributes(/a)

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

what is the alt attribute and name two reasons we use it?

A

it gives text to the image that will display in the even that the image isnt able to display.

also, the text is read aloud by screen readers which is used by visually impaired users

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

do we need to use an alt attribute everytime we use an image?

A

yes every single time

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

what is the video tag?

A

the video tag allows you add videos to your page, much in the same way you use images.

(video src=”www.videoaddress.mp4”)(/video)

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

what are some of the common attributes used with the video tag?

A

autoplay, loop, controls, and muted

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

how do you add attributes to the video tag?

A

add one or more of the attribute names before or after the src with no commas or quotes inside of the opening tag

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

does the video tag need a closing tag?

A

yes it does

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

what is a video extension?

A

it is the part of the url that points to the video source itself

(.mp4, .avi, etc)

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

what do we know about a url for a video that doesnt have a video extension?

A

it means that its pointing to the page and not to the video, so in order to add the video to a webpage youre going to have to do a little more digging

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

what does the attribute target do?

A

target specifies when a link is clicked where it is opened up

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

what is the default value for the target attribute on links?

A

it is “_self”

meaning if you want it to open up in a different window you must set the target attribute and change it manually

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

what does the value “_self” on the target attribute do?

A

it opens up the clicked link in the same window being used by the user

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

what does the value “_blank” on the target attribute do?

A

it opens the clicked link in a brand new tab

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

what element are href and target used on ?

A

(a)

the anchor element

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

when two or more links are placed by each other not under a ul or ol tag which way do they display?

A

side by side, horizontally

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

can h2 be used in a header tag?

A

yeah provided it is subtext of a present h1 in the same header tag or a h1 header tag already present somewhere on the page.

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

what does the strong and the b tag do?

A

its an inline styling element that makes certain part of text bold

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

what does the em and i tag do ?

A

its an inline styling element that makes certain parts of the text italicized

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

what is a footer tag?

A

a footer tag is the section closest to the bottom, this usually has contact info, copyrights and various links at the end of web page.

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

where does the footer go?

A

in the body beneath the main section

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

what is a ruleset?

A

one or more rules or declarations that are targeting a particular element or aspect of a webpage

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

what is a css selector?

A

a selector, is the element or aspect of the webpage that is being targeted by the declaration block

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

what are the two parts of the rule set?

A

selector and declaration box

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

what is the css declaration box?

A

is a set of rules or declarations that are set to the selector

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

what is the css declaration box contained in?

A

curly brackets

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

how is a css declaration or a rule constructed?

A

it is constructed by a property and a value

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

what is a css property?

A

a property represents the thing that is being changed about the selector.

body {
background-color: black}

the body is the selector,
background color is the property, the thing of the selector that is being changed

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

what is a css value?

A

a value specifies the exact change in the property

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

can any css value be used with any css property?

A

no specific values are associated with specific properties

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

what is the css property name followed by?

A

a colon

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

what is the css value followed by?

A

a semi colon

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

what is a css universal selector?

A

it is a selector that applies to everything on the page

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

how do we render a css universal selector?

A

*{

}

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

how do we target a single element type in css?

A

single element name {

}

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

how do we target two different css elements?

A

first element name, second element name {

}

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

how do we target a class in css?

A
.class name {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
128
Q

how do we target an id in css?

A
#id name {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
129
Q

Should we target id’s as selectors in css?

A

Avoid these, its usually better to use a class selector instead

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

How do we target an element with a class in css?

A
element name.class name {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
131
Q

how to target descendents of an element of a particular class?

A
element name.class name  descendent name {
}

example:
ul.grocerylist li {
{

all li’’s that are nested under the element classified as grocery list will be targeted.

no matter how deep the li’s are nested they will be targeted

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

when writing out pixel measurements, can you separate the number from the px marker?

A

No, there can be no space between the two otherwise it wont render properly

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

when targeting two elements in css, does there need to be a space after the comma separating the two elements?

A

there can be no space or just one space, it doesn’t matter as long as the comma is there

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

are css selectors case sensitive?

A

yes they are

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

can you target descendents of a generic element with no class?

A

yes you can

element descendent name {
}

section li {
}

this will target all li’s in any section regardless of the classification of the sections

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

when a browser reads CSS it reads from which way?

A

it reads from right to left - so the more specific selectors are rendered first and more likely to override ones on the same element that are less specific

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

how do you target direct children of an element?

A

parent element > child element {

}

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

can we add multiple combinations of selectors to the same declaration block?

A

yes, just add a comma in between the different selectors in the rule set

footer > p , section li {
border: 16px solid black;
}

this will target the children paragraph of the footer and it will target any li descendant nested anywhere under any section tag

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

when creating rule sets, should we use as many selectors as possible?

A

no we should use the least amount of selectors as possible.

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

why should we try and use the least amount of selectors as possible when creating rule sets?

A

because it allows for more flexibility.

for example : we can create a rule set for p.emphasis which would be valid code and get the job done that we want to achieve. But we could also just make a rule set for .emphasis - this would accomplish the same thing.

And if we wanted to put the styling attributes on another element, all we would have to do is create a div for it and classify it as . emphasis and it will automatically take on the new styling properties. This is preferable than having to make a whole new seperate rule set targeting a new specific element

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

what is a pseudo class?

A

is used to specify a special state of an element

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

what is a pseudo element?

A

is used to stylize a special part of the element

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

what is a margin?

A

a margin is the space from the border going outwards - the higher the margin the more space pushed outwards going away from the edge of the border

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

using padding is mainly used for what?

A

pushing content off the edge of its own border

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

what is margin mainly used for?

A

pushing other content away from itself

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

when we add numeric values to the border property what increases or decreases?

A

the thickness of the border only, it doesn’t push or move anything closer or further from it, padding and margin do that

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

what is text align ?

A

it dictates how the text is formatted in a space

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

what are the some common values to know for text align?

A

left, right, center and justify, justify-all

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

what does justify mean?

A

tells the text to fill the entire width of the document so that each line is flush right to the edge, regardless of whether it affects the spacing between words.

it basically makes it into a box, except for the last sentence

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

what is justify all ?

A

its the same thing as justify except that the last sentence is also justified, meaning that the adjustments in the spacing may be more severe throughout the document.

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

what is border radius?

A

border radius makes the border curve….0 is a straight box, 100 percent is a complete circle, everything else is varying degrees of rounded edges

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

what is text transform?

A

specifies how to capitalize an element’s text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.

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

what are some of the main values that go on the text transform property?

A

capitalize, lowercase, uppercase

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

what is the difference between uppercase and capitalize?

A

capitalize, capitalizes every word

uppercase capitalizes every letter

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

how do we create a pseudo element?

A

selector/selectors :: pseudo element {

}

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

how do we create a pseudo class?

A

selector/selectors: pseudo class {

}

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

what is ::first-letter ?

A

is a pseudo element that allows you to put styles on the first letter of the first sentence of a block level element

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

what should we keep in mind when we use ::first-letter?

A

That punctuation and special characters used before the first letter will also be stylized

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

what is :hover?

A

this pseudo class allows you to stylize what happens when a user interacts with an element with a pointing device, but does not necessarily activate it. It is generally triggered when the user hovers over an element with the cursor (mouse pointer)

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

what is the link to link an external css file?

A

(link rel=”stylesheet” type=”text/css” href=”name of file.css”)

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

where do we put the link to the css style sheet?

A

in the head

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

how do we make a css document?

A

open note pad or text editor, code up css, save as

nameOFdocument.css in all files

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

how do you link a css page to a html page?

A

write out stylesheet link and place the name of the css file as the value for the href attribute

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

how to render the html and css document once linked?

A

place it in a folder together and open up the html file, it should open up in the web browser rendering the css and html

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

what should the first page of your website or the html you want to load be saved as?

A

index.html

the browser looks for this one first.

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

what is inline styling?

A

inline styling is when you style directly into the html code itself

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

why should you avoid inline styling?

A

because you cant use it on other elements, its a one and done - it only affects that specific line of code that you’re coding.

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

what is the separations of concerns?

A

the separation of concerns is the division of using html for coding the structure and using css to code the presentation and not mixing the two

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

what is internal styling?

A

internal styling is using a style tag in the html and then coding inside the style element the same way you would in a css file.

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

why should we avoid using internal styling?

A

because it only styles that particular page, its not as extensive and flexible in usage like we want

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

what is a reason that we would want to use internal styling?

A

to increase page load speed

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

what is the best way to apply css to your html?

A

by using external stylesheets - this way you can multiple pages to your html documents and have full control over every aspect of your page

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

in css, if there are two rule sets targeting a specific selector with conflicting rules how does the browser decide which one to render?

A

it chooses the rule with the higher specificity

HTML
body
div class=box
p

CSS
body.box p {
green}

.box p {
red}

the paragraph will be green because body.box p is more specific than .box p

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

when we have conflicting rules what will we have to do to get our rule rendered?

A

make it more specific, add more div’s if you need to

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

what to look for when you wrote a rule and its not rendering the way you think it should

A
  1. misspellings
  2. spaces or lack there of
  3. execution of open/close brackets
  4. quotations misused
  5. value not set/initial value being none
  6. rule with a higher specificity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
176
Q

what are conditions in reference to css?

A

conditions are the steps that define specificity - the more conditions the higher the specificity.

for example :

body >main div.modal a {
}
this has 5 conditions and has a very high specificity

a{
}
this only has one condition and is of low specificity

the first rule set would override the second rule set

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

the difference between conditions and selectors?

A

conditions are part of a selector, conditions specify a selector.

body, footer {
}

these are two separate selectors with one condition each, both of these have low specificity because neither body nor footer are being specified

body > main div.modal a, footer > div.mlb p {
}
these are two selectors with 4/5 conditions each

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

what is the cascade?

A

a process browsers follow to determine which CSS values get applied for all the properties on a given element

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

what trumps the cascade?

A

specificity

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

if two rules have the same specificity and are targeting the same element which one gets rendered?

A

the one lower on the style sheet/or the one that was applied later

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

What is the first step the browser takes to determine what styles to apply to an element?

A
  1. Finds which rules apply to the element
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
182
Q

What is the second step the browser takes to determine what styles to apply to an element?

A
  1. Takes all the relevant rule sets and sorts them by origin.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
183
Q

What do we mean by “origin of a rule set”?

A

Inline style vs. internal vs. external

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

In sorting the origin of a rule set what overrides others?

A

Inline styling - it overrides external and importance

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

What is the third step the browser takes to determine what styles to apply to an element?

A

It takes all the rule sets that

Have the same origin and importance and sorts them by specificity

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

What is the fourth step the browser takes to determine what styles to apply to an element?

A

If there are rule sets still conflicting that gave the same origin, importance and specificity ——

Then the browser takes the rule that’s declared last (lower on the style sheet)

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

What does the keyword !important ? And what does it do?

A

It allows you to override other rules that might have been declared later in the stylesheet or in a different file.

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

Typically if you have to use the keyword !important it is an indication of what?

A

there is something wrong with your style rules

for instance - you make just need to use a more specific selector

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

what is the basic idea of the box model?

A

that all elements on a webpage are actually <b>rectangular boxes </b> even if they appear in a different shape or aren’t visible

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

what are the 5 aspects of an element that make up its total space?

A
width
height
padding
border
margin
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
191
Q

what is width?

A

width is the length of the content area horizontally

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

what is the content area?

A

The content area, bounded by the content edge, contains the “real” content of the element, such as text, an image, or a video player.

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

what is height?

A

height is the length of the content area vertically

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

what happens to height and width when box-sizing is set to border box?

A

both height and width go from defining the content area to the border area

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

what is the border area?

A

the area bounded by the border and everything in it

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

what is the formula to calculating the total space of an element?

A

width +
2x border +
2x padding +
2x margin =

total space

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

Is it possible for the width and height of an element to be different than the one explicitly set in our code?

A

yes, absolutely. when you set a elements width and height, you are only setting the content area, adding padding and borders will all make it larger than what you have explicitly set

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

how do we get the browser to respect the width and height that we set in our code?

A

add box-sizing: border-box to the element

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

what do we do if we want all the elements in our code to have their width and height explicitly?

A

we use the universal selector
* {
box-sizing:border-box
}

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

according to the box model, every element on the page is what? and has what 3 things?

A

is a rectangular box

and has

  1. a height
  2. a width
  3. content
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
201
Q

where is the content in an elements rectangular box?

A

it is in the middle

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

what is content surrounded by in its rectangular box?

A

by optional elements such as padding, border and margin

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

what is the default width of a block element?

A

it is the length of the page

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

what is the width of an inline element?

A

the length of the content

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

which way do block elements flow?

A

top to bottom they will be on top of one another vertically

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

what is the value name for the default of height and width?

A

auto

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

what is the default height of an inline element?

A

the height of the content

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

inline elements flow which way?

A

from left to right horizontally on the same line

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

most of the time what is done with the height of an element?

A

its left default/undefined

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

can we apply padding to any html element?

A

yes, we can

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

can padding take a negative value?

A

no it cannot

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

when you change the background color of the content area what happens to the padding area?

A

it changes to the same color as the content area

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

Is margin taken into account when calculating the width and the height of an element?

A

No it is not, it is considered external space of an element, so we dont consider it apart of the height or the weight.

we do count it towards the elements total space though

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

is margin every visible?

A

no its always transparent and takes the background image of the parent element

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

do inline boxes (text boxes, links, etc) take up 100 percent of the parent element?

A

no they do not, their height and weight are generally the size of the content

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

what is a replaced inline element?

A

it’s an element whose dimensions are set outside of the document and is linked to the page externally.

think images, videos etc.

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

what is a non replaced inline element?

A

it is an inline element thats content is not external but entered into the document itself

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

what tag do we use for a short quote into our html document?

A

the inline q tag

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

what tag do we use for a longer quote?

A

the block element, blockquote

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

what is the a css reset?

A

since different browsers have different default settings developers use CSS resets or CSS normalization to ensure a consistent experience across browsers

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

what is the background-image property and how do we apply it?

A

it adds background images to a div

background-image: url( image source address);

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

how do we adjust the size of a background image inside of a div?

A

we use background-size: and set the numerical value for the size with the width going first and the height following or using percentages or keywords.

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

how do we make a background image repeat inside of a div?

A

we use background-repeat: repeat

or we can use :none; to stop it from repeating

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

what does linear-gradient do?

A

it sets up a transition that allows the background of an element to go from one color to the next

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

what is the syntax for a simple linear gradient transition?

A

background: linear-gradient( color , color);

this will set a transistion from one color to the next, this is no adjustment to direction, or transparency or where colors change or more than one color, or background image. Its the most basic linear gradient application

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

what does an element need to have specified in it for a linear gradient to work?

A

a height

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

what is radial-gradient?

A

it does the same thing as linear gradient, except its not on a linear line… it starts from the center and radiates outward a cyclicar fashion

228
Q

what does the gradient property work with?

A

the background property and the background image property, not the background-color property

gradient properties are considered an image

229
Q

the background property is shorthand for what?

A

background property and background image

230
Q

how many colors can you have inside of the parenthesis for a linear gradient property?

A

unlimited, just make sure to add a comma in between the colors

231
Q

can there be a space in between linear gradient and the ( )?

A

no there cant be

232
Q

what is the default direction of linear gradient?

A

it is top to bottom

233
Q

what is the default starting and finishing points for linear gradient with two colors?

A

1 color = 0% (is when its pure)
2 color = 100% ( is when its pure)

so for example :
linear gradient(red, yellow);

means that at
0% of the page (the very top) will be where it is pure red
and
100% of the page ( the very bottom) is where it will be pure yellow

234
Q

in linear gradient when does the transition of color start happening?

A

immediately, its starts to shift to the next color right away…

so a color thats pure at 0% will start to mix and transition with the next color at 1% and will continue that way until it becomes the next color and the process will repeat it self until the end of the document

235
Q

how do we specify that we want a color to remain pure until a certain part of the document before it starts changing?

A

you add a percentage after the color

so if you had linear-gradient:(green, yellow)
we know that the green is pure at 0%, but what if we wanted it to be pure for half the page until it started transition…. then you would put ….

linear-gradient:(green 50%, yellow)

this would make the green half the page and transition to yellow in the last half

236
Q

when dealing with linear gradient percentages labeling where they start and stop, do we need to put 0% and 100%?

A

no the 0 and the 100% are already implied as the start and end of the gradient line respectively

237
Q

do we have to use percentages when using gradients?

A

No we do not at all - we can use any measurement we want…px’s for example

238
Q

what if we wanted to colors to sharply divide between themselves? what if we didnt want a transition at all?

A

then you make them share the same stopping point…

for example
linear-gradient:(red 50%, yellow 50%) this will make a hard stop in the middle of the page and it will look half red and half yellow

same thing with any percentage or value, it doesnt have to be 50 percent

239
Q

how can we change direction of which way a linear gradient transitions?

A

you can add a direction inside the parenthesis, with a comma, before the colors

linear-gradient:(to top right, green, yellow);

240
Q

which directions can we apply to a linear gradient property?

A

to right, to left, to top, to top right, to top left, to bottom right, to bottom left

to bottom (default)

and you can add degrees if you wanted to get more specific

241
Q

what is the measurement in degrees for the default direction (to bottom) for the linear-gradient property?

A

180 degrees

bottom to top would be 0 degrees
left to right would be 90 degrees

242
Q

besides colors what can gradient property also support as if it was a color?

A

it can support transparent, which is used just like the a color, it can be used in transition, it can be made half the page.

consider it another color to use, whatever you put behind it will show

243
Q

do we need to add a second color to the linear gradient property if transparent is present inside the parentheses?

A

no, transparent works just like another color

244
Q

Can we use transparency to stack background images?

A

yes we can, we can make one part of the image transparent and then add a background image url after the closed parenthesis of the colors section and a comma

linear-gradient:(green, transparent 50%), url (image);

245
Q

how to use rgba syntax

A
  1. place color make sure it works
  2. delete color
  3. type rgba
  4. create parenthasis
  5. add 4 zeros with commas inside parenthasis except for last
  6. adjust r,g,b, and a
246
Q

what does rgba stand for?

A

red, green, blue and alpha - the zeros correlate to these colors and opacities

alpha - basically means transparency

247
Q

in the rgba setting for transparency (alpha) which is no transparency which is full transparency?

A

0 is full transparency, 1 is no transparency
and everything in between are levels so o

0.5 is half transparency

248
Q

when you use rgba’s instead of colors does every set of zeros get its own set of parentheses?

A

yes they do, separated by commas

0,0,0,) , (0,0,0,0

249
Q

when applying start and stop measurements to rgba’s do we need to add a comma between the parentheses and the number value?

A

no, the comma will go after the number value unless it is the end of the value otherwise put a semi colon

(0,0,0,0) 45% , (0,0,0,0) 30% ;

250
Q

when adding degrees or directional values to rgba’s do we still need to use a comma before the first set of parentheses?

A

yes when you add degrees or a direction use a comma as you would with a color

(45deg, (0,0,0,0) , (0,0,0,0);

251
Q

what you should keep in mind when trying to make stripes using linear gradient

A

colors appear in what order you place in the code, so in order to have clear defining stripes you cant just go orange black orange black because that will create a transition on one end or the other…. thats ok if that is the desired effect, but for clear cut stripes you have to
go

black orange orange black black orange orange black black etc

252
Q

what is repeating linear gradient?

A

repeating linear gradient is the easiest way to make stripes and other patterns without having to repeat over and over again the specific start and stop points

253
Q

can you place both start and stop points for a color at the same time?

A

yes just add the start and stop percents before the comma as you would the start point

brown blue 25% 50 % red 50% 90% green

blue will start a quarter in and end half way throught the page and then red will take over until it reaches 90 percent and then green will take over

blue and green dont need values because 0 and 100 are always implied

254
Q

what degrees do we need to make it if we wanted to flip the order of 45 degrees when doing a linear gradient?

A

make it 225 degrees

255
Q

when adding multiple selectors in css what does no spaces between conditions mean as opposed to a comma?

A

think about it like this:

no space = and
comma = or

.foo.bar = means all elements with .foo AND .bar will get targeted

.foo, .bar= means all elements with EITHER .foo OR .bar will get targeted

256
Q

what do the pseudo elements ::after and ::before do?

A

they allow you to add content before or after your element

257
Q

when using ::after or ::before what else do you need to render content?

A

you need to use the content property

content : “what you want added here”

258
Q

how do you create smart quotes?

A

Use ALT+0145 and ALT+0146 for the left and right single quotation mark or apostrophe, respectively.

Use ALT+0147 and ALT+0148 for the left and right double quotation marks, respectively.

259
Q

how to get rid of the bullet points or numbers in a ul or an ol?

A

list-type: none

260
Q

what are 5 of the most common pseudo elements for styling anchors (a) tag?

A

link, visited, hover, focus and active

261
Q

what does visited pseudo element do?

A

it allows you to style how a link look once its been clicked and the website to the link has been visited

262
Q

what does the link pseudo element do?

A

it allows you to style how a link look before its been clicked

263
Q

what does the pseudo element hover do?

A

it allows you to style how an element looks when you hover the cursor or the mouse over it but not activate it

264
Q

what does the pseudo element focus do?

A

it allows you to style how a link or button looks when you keyboard focus on it

265
Q

what is keyboard focus?

A

keyboard focus is when users of only a keyboard click on tab and shift + tab to cycle through clickable options on a page along with the directional buttons….when this is activated the clickable items on a page will highlight

266
Q

what does the pseudo element active do?

A

active is while you’re clicking on a link, not before and not after the moment during. Active allows you to style this aspect of it

267
Q

what are radio buttons ?

A

they are small buttons that allow you to select one option at a time…great for multiple choice questions

268
Q

what are attribute selectors?

A

using css to target specific attributes and values, regardless of what element they are on

269
Q

how to target an element by its attribute?

A

element[attribute]{

}

270
Q

what happens when you add a title attribute to an element?

A

when you hover over it - what ever value you add to the title attribute will come up

271
Q

what does the button tag do ?

A

the button tag creates a button

272
Q

what are the three main values for the button tag?

A
submit = that enters information 
reset =  resets all controls to their initial values
button = doesn't do anything, just acts a place holder
273
Q

what is the main attribute to be used with button tag?

A

type

html example

button type= submit

274
Q

how to target a attribute and value?

A

[attribute=”value”][
}

example
button[type=submit]{
color: red}

275
Q

how to target an element by one keyword anywhere in the value?

A

[value ~=”keyword”]{
}

this word has to be surrounded by blanks in order to be recognized because spaces count as characters

276
Q

when targeting attributes and values is adding the element necessary?

A

its not necessary for it to work, but it may become necessary once you start working on bigger projects with lots of code

277
Q

how to target attributes that have a specific keyword in the beginning of it ?

A

[attribute^=”keyword”]{

}

278
Q

when is a time you might want to target particular values that all start with the same keywords?

A

when youre targeting a href links, for example if you want to target all the ones that start with http as opposed to something found locally on a computer

279
Q

how to target an attributes that have specific keywords in the end of their value?

A

[attribute$=”keyword”]{

}

280
Q

when is a time you want to target particular values that all end with the same keyword?

A

if you wanted to target all links that ended with .com as opposed to .gov

281
Q

how to target an attribute that has a specific collection of characters anywhere in its value?

A

[attribute*=”characters”]{
}

usually words not surronded by spaces

this doesnt have to be full words, if you put econ in there it wont just look for econ, it will look for it in between other words as well

so the word second for example would count because it has the combination of characters of “econ” in it

282
Q

when targeting attributes that have a specific collection of characters anywhere in its value, do spaces count as characters?

A

yes they do, the value of “ird h”

would work for “third helping”

but not “thirdhelping”

the spaces count as characters

283
Q

how do you rotate an image?

A

transform: rotate(deg)

284
Q

what is the lang attribute?

A

it goes on the html attribute and sets the language for the web page _ this allows screen readers read it in the appropriate language

285
Q

what is the display property?

A

the display property determines how the elements box is rendered in the browser

286
Q

what is an inline element?

A

it is an element that does not start on a new line and its height and width are that of its content. In line elements go left to right

287
Q

what is a block element?

A

it starts on a new line, and its height and width can be expressily set

288
Q

why should we set max width property for paragraph elements?

A

because people dont like to read really wide paragraphs so using max width is a common practice

289
Q

block elements width is set to what default?

A

it will take up the entire width of the parent element it is under.

290
Q

If inline elements go left to right, and block elements go on top of one another, how do we get block elements to go left/right or side by side?

A

by turning them into inline block elements

291
Q

how do we make a block element an inline block element?

A

by adding the property and value of

display: inline-block;

292
Q

how do you remove the white space that occurs between a set of inline block elements?

A

setting font-size to 0 on the parent of a set of inline block elements removes white space between them.

293
Q

what happens when you put two inline elements one after the other on different lines?

A

the browser renders the line break as just a space and puts the two inline elements on the same line

294
Q

can you set inline elements to behave like block elements and vice versa?

A

yes you can. this is a good strategy when you want to use a particular element because it is semantically correct, but its default display is not what your designs call for.

295
Q

what is a common place you will see a block element changed into a inline element

A

links that appear in a nav bar. By default, both unordered lists and list items are block-level elements, but by setting their display property to inline-block, you can get them to display side- by-side in the nav.

296
Q

how do we center horizontally a block element?

A

by adding
margin-left: auto
margin -right: auto

297
Q

when you use margin-left: auto and margin-right: auto the block level element gets put in the center of what?

A

the parent element

298
Q

how do we horizontally center a inline element inside of a block element?

A

text-align: center;

299
Q

can we use text-align to move non text inline elements?

A

absolutely, for example you can use it for images

300
Q

when creating like features on a page that are similar but will be different, what can you do besides adding extra classes?

A

add names to the class name

instead of 
div class = design 
          div = top row 
                   div= box 1 
                    div = box 2

you can eliminate the top row div by simply going

div class=design
div = top box 1
div = top box 2

301
Q

what are forms?

A

forms are containers that hold a set of inputs

302
Q

what are inputs?

A

are individual components that a user interacts with - typically corresponding to a single data point. HTML provides numerous input types (text, email, number, password, etc.)

303
Q

what is the form tag?

A

the form tag wraps all of the labels and inputs.

think of it as the html element of the form, everything has to go inside of it

304
Q

what do you want to make sure that you set on a form tag?

A

the method and action attributes

305
Q

why must we ensure that we set the method and the action attributes in a form tag?

A

This will ensure user input can be submitted even if JavaScript is disabled or breaks.

306
Q

what is the action attribute in a form tag do?

A

The action attribute is the URL of the server endpoint that submitted form data should be sent to

307
Q

what is the method attribute in a form tag do?

A

The method attribute is the request method that the browser should use when sending the data to the server.

308
Q

what are the two methods you can use in a form tag?

A

method=”post”
and
methos=”get”

309
Q

what is the method we are mostly going to use at this point in time in a form tag?

A

we will use the post method

310
Q

what is the fieldset tag?

A

The fieldset element is used to group together related inputs and labels such as contact info, employment history etc

311
Q

what to remember about fieldsets?

A

they have default styling that you might have to override

312
Q

what is the point of the fieldset tag and its default styling?

A

they help web crawlers and screen readers understand how inputs are grouped together (even if this is not revealed visually to sighted users).

313
Q

what is the legend element?

A

he legend element is like a title for the fieldset. For screen readers, it adds extra context to the inputs in the fieldset. For instance, when a screen reader user arrives at the “First name” input, they will hear something like, “First name, edit text, Contact info”.

314
Q

when we have single input for a single topic do we need to use fieldset tag?

A

no, the point of fieldsets are to group sets of input together so they dont serve much benefit if there is only one possible input

315
Q

what is an example of a top with only one input?

A

if you have a single question with multiple choice answer. there single answer will only be one input, so if this is all you have then there would be no point in making a seperate fieldset tag

316
Q

if we have one input for one topic, what should we use instead of a fieldset?

A

just use a label, one label for one topic is enough

317
Q

what are type=text inputs?

A

they are inputs that accept text

318
Q

what does a label tag do?

A

a label tells humans and webcrawlers and screen readers what an input is for

(label for=”first-name”)First name (/label)

319
Q

what attribute do you need to use with the label tag ?

A

for=

320
Q

what should you set for the value of the “for” attribute on the label tag?

A

it should be the ID of the value that the input is for

label for=”first-name”)First name (/label
(input id=”first-name”)

321
Q

do label tags need a closing tag?

A

yes they do

322
Q

do input tags need a closing tag?

A

no they dont

323
Q

why should you set the value of the “for” attribute to the ID of the input element?

A

because label association wont work without it

324
Q

what does label association do ?

A

This association is what makes inputs take focus when you click on their labels, as we mentioned above.

325
Q

can you wrap the input element in the label element?

A

yes you can,

label)First name
(input id=”first-name” type=”text”
(/label)

326
Q

what must you do if you want to wrap the input tag inside the label tag?

A

omit the for attritbute

label)First name
(input id=”first-name” type=”text”
(/label)

327
Q

how does wrapping an input element in a label element affect a right margin?

A

if you set a right margin on a label wrapping an input, that margin right will appear to come after the input, not the label.

328
Q

what is a placeholder attribute on an input element?

A

placeholder is used to set text that initially displays before the user has input any data. Typically, placeholders are used for example entries, and usually, they’re styled to be lighter than user input text

329
Q

can we placeholders in place of labels?

A

Because they are meant to offer examples of desired input, they should not be used in place of labels.

330
Q

what is a required attribute on a input element?

A

indicate that an input must be filled out

331
Q

what is the pattern attribute on an input element?

A

is used to supply regular expression patterns that the user’s input must match in order to be valid.

For example, we can use this to require that the phone number entry consists of only numbers, and optionally dashes.

332
Q

what is the type attribute do on an input element

A

his attribute determines how the element looks and how its validation works. For instance, an input with type=’email’ will be valid if the user inputs text that has an @ with text before and after.

333
Q

what are some ways that input types affect accessibility?

A

Input types also provide some accessibility by dictating the kind of keyboard a smartphone will display for a user: number inputs will show only the number pad; email inputs will show a keyboard with the @ symbol in a prominent place.

334
Q

how do we get a “pick one and only one” behavior from inputs of a radio type?

A

you use the same “name” attribute with the same value on all the options

335
Q

what is the select element?

A

the select element is used much like the ul/ol element - it provides a list of options to choose from

336
Q

what is the option element?

A

are individual options - they work much in the same way li’s do - they are wrapped in a select element

337
Q

how do we preselect an option in a form?

A

add the attribute selected in the opening tag of the option element

338
Q

what is the optgroup element?

A

it is a way to group large amounts of options under a given name, this is used to large lists of options

339
Q

what should you always remember about designing forms?

A

keep them short and simple and to the point, the longer and more convoluted they are - the less likely someone will finish them. which is the point of a form in the first place.

340
Q

how do you disable the default stylings set for the fieldset element?

A
fieldset {
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  border: none;
341
Q

what is the position property mainly about?

A

its mainly about the flow of the element in a html document

342
Q

what are the 4 most common values for position property?

A

static, fixed, relative and absolute

343
Q

what is the default setting for the position property?

A

static

344
Q

what is static value mean?

A

means the element will have normal flow

345
Q

what is normal flow?

A

block-level elements get rendered in the same order that they appear in the HTML markup, one on top of another, starting from the top left corner of the document, and inline elements stretch as wide as their inside content (usually text).

346
Q

what is the fixed value mean?

A

When an element’s position is set to fixed, it will stay in place even when the user scrolls. Fixed elements are taken out of the normal flow, and other elements will position themselves as if the fixed element does not exist

347
Q

an example of a good time to use a fixed value

A

For navbars or footers that you want to remain stuck to the top or bottom of the screen, this is often the best approach.

348
Q

what is the viewport?

A

the area of a browser’s window in which web content can be seen

349
Q

what are the four offset properties?

A

top, bottom, left, right

350
Q

what elements can the offset properties be set to?

A

to elements that have been set to fixed, absolute or relative

351
Q

what elements can offsets not be set to?

A

elements set to static, or elements not defined (which are static because static is the default)

352
Q

how do you set which direction you want your element to go using offsets?

A

you want to put the numerical value according to where you want the element to move away from - not in the direction in which you want it to go.

if you want to make something 20px’s from the top you but top:20px

353
Q

what is the relative value?

A

the relative value is also in normal flow but you can set the offsets such as left right top and bottom

354
Q

When an element is set to relative does it affect the positioning of any other elements?

A

no it doesn’t, all the other elements act as if the element is not offset

355
Q

what is the absolute value?

A

absolute elements are outside the normal flow and can be offset, but unlike fixed elements, they are offset in relation to the first parent container with a non-static position.

356
Q

what is a common use of the absolute value?

A

A common use case for absolute positioning is when you have a navbar where you want to align a logo to the left and a set of links to the right,

357
Q

what should we keep in mind about elements with an absolute positioning ?

A

it will be a child of another element so it will start inside of another element and will be moved and location in relation to that parent element

358
Q

what is the primary use for the float property?

A

to wrap text around an image or any other container

359
Q

what happens when we apply float to an image?

A

it takes it out of normal flow and pushes it to whatever direction you set the value to

float: right will push the images to the right and the text will wrap around it to the left

360
Q

what happens when you have more than one floated element next to each other?

A

they stack horizontally provided there is space left in the parent element?

361
Q

what happens if you have multiple floated elements next to each other but there is no more room in the parent element for them to stack horizontally?

A

they will go on to the next line

362
Q

what is the clear property?

A

the clear property allows an element that does not recognize that is next to a floated element that it is next to one and moves it to the next available line

363
Q

when do we need to use the clear property?

A

since float takes elements out of normal flow, elements around it will behave as if they are not there, so sometimes other elements will be on teh same line as floated elements, adding clear to the elements on the same line as the floated elements will move them off the same line

364
Q

when you create a nav element, what is the first thing you should put in there before anything else?

A

links or a div containing links - anything else creates a white space between the nav bar and top of the page

365
Q

how do you get rid of underlines on a link?

A

add the property and value

text-decoration:none;

366
Q

when taking the underline off of links can you take them off in a group?

A

no you have to apply the text -decoration: none; separately

367
Q

how can you adjust the spacing between letters in a word?

A

with the letter-spacing property

368
Q

can negative properties be used with the letter spacing property ?

A

yes you can, this makes the space smaller?

369
Q

what to do when border radius makes your edges look boxy?

A

instead of using percentages use pixels instead

370
Q

how to specify a particular class of links to change the font?

A

put the element name before a:link

parent a:link

371
Q

what is a responsive layout?

A

it is a layout that responds or adjusts to the size of the screen

372
Q

how do we use flexbox?

A

define a flex container by using with the css property display: flex

373
Q

what can be made into a flex container?

A

any element on a html page including the body

374
Q

what are flex items?

A

all direct children of a flex container

375
Q

what items will be arranged by flexbox?

A

flex items

376
Q

what are the two ways in which a flex box is managed?

A

by specifying the behavior of the flex box or specifying the behavior of the flex items

377
Q

what 3 main properties control a flex container?

A

flex direction:
justify content:
align items:

378
Q

what is flex direction?

A

describes the main axis of the container.

379
Q

what is the main axis?

A

the line that goes through a document in which content is laid out…..if the main axis is set horizontally, the content will go left to right or right to left… if the main axis is set vertically, the content will go top to bottom or bottom to top

380
Q

regardless of flex direction what does every flex container have?

A

a start and an end

381
Q

by default how are items added to the flex container?

A

from the start of the container towards the end

382
Q

what 4 values does flex-direction take?

A

Row
row-reverse
column
column-reverse

383
Q

what is the row value do?

A

items are laid out from left to right

384
Q

what is the default for flex direction?

A

row

385
Q

what does the value row-reverse do?

A

items are laid out from right to left

386
Q

what does the value column do?

A

items are laid out from top to bottom

387
Q

what does the value column-reverse do?

A

items are laid up from bottom to top

388
Q

what is justify-content?

A

it describes how items are arranged on the main axis

389
Q

what three positional values for the justify content property?

A

center
flex-start
flex-end

390
Q

what do the positional values center, flex-start and flex-end used for?

A

hese specify how elements are packed in the container, from the center, start or end respectively

391
Q

when can you use the additional values space-between,

space-around and space-evenly for justify content?

A

when you have more than one item in the flex container

392
Q

what do space-around, space-between and space-evenly do?

A

Each of these describes how to distribute the extra space not taken up by the items themselves.

393
Q

what is the cross axis?

A

the cross axis is the axis perpendicular to the main axis.

394
Q

what is the align-items property?

A

it is used to adjust how items are laid out along the cross axis

395
Q

what positional values can you set to the align-items property?

A

you can also add

center,
flex-end
flex-start

396
Q

can justify content and align items be used on the same container?

A

yes justify content adjusts location of content on main axis.
align items adjusts location of content on cross axis

397
Q

what is the align-self property?

A

this allows you to adjust an individual item in the flex container - you add it to the item itself in css

398
Q

what values does the align-self property take?

A

same as align items and justify content

center,
flex-end
flex-start

399
Q

when creating a design should you design with mobile devices in mind first or computers?

A

you should design for mobile first and adjust off that

400
Q

what is graceful degradation?

A

process of creating a layout where you start with the most complex layout and as many features as you like, then try to remove features and rearrange elements to fit on a smaller screen. This approach is known as graceful degradation.

401
Q

what is progressive enhancement?

A

design the page to work on the smallest screen first, then progressively add features and rearrange the layout to take advantage of the larger screen sizes

402
Q

what is progressive enhancement also known as?

A

mobile first design

403
Q

how to inspect what a website will look like on a mobile phone but on a computer using dev tools?

A

Choose a page, and open DevTools. Make sure you’re on the “Elements” tab. At the top left, right by the list of tabs, you’ll see an icon to “Toggle device toolbar”. Click it.

404
Q

should you 100 percent use chrome dev tools to see how your web page looks on a device?

A

no because they arent a 100 percent accurate, you should always check on an actual device if you can -but dev tools is good if you dont have an available device

405
Q

what is a media query used for?

A

to create different styles for different screen conditions

406
Q

what does a media query consist of?

A

a media type and any number of media features

407
Q

what is the basic syntax for a media query?

A

@media (media type) () {
(CSS Rules)
}

408
Q

what can be set as media types?

A

all, print, screen, or speech

409
Q

what are some popular media features that a media query can be set to?

A

The list of media features is long but a few examples are:

width
height
orientation
color

410
Q

what is a burger icon?

A

a burger icon is the three thick horizontal lines that signify a drop down menu on mobile apps

411
Q

do we use traditional nav bars on mobile devices?

A

its customary to use a burger icon to create drop down nav apps on mobile devices

412
Q

What is the break point?

A

The break point the point in which we want to modify the layout from the mobile design to the large design

413
Q

How do we find the break point?

A

Start with a smallest screen size and then slowly increase the width until the layout:

  1. Starts to look awkward
  2. Has enough space for a horizontal layout
414
Q

what is flex-grow:?

A

specifies how items grow relative to each other to occupy available space

415
Q

what is flex-basis:?

A

sets the initial size of an item in a flex -container

basically it sets the width of an item in a flex container and is the starting point from which flex grow and flex shrink take place

416
Q

what is flex-shrink?

A

tells how much an item shrinks when put into a smaller viewport

417
Q

what are the values for flex-grow and flex-shrink?

A

1-3

418
Q

what is the value of flex-basis?

A

a distance ie something measured in px’s or something similar

419
Q

what is the shorthand for the flex properties?

A

flex:

420
Q

how can the flex values be consolidated?

A

grow- shrink- basis

flex-grow: 0;
flex-shrink: 0;
flex-basis: 120px;

can become

flex: 0 0 120px;

421
Q

what does space-between do ?

A

this evenly dispurces the space evenly between items - but pushes items along the borders

422
Q

what does space around do?

A

this puts the equal amount of space around an item on both sides, so these items will be pushed off the side of the border of the container

423
Q

does space around look equally spread out?

A

no it will not look equally spread out, items in the middle will look like they have more space because the space that is divided equally is going on the sides of the items ….so two items next to one another both have space assigned to them so it will look like double space in between them where along the edges there will be a single space

424
Q

what does space evenly do?

A

items are distributed so that the spacing between any two items and the space to the edges is equal

425
Q

does a flex container naturally wrap to the next line?

A

no it doesn’t , it is naturally set to no wrap, so everything in a container will go along the main axis forever and ever until there is no content

426
Q

how do we get a flex container to wrap?

A

flex-wrap:

427
Q

what are the values for flex-wrap:?

A

nowrap, wrap, wrap-reverse

428
Q

how to center all items along the cross axis in a flex container?

A

add align-items:center; to the flex container

429
Q

what is javascript?

A

its a piece of software that lives inside your browser that can control its environment and do lots of different things

“the implementation of the ecma script standard”

430
Q

What is the v8 engine?

A

it is the most popular version of Javascript

431
Q

what is the ecma script?

A

is the standard/uniform regulations that make up javascript.

like how all cars have a steering wheel and gas is on the right and brake is on the left ….all of these are standards

432
Q

what are the two things ecma script define?

A

the engine and the language

433
Q

what are variables used for?

A

are used to create and represent data in our applications

434
Q

what do you use when you want to create data?

A

a variable

435
Q

what do you use when you want to make data do something what do you use?

A

functions

436
Q

what are 7 of the basic data types that javascript understand?

A
number
string
boolean
null
undefined
symbol
objects
437
Q

can we create custom types of data?

A

yes of course

438
Q

whats the difference between undefined and not defined?

A

not defined is when the engine cannot find the variable name, undefined is when the engine can find the variable name but cannot fine a value associated with it

439
Q

when a user doesn’t give a variable a value, what is the initial value of all variables in the ecma standard?

A

undefined

440
Q

what is a var keyword?

A

var sets a variable

var x = 3

441
Q

if we intentionally want to not set a value for a variable, should we set it to undefined?

A

No, in general we should set it to null and let the engine tell us when something is undefined, this way we know that we forgot to set a variable and need to go back into our code and set a value for something

442
Q

what are complex data types?

A

functions, arrays and custom data types

443
Q

at the end of the day what category of basic data types do the complex data types fall under?

A

they fall under objects, they are just objects with special features.

like function is an object that does something

444
Q

what does calling a function mean?

A

it means calling it to perform the action that you set it to do

445
Q

what is the syntax of calling a function?

A

identifier( )

example:

kick( )

446
Q

What is the if/else block?

A

If - is used to specify a type of code to be executed if the the condition is true

Else - is used to specify a type of code to executed if the condition is false

447
Q

What is the information between curly brackets known as?

A

A block

448
Q

Are there conditions where you just use the conditional “if”?

A

Yes

449
Q

What is the else if conditional?

A

It’s a way to specify a new condition to test if the first condition is false

450
Q

What is a switch statement?

A

A way to specify many different alternative blocks of code to be executed depending on the condition

One way to keep code clean instead of writing a million different else if conditions

451
Q

What is an operator?

A

Operators are used to assign values, compare values

452
Q

What are the basic categories of operators?

A
Arithmetic 
Assignment 
String
Comparison 
Logical
Ternary
453
Q

What does typeof keyword do?

A

Tells you the day type of a value

454
Q

what is the difference between var and let?

A

let is the newer in date version. Var is the old version, don’t use it anymore

455
Q

what is the difference between let and const?

A

let names a variable that can be changed at any time

const names a variable that will not be changed

456
Q

what is the syntax for creating a const?

A

const identifier = value

const myBirthday = 71086

457
Q

what happens if you try to reassign the value to a previously set const?

A

it will come back as an error

458
Q

what is the assignment operator?

A

it is the equal sign, it assigns a value to an identifier

459
Q

can we assign an identifier name without giving it a value?

A

yes, by using let or var

let myBirthday;

460
Q

can you assign an identifier name without giving it a value using const?

A

no you cant.

461
Q

how do you later assign a value to an identifier without a name?

A

identifier = value

462
Q

what will be assigned as a value to a identifier that hasn’t been defined by the developer?

A

undefined

463
Q

what are reserved words?

A

reserved words are words that are already stored with meaning in a program language that cant be used as a variable name a keyword or a identifier

for example you cant use var var = 3

var is already assigned and understood by the engine

464
Q

exception to the rule when using reserved words in a variable name

A

you can use a reserved word inside of a variable name

for example

you can use var varname = 4

although it would be redundant

465
Q

character restrictions in using variable names

A

every variable has to begin with an upper or lower case letter an _ or a $

466
Q

where in a variable name can you use numbers?

A

in the middle or the end, anywhere but the beginning

467
Q

can spaces live in the variable name?

A

no, no spaces anywhere

468
Q

can comparison or logical operators be used in variable names?

A

no not at all

469
Q

what are stylistic restrictions when making variable names?

A

they are restrictions that if you dont follow will not break your code, but it will cause it to look funny and hard to read for other coders or developers working on your program.

470
Q

what technique should we use when we are creating variable names?

A

camel-casing

471
Q

what is camel casing?

A

camel casing is when you start with a lowercase word and then every word after that has the first letter capitalized

472
Q

when choosing a name for the variables what should we do?

A

when we choose variable names in JavaScript, we should choose names that reflect how the variable gets used in the program. A well-chosen variable name can help other people reading the code to understand how the variable is intended to be used.

473
Q

how can we ensure that we dont use global variables?

A

we can assign strict mode at the top of our java file

this is recommended to be used at the top of all your java files unless you have a reason not to

474
Q

how do we apply strict mode to our java file ?

A

‘use strict’;

475
Q

what is an integer number?

A

a whole number with no decimals

476
Q

what is a float number?

A

a number with a decimal

477
Q

what is null?

A

null is a special value used to indicate that a variable has no value

478
Q

when you use typeof on null what comes back?

A

it comes back as an object, this is a mistake in javascript that hasnt been fixed in the new version

479
Q

what are booleans?

A

they work with conditionals using one type of code if a value is true and another type if it is false

480
Q

what does the ! signify in a boolean?

A

it inverts the true and false value
so !true evaluates to false
and
!false evaluates to true

481
Q

what is coercion?

A

this is when you use an operator to combine two different data types java will force them together in one data type

482
Q

what does the built in alert function do in javascript?

A

it takes the text you put inside the parentheses and puts in a pop up window when activated

alert(‘Hello from JavaScript Land’);

483
Q

what is a parameter?

A

it is the variable that holds the place for an argument

484
Q

what is alerts main responsibility?

A

display a pop up window to the user with a message in it

485
Q

How many arguments does alert take?

A

One. the text you want to appear in the window

486
Q

what does determinate mean?

A

Given the same inputs on separate invocations, the result should be exactly the same. No matter what else is happening in your program

487
Q

when we define a function does it automatically run?

A

defining a function and calling/invoking it are separate things, and when you define a function, the code isn’t automatically run

488
Q

if you create a function to multiply only two numbers and you add more than two numbers when you run the code what will happen?

A

it will run the function as you asked only taking into account the first two numbers you placed, it will act as if the other numbers aren’t there. It wont break the code or show up as an error but it will not compute them either

489
Q

what does parse mean?

A

when a browser reads code

490
Q

what are fat arrows?

A

=> <=

491
Q

how can we use fat arrows to create a function with a function expression?

A
const add = (num1, num2) => num1 + num2;
add(2, 3); 

this would be the same as

const addAlt = function(num1, num2) {
  return num1 + num2;
}
492
Q

if creating a multi line function with fat arrows, what two things do we need to make sure we include?

A

you need to add curly brackets around the action part of the code.

and if the code is meant to return a value, add the keyword return.

const add = (num1, num2) => {
  console.log('Adding', num1, num2);
  return num1 + num2;
};
493
Q

do fat arrows need parameters when used to make functions?

A

no they don’t need parameters simply use empty parens followed by the arrow

const alertMe = () => alert(“You’ve been alerted!”);

494
Q

what are parens?

A

they are short hand for parenthesis

495
Q

When defining a arrow function that has a single parameter do we need parens?

A

When defining an arrow function that takes a single parameter, the parentheses are optional:

const isEven = num => num % 2 === 0;

// same as

const isEvenAlt = (num) => num % 2 === 0;

496
Q

what is concatenation?

A

JavaScript lets us use the + operator to concatenate — which just means “connect” — 2 strings into a bigger one.

497
Q

what is the difference between concatenation and coercion?

A

concatenation is two strings being connected together, coercion is when two different data types are made into one

498
Q

what if you wanted to use double quotes inside a string that is already using double quotes to say it is a string?

A

you add a back slash before the inner quotes

const heSaid = "He said, \"Foo!\"";
console.log(heSaid); // => He said, "Foo!"
499
Q

what does \t do inside of a string?

A

creates a tab sized space in between the two words

500
Q

what does \n do inside of a string?

A

it put what comes after it on a new line

501
Q

what is the maximum character count you should have on one line of code?

A

80 characters

502
Q

if you have a string that is longer than 80 characters what two things can you do?

A
  1. you can add a \ and continue it to get it to go to the next line.
  2. you can close the string and add a + and start another string on the next line
const element = '<p>The quick brown fox jumps over the lazy dog. The \
  quick brown fox jumps over the lazy dog. The quick brown fox jumps over \
  the lazy dog.</p>';

<b> same as: </b>

const element2 = '<p>The quick brown fox jumps over the lazy dog. The quick ' +
  'brown fox jumps over the lazy dog. The quick brown fox jumps over the ' +
  'lazy dog.</p>';
503
Q

how can we use === with strings?

A

we can use it to compare to see if they are identical

const string1 = 'foo';
const string2 = 'foo';
const string3 = 'bar';

string1 === string2; // => true
string2 === string3; // => false

504
Q

What are Template strings?

A

Template strings give us a way to refer to variables and execute JavaScript code inside of a string

505
Q

How do you indicate a a template string?

A

Template strings are indicated by surrounding text between opening and closing backticks (`).

506
Q

How do you execute code inside a template string?

A

Inside a template string, you can refer to variables or execute code by using ${}.

507
Q

What are regular strings full name?

A

Literal string

508
Q

If using literal strings to write html what would you need If adding more than one line?

A

you would have to use concatenation (with +) to keep it looking neat.

const badArtTips = (
  '<p>How to draw an owl:</p>' +
  '<ul>' +
    '<li>Draw a circle</li>' +
    '<li>Draw the rest of the owl</li>' +
  '</ul>'
);
509
Q

When using template lines to write html do we need to concatenate?

A

With template literals, we do not need to concatenate.

const badArtTips = (
  `<p>How to draw an owl:</p>
  <ul>
    <li>Draw a circle</li>
    <li>Draw the rest of the owl</li>
  </ul>`
);
510
Q

what are the two different forms of the data type “numbers”?

A

integers and floats

511
Q

What are arithmetic operators ?

A

they are operators that can manipulate numbers

512
Q

what are the 6 arithmetic operators?

A
addition
subtraction
multiplication
division
exponentiation
remainder
513
Q

what do compound operators allow us to do?

A

They allow us to change the number value of variable and save the new value to the variable

counter = 1
counter += 9

This will make the variable have a new value of 10

514
Q

what does ++ signify when using number data types in JS?

A

it increases the value by 1

515
Q

where can ++ be placed on the data type name?

A

either before or after

++ counter
counter ++

are both valid

516
Q

whats the difference between the postfix and prefix ++ operators?

A

when you make it the value assigned to another variable name the value of the new the variable will be the same as the original for the postfix ++

in the prefix ++ both the new variable name and the value will be increased by 1.

x = 1 and y = 1

prefix =  ++x
postfix = y++
the result will be 
prefix = 2
x = 2
postfix = 1
y = 2

in the prefix the incrementation happens before a value is returned, in the postfix the incrementation happens after the value is returned (meaning the new variable name will have the same value as the original value before incremenation was rendered

517
Q

what is the order of operations in JS?

A

PEMDAS

518
Q

what is >=

A

greater than or equal to

519
Q

what is ===

A

equal to

520
Q

what is !==

A

not equal

521
Q

what to remember about the % operator

A

that it is a operator and isnt apart of the value. You use it the same way you would use the addition or multiplication sign

522
Q

what to remember about using pemdas

A

make sure that you are using parens correctly to accurately write your code

523
Q

What does double ampersand mean and what is it used for?

A

it means “and”

double ampersand evaluates to true if the values on both sides of the operator evaluate to true

524
Q

what does the boolean function do ?

A

Boolean function, which is used to convert a value into either true or false

525
Q

What are “falsy” values?

A

the values other than false that evaluate to false when coerced to a boolean):

526
Q

what values are “falsy”?

A
Boolean(false);
Boolean(""); // empty string
Boolean(0);
Boolean(null);
Boolean(undefined);
Boolean(NaN);
527
Q

If a boolean doesnt have a falsy value inside of its parens then what value does it return?

A

a true

528
Q

what does || mean and what does it do?

A

it means “or”

|| evaluates to true if one of the values evaluate to true.

529
Q

What does ! do?

A

negates a boolean value so !true evaluates to false, and !false evaluates to true.

530
Q

What are the two Boolean values?

A

True and False

531
Q

What is the strict equality operator?

A

===

532
Q

What does the strict equality do? What does it look for?

A

it looks to see if on both sides of the operator share the same data type and the same value

5 === 5 will return true because they are both numbers and they have the same value

5=== 3 + 2 will also be true

5 === five
will be false because, although they both mean 5 one is a number and the other is a string

533
Q

what is the normal equality operator?

A

==

534
Q

what does the normal equality operator do? what does it look for?

A

This looks just to see if the values are the same without taking into account the data types

1 == “hello”
this will be true, because neither one of these values are “falsy” boolean values, therefor Boolean returns them both as true and they are equal so the value will be returned as true

535
Q

how should we think about conditional keywords as far as what it means?

A

if — ( if this…..do that)
else if — ( then if this……do that too)
else — (if not….. then just do this instead)

536
Q

what is a common pattern using conditionals?

A

setting a value to null (purposely undefined) and then setting a conditional that will define it given a specific circumstance.

let myVar = null;
if (conditional "if this statement is true") {
  myVar = 'something other than default';
}
537
Q

What are the three keywords that we use in dealing with errors?

A

try, catch, finally

538
Q

what is the try block?

A

it allows us to specify a block of behavior that is to be tried (the try block) in the event of an error

539
Q

what is the catch block?

A

If the try block does not succeed, the behavior in the catch block runs.

540
Q

what is the finally block?

A

And in either the success or failure case of the catch block , the instructions in the finally block will run.

541
Q

can the catch and try block be used without the finally block?

A

yes it can

542
Q

what does an error object contain?

A

it contains information about an error that occurs

543
Q

what should you name your error parameters in the catch block?

A

name it e or err because these are conventions

544
Q

what is throw keyword do?

A

intentionally cause an error for bugging purposes

545
Q

what is a caught error?

A

a caught error is an error that has a catch block assigned to it, this type of error will have the catch block ran and will not stop code execution

546
Q

what is an uncaught error?

A

an error that doesn’t have a catch block assigned to it and this type of error will stop code execution dead in its tracks

547
Q

what is declaring a variable?

A

giving a variable a name

var name

548
Q

what is assigning a variable?

A

giving the variable name a value

var name = rashaan

549
Q

What’s the opening comment out tag for html?

A

! - -

550
Q

What is the closing tag for commenting out in html

A
    • >
551
Q

How to you create an internal link between websites?

A
  1. Use # and create a name to work as the url of the href

a href = “#contact-us”> info < a

  1. Use that same name as the id for that element

p id = “contact-us”

552
Q

What is a dead link? What is it’s purpose?

A

Sometimes you want to create a link even though you don’t know where it’s going just yet - in this case you create a dead link

553
Q

How do you create a dead link?

A

a href = “#”

554
Q

Can you make images a link?

A

Yes by nesting them inside of anchor tag

555
Q

what is font degradation ?

A

when you set up a font in CSS for a particular element but the browser doesnt recognize that font or support it it returns to a default font

556
Q

how can you set up a secondary font in case of font degradation ?

A

add a comma and a second font

p {
font-family: roman, lobster;
}

557
Q

can you add multiple classes to an element?

A

yes you can.

558
Q

how do you add multiple classes to an element?

A

put a space between the two classes and enclose them within one set of quotes

p = class ‘happy gilmore’

happy is a class and gilmore is a different class

559
Q

what happens when you set an elements margin to a negative number?

A

it grows larger

560
Q

what is clockwise notation?

A

instead of using specific sides to set the deminsions of elements like border or padding, just using one shorthand property and where the numbers represent a side in a clock wise fashion.

padding, top right bottom left

padding 20px 30px 40px 50px

561
Q

do you need commas in clockwise notation?

A

no you do not

562
Q

what is grey box wireframing?

A

Greybox wireframes are used to prototype basic functionality. We don’t consider logos, colors, or dynamic effects. Instead, greyboxing emphasizes defining content types and hierarchy.

563
Q

What does the error ‘cannot access variable name before initialization mean’? and how can you fix it?

A

Generally, it means that you are trying to define something while using itself inside of the definition. (
example

let item = array.map(function(x){
item + 2;}

this will cause this type of error. Because you are trying to set the name item to the value of the map method and the value of the function, but since item hasnt been set yet, when it gets to the part of the function and comes across item, it sends an error because item has no value, so it gets stuck like ‘what do i add two to’?

you would have adjust the function so that item is defined and given an value and in a seperate line of code, access it

564
Q

How do you add the text on an input type= ‘button’ ?

A

you add the attribute value =”text here”

565
Q

when you have a button tag inside of a form tag what will be the default type and function of the button?

A

it will have default submit functionality meaning it will automatically try to submit info to the server even if one isnt present