HTML & CSS Flashcards

1
Q

What does the following CSS mean?

box-sizing: border-box;

A

Box sizing decides what type of box model to use.

Border Box will add margin and padding to the width of the box, allowing for less difficulty when formatting pages.

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

Why should photoshop comps be minimal?

A

Due to time it takes to create. The site will not look exactly the same as the comp.

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

What should you do in replace of a photoshop comp?

A
  1. Style tile
  2. Wireframes
  3. In browser Wireframe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does a wireframe do?

A

Works out the flow of your site.

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

What is a poly field?

A

It is a javascript file. That forces the browser to recognize features it would usually not naturally support.

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

Browser Prefix

A

When a browser tests out a feature. Need to use a specific prefix

  • webkit - (chrome, safari, edge)
  • moz- (mozilla)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 4 property of floats?

A
  1. Comes out of flow
  2. Needs a width of less than 100%
  3. Parents do not embrace the floats
  4. Need to ensure there is enough space
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does Clear do?

A

Forces the element to ignore the float and go directly under them.

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

What does Clear Fix do?

A

Forces the parent to contain the floats.

Create an invisible element that comes after the floats and clears both floats.

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

What does a reset do?

A

To override browser defaults since all browsers are different.

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

What is Modernizr and what does it do?

A

Is a javascript file. It tests and validates what CSS features work within the browser.

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

How does Modernizr work?

A

Depending on how the testing modernizr performs, it creates classes in HTML tag either a property name or a no-js class.

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

Why is modernizr important?

A

To create fall backs if JS is not supported or does not work.

Tip. Add a class=no-js to your html tag even before adding modernizer.

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

How do you make your site accessible?

A
  1. Adding an alt tag
  2. Tab index (when tabbing and it auto focuses)
  3. Correct input styles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How many h1 tags can you have in your html?

A

Multiple

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

How many header and footer tags can you have in your html?

A

Multiple

17
Q

How many main tags can you have in your html?

A

Only one

18
Q

What does it mean to when Javascript is deprecated?

A

It is not supported and cannot be used.

19
Q

What is the <i> </i>

A

Something that is in a different tone of voice eg language, icon. It is an inline element that is to be styled differently

20
Q

What is the <b> </b>

A

Something that is in a different tone. Span

21
Q

Attribute Selector

A

div[class]

Used to select all the elements that have the specified attribute and applies the CSS property to that attribute.

22
Q

What is specificity?

A

Uses the most specific selector

23
Q

What is the most specific selector

A

Inline styles

24
Q

How do you override an inline style?

A

Use important !

25
Q

What is are the selectors from most specific to least

A
  1. Inline Styles
  2. ID
  3. Classes
  4. Elements
26
Q

Is javascript full proof?

A

No. Javascript requires fall backs

27
Q

What is the difference between rgba and opacity?

A

opacity lowers the opacity of the whole element

rgba lowers opacity of colors only.

28
Q

What does CSS Transitions do?

What can be changed in transitions?

A

Allow you to change property values smoothly

  1. What property
  2. Length measured in secs
  3. Ease in/Out
  4. Delay
29
Q

If you move an element using transition. What is the name of the transformation?

A

Translate

30
Q

If you move down a page is that negative or positive number

A

Positive

31
Q

What is a DOM? And why do we use it?

A

DOM - Document Object Model

It shows the relationship between all HTML elements