Creating Page Layouts with CSS Flashcards

1
Q

What does semantic tags do to our webpage?

A

Make it nice for readers and also for indexing

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

What is the “Do not lie metatag?”

A

Is a meta element containing the initial definition of width, initial scale and maximum scale.
``

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

What are the four most used semantic elements? Where are all they located?

A

header, nav, section, footer. INSIDE the body element.

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

Where to find fonts? How to import the selected fonts to our website?

A

fonts.google.com. Import them by using the “embedded” tab and copying the content inside our HEAD element

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

Is it recommended to use css reset or normalize? What each one does?

A

css reset resets all the predefined styles defined by the browser. Normalize does the same but less intrusive.

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

Should we separate CSS files? one example containing 4? Does the order matter?

A

normalize.css, small, medium and large.css. Yes.

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

How do the CSS files are organized in a mobile-first approach? How do the CONTENT of these files are activated?

A

normalize and small are always applied, medium only for tablets and large only for computers. ACTIVATED via media queries.

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

Regarding border-box: Are margins applied inside the box? what about padding?

A
margins = OUTSIDE
padding = INSIDE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What difference between jpg, png and svg? what does svg mean?

A

jpg = images;
png = images with transparent backgroud;
svg = scalable images
svg means SCALABLE VECTOR GRAPHIC

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

When SVG used the most? why?

A

For icons because they look great for all screen sizes

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

do div and section has default styling?

A

NO

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

What does the clear property do?

A

It allows removing preceding or succeding floating elements to below

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

In a regular layout screen, can the elements touch the border of the browser?

A

no.. this is a design issue.

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

What is a hero image?

A

It is an image that brings attention to our site.

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

Why do we need to set a pre-defined height and weight in our images even when they are overwritten by the css? Does it do what we call “Jank removal”?

A

So that the image box takes its place before the image downloads and this way the content won’t be pushed down. YES

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

What happens when you use an absolute element with top:0 without caring about the parent? What is necessary to be done then?

A

The element will go to the top of the page. necessary to define the parent element as position: relative

17
Q

Considering a 12 column layout, how much space (%) of the screen a col-lg-3 would ocupy? How many of these will fit in one row?

A

3/12*100=25%

12/3=4 (4 pieces fit in a 12 column grid)

18
Q

Why using a css preprocessor? Which is a good sass compiler?

A

to unify all css files into one. to minimze duplicated code and etc. also has built-in minifier. also nesting.

COMPILE HERO

19
Q

What is the sr-only in bootstrap?

A

screen reader only

20
Q

how a 6 colum row is expressed on bootstrap?

A

container
row
col-md-6

21
Q

What does Flexbox replaces in the current float system? Is float system then deprecated?

A
clear-both -> display: flex; 
                      flex-wrap: wrap;
float: left  -> CAN BE REMOVED;
width: 100%  -> flex-basis: 100%;
.clearfix:after{}  -> CAN BE REMOVED;

YES. DEPRECATED.

22
Q

How to create a set of col-md-X with SASS? Do I have to write each one by hand?

A

SASS supports loops which allows calculating stuff and also creating dynamic selectors for each col-md-X.

23
Q

How do we make sure the box model is applied the same for all browsers?

A

define moz-box, webkit-box and box-sizing to border-box

24
Q

What is grid system and how many columns is the default size?

A

Separates the screen in twelve equally separated columns.

25
Q

What do we need to define in the CSS so the image scales properly?

A

width: 100%;
height: auto;

26
Q

Are the HTML elements rendered in the same order defined in the HTML? Is it top to bottom? What is the keyword that change the default behavior?

A

Yes. Yes. Position.

27
Q

What is “CSS Slenderize” according do the author?

A

Using multiple selectors to group to avoid css duplications on too-specific selectors.

28
Q

What is the drawback of using bootstrap? Why do people choose it anyways?

A

Its size. 264kb total… where a small project css and js will be 4kb total.. to increase development speed.

29
Q

Inline-block is a value of which css property?

A

Display