CSS Cascading Style Sheets Flashcards

1
Q

What is CSS?

A

It is used to styling language used for website layout and design and most commonly used with HTML

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

What are the three main ways of adding CSS to an html file?

A

Inline CSS
Internal CSS
External CSS

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

What is Inline CSS?

A

Inserted directly in the html element

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

What is internal CSS?

A

Using <style> tags within a single document</style>

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

What is external CSS?

A

Linking an external .css file

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

Should you keep the presentation, functionality, and style completely separate as much as possible?

A

Yes, to attempt otherwise is not practical, nor scalable.

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

What is the html tag <link></link> used for?

A

To externally link a css document

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

What is the rel attribute used for and where?

A

It is used under the <link></link> tag, and defines the relationship between a linked resource and the current document, e.g.

rel=“stylesheet”

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

What is a css selector?

A

It is the first part of a CSS rule used to find or SELECT the HTML elements you want to style.

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

If you have a property, you must also have a ?

A

Value

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

If you have a value you must also have a ?

A

Property

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

What is a : in a CSS declaration?

A

Property/value separator

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

What is the semicolon in a css declaration?

A

A declaration separator

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

What is the symbol for a declaration separator?

A

Semicolon ;

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

What is the symbol for a property/value separator?

A

Colon .

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

What are the four ways to designate colors in CSS?

A

Color names
HTML5 Color Names
Hexadecimal
RGB

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

What is an ID in HTML?

A

Specifically identifies a SINGLE element

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

What is an class in HTML?

A

Can be assigned to multiple elements on a page or entire website so that a css can be applied to multiple tags

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

What symbol is used to target a class?

20
Q

Should you use pixels (px) or percentages with containers?

A

Percentages

21
Q

From the content, to the outside, describe the spacing from inside out.

A

Padding, border, margin

22
Q

What is the order for margin and padding shorthand?

A

Top, right, bottom, left

23
Q

What is the order when writing the declaration for borders and margins?

A

Size, color, style
5px red solid

24
Q

What does this mean?

*{

}

A

Everything between the brackets will be applied to every element and style

25
What does the hover state do?
When you hover over a link it will turn red
26
What is css inheritance?
Refers to the relationship between HTML tags and how certain css styles can apply to a tag without any css rules directly applied to it
27
What is cascading in css?
Refers to the fact that cumulative styles across multiple css rules are applied to each and every html tag.
28
How to add comments in css?
Place text inside /* */
29
What is the purpose of SASS?
An extension to css that allows you to use variables, math operations, mixing, loops, functions, imports and other functionality that does not exist in css.
30
What are three file formats used for the web?
Jpg, gif, png
31
Difference between gif 87a and 89a?
87a is the original format indexed for color images 89a can do the same, but includes transparency and animation capabilities.
32
What is float used for?
Allows an image to float left/right to the text in a container
33
What is image transparency?
The opacity of an image
34
What is hexadecimal color?
Hexadecimal values that represent colors with the #RRGGBB format.
35
What is the hex code for white?
#FFFFFF
36
What is the hex code for black?
#000000
37
What is the hex code for red?
#FF0000
38
What is the hex code for green?
#00FF00
39
What is the hex code for blue?
#0000FF
40
what are link states?
Interactive elements that can change display based on the current state of their interaction with the user
41
Difference between fixed and liquid layouts
Fixed means the width of the entire page is set Liquid means the width of the entire page is flexible
42
what are browser safe colors?
216 out of 256 general colors
43
identify three css properties related to formatting text and fonts.
Color Letter-spacing Line-height Text-align Text-decoration Word-spacing
44
Create a style rule that specifies a font-family, font-size, and color. Include a fallback font.
45
What is the box model?
Refers to how HTML elements are modeled in browser engines and how the dimensions of those HTML elements are derived from CSS properties.
46
Difference between padding and margin
Padding represents inner space of an element (from the text out) Margin is the white space available surround an element (furthest edges in)