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?

A

. Dot

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
Q

What does the hover state do?

A

When you hover over a link it will turn red

26
Q

What is css inheritance?

A

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
Q

What is cascading in css?

A

Refers to the fact that cumulative styles across multiple css rules are applied to each and every html tag.

28
Q

How to add comments in css?

A

Place text inside
/* */

29
Q

What is the purpose of SASS?

A

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
Q

What are three file formats used for the web?

A

Jpg, gif, png

31
Q

Difference between gif 87a and 89a?

A

87a is the original format indexed for color images
89a can do the same, but includes transparency and animation capabilities.

32
Q

What is float used for?

A

Allows an image to float left/right to the text in a container

33
Q

What is image transparency?

A

The opacity of an image

34
Q

What is hexadecimal color?

A

Hexadecimal values that represent colors with the #RRGGBB format.

35
Q

What is the hex code for white?

A

FFFFFF

36
Q

What is the hex code for black?

A

000000

37
Q

What is the hex code for red?

A

FF0000

38
Q

What is the hex code for green?

A

00FF00

39
Q

What is the hex code for blue?

A

0000FF

40
Q

what are link states?

A

Interactive elements that can change display based on the current state of their interaction with the user

41
Q

Difference between fixed and liquid layouts

A

Fixed means the width of the entire page is set

Liquid means the width of the entire page is flexible

42
Q

what are browser safe colors?

A

216 out of 256 general colors

43
Q

identify three css properties related to formatting text and fonts.

A

Color
Letter-spacing
Line-height
Text-align
Text-decoration
Word-spacing

44
Q

Create a style rule that specifies a font-family, font-size, and color. Include a fallback font.

A
45
Q

What is the box model?

A

Refers to how HTML elements are modeled in browser engines and how the dimensions of those HTML elements are derived from CSS properties.

46
Q

Difference between padding and margin

A

Padding represents inner space of an element (from the text out)

Margin is the white space available surround an element (furthest edges in)