CSS ?'s Flashcards

1
Q

What are different ways to intergrate css into html?

A

style tags in head of HTML, use inline-styling, seperate stylsheet

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

What is the meaning of cascading

A

same style can be applied to multiple elements, multiple styles can be applied to a particular html elements, same stylesheet for multiple pages

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

Advantages of CSS?

A

multiple elements can have the same style, selectors and grouping can be used to group styles in complex situations

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

css frameworks?

A

bootstrap, responsive, mobile first websites

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

id v class?

A

Id is unique, so it can only be used once, same class can be applied to multiple elements

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

what is RGB Stream?

A

way to get a color for styling of an element, 0-256

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

Ways to assign a color?

A

Hexadecimal (#), RGB, HSL functional notation (never used)

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

CSS Box Model?

A

describes rectangular box that is generated for elements in dom tree. Each box has content, optional padding, border, margins.

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

Box model rules?

A

dimensions of block element = width, height, padding, borders, margin.
no height specified, high as container + padding
no width specified, wide as parent minus paddiing
padding + border not included in width and height of an element

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

What is z-index?

A

helps specify stack order of positioned elements that may overlap one another. default value is 0. higher index stacked above lower index. only applied to elements that do not have position static.

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

CSS sprites?

A

css sprites combine multiple images into one single larger image. It is a commonly used technique for icons. Use a sprite generator.

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

benefits of sprites

A

Reduce the number of http requests for multiple images

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

Psuedo elements?

A

keyword added to a selector that styles a specific part of the element. (:first-line, :first-letter)

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

what is a float property used for?

A

places an element on left or right side of its container, allowing text/inline elements to wrap around it.

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

Different modules in css?

A

selectors, box model, text effects, animations

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

different media types allowed by css?

A

all, print, screen, speech

17
Q

different unites in CSS?

A

em = relative to find size fo element, rem = relative to font size of root element, % = relative to parent element

18
Q

control background image repetition?

A

background-repeat: none;

19
Q

nomenclature of css?

A

.className { padding: 10px;}

20
Q

what would {margin: 0 auto;} do?

A

with a specified width to a container, the object will sit centrally within its’ parent container. auto makes the left and right margins automatically set itself.

21
Q

what does overflow property do?

A

speciefies what should happen if content overflows an elements box. (overflow: scroll, overflow: hidden)

22
Q

what property to control image scroll?

A

background attachment: fixed (no scroll)

23
Q

what is responsive web design?

A

build web pages that detect visitor’s screen size and adjust content accordingly.

24
Q

Difference between visibility : hidden + display: none?

A

visibility = tag is not visible in, but space is allocated in page and tag is still rendered.

display = will not appear on page, no space allocated, still interact it with dom.

25
Q

Specificity?

A

means by which browser decides which css property values are most relevant and will be applied. the rule increased by specificity: types (h1), class (.class), id (#hi).

26
Q

what is box shadow?

A

adds shadow effects around an element’s frame. x and y offsets, blur and spread

27
Q

flexbox?

A

improves items align, directions, and order in the container. able to modify the width or height of its’ children to fill available space as best as possible.

28
Q

How does a browswer determine what elements match a css selector?

A

browser’s match selectors from rightmost to left. filter out elements in dom according to key selector and traverse up to its parent elements.

29
Q

explain translate() instead of abs positioning

A

value of transform. does not trigger browser reflow and create a gpu layer so it will be more efficient and shorter times for animations.

30
Q

responsive v mobile first?

A

responsive would be some elements responding to a certain screen sizes using media queries, where as mobile first is making the default sizing for mobile views first and then scale up for desktops. (cleaner code with mobile)

31
Q

different ways to position element?

A

position: fixed, absolute, static, relative

32
Q

what is BFC?

A

part of visual css rendering of web page in which block boxes are laid out. Floats, absolutely positioned elements, inline-blocks establish new BFC. important because without it, containing boxes will not contain floated children.

33
Q

what would {box-sizing: border-box} do?

A

changes how width and height are calculated by adding in border and padding in the calculation

34
Q

what is a preprocessor?

A

a program that generates css from its own unique syntax. add features that don’t exist in pure css. can feature loops, variables (sass)

35
Q

what is the difference between static, relative, fixed, absolute, and static positioning?

A
sticky = default position, top right left and z-index do not apply. 
relative = position adjusted relative to itself, leaving a gap from where element would be 
absolute = element removed from flow of page at specified position relative to closely positioned ancestor. does not affect other positions. 
fixed = removed from flow of page at specified position and does not move when scrolled. 
sticky = hybrid if relative and fixed. element treated as relative until a specific point and then it is fixed.
36
Q

what are vendor prefixes?

A

for experimental or non standard css properties and javascript API’s so devs can experiment without breaking code. (-webkit-)

37
Q

what is file splitting?

A

used for sites with multiple layouts and content types. examples: reset, forms, list, layout.css

38
Q

what are functions/mixins?

A
mixins = output lines of sass code that compile directly into css styles. 
function = return a value that can then become the value for a css property/something that might be passed into a mixin
39
Q

how does css work?

A

browser converts HTML + CSS into the DOM. Loads HTML, Parses HTML, Create DOM Tree, Loads + parses CSS, displays content.