CSS 1 Flashcards Preview

Front End > CSS 1 > Flashcards

Flashcards in CSS 1 Deck (31)
Loading flashcards...
1
Q

Elements

A

components that define page objects

2
Q

tags

A
  • defines the elements with angle brackets wrapped around the tag name and usually comes in pairs
3
Q

hr stands for

A

horizontal rule

4
Q

for all image tags, what is required is (2)

A
  1. src - defines the source

2. alt - a description of the picture

5
Q

CSS can be written in (3)

A
  1. internal CSS, same page
  2. inline CSS
  3. External CSS, preferred method
6
Q

to link a CSS externally, you need a ______ attribute in the ________

A

link Attribute; head

7
Q

2 required attributes to link CSS externally (2)

A
  1. rel=”stylesheet”

2. href=”…..”

8
Q

selectors

A

determines which HTML elements to apply styles to

9
Q

declaration block

A
  • consists of one or more rules enclosed in curly braces
10
Q

body {
background: blue;
}

**body

A

selector

11
Q

body {
background: blue;
}

**background

A

property

12
Q

body {
background: blue;
}

**blue

A

value

13
Q

Class selectors (4)

A
  1. you define it
  2. can be applied to multiple elements
  3. Elements can have multiple classess
  4. Use a period to declare it in CSS
14
Q

ID Selector (4)

A
  1. Must be unique
  2. Only one per page
  3. Elements can only have 1 ID
  4. Denoted with # in CSS
15
Q

pseudo class

A
  • selects a state of the element
16
Q

CSS inheritance

A
  • an ancestor “inherits” the CSS of its descendants
17
Q

Specificity

A
  • determines which CSS rule will take precedence
18
Q

How is specificity calculated (4)

A
  1. Inline = 1000
  2. ID’s = 100
  3. classes = 10
  4. Elements and pseudo elements = 1
19
Q

typography

A
  • the study of the design and the use of type for communication
20
Q

typeface

A
  • a set of fonts, designed with common characteristics compose in glyphs
21
Q

font

A
  • individual files that are part of a typeface
22
Q

line-height

A
  • sets the height of the space between 2 lines of text
23
Q

as a rule of thumb, line height should be….

A

larger than font size

24
Q

5 CSS properties for spacing elements (5)

A
  1. width
  2. height
  3. padding
  4. margin
  5. border
25
Q

5 CSS properties for spacing elements (5)

**width and height

A

sets specific size of content box

26
Q

5 CSS properties for spacing elements (5)

**padding

A

space inside the element

27
Q

5 CSS properties for spacing elements (5)

**margin

A
  • amount of space outside the element
28
Q

5 CSS properties for spacing elements (5)

**border

A

displays between padding and margin

29
Q

by default, block level elements…..

A

stack on top of each other in the order the HTML was written in

30
Q

negative margin

A
  • used to move elements outside of the default spacing position
31
Q

margin: auto

A
  • actually finds the centre of the page