Intermediate CSS Flashcards

1
Q

<div></div>

A

Combines a group of html elements into a single box

Useful to structure and divide up web content

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

<span></span>

A

An inline element where you can use to pick a sub-section of a html element, which can then be used to style

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

The Box Model

A
Width
Height
Padding
Border
Border Size
Solid, Dashed, …
Margin
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Display Property

A

We can also modify the display property for any html element

Ex. display : inline;

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

Block

A

An element that will take up its own line, where the width takes up the whole screen

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

Inline/ Inline-Block

A

Inline
Inline-Block
Allows other elements to sit to their left or right side
None

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

Html element is hidden as if it never existed

A

Alternative, visibility : hidden

The element can not be seen, but it fills the original size position

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

CSS Static and Relative Positioning

A
  1. Content dictates everything
  2. Order of content comes from the code
  3. Parent - Children relationship
    Children elements are layered on top of the parent elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Position

A

4 Methods to change the layout positioning of elements:

Static
All html elements are static by default
Relative
The adjustment position is applied in relative to the static positioning
position : static;
Then we can only see changes once we change the coordinate values.
top, bottom, left, right
Relative positioning acts independently on the html element
Absolute
Moves element relative to its parent element
Adds margins relative to its parent element
Absolute positioning acts dependently on the html element
Fixed
The element will be fixed in place, even when the user scrolls around the web page
Useful for navigation bars

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

Centering Elements with CSS

A

text-align : center
Centers all elements, where it does not have a width set
margin : top right bottom left
auto - will be used to center the element

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

Font Styling

A

font-family
serif
sans-serif

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

Note that the availability of fonts varies based on…

A

…the browser and operating system. So if you choose a font for your web site, be mindful of its availability to your end users.

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

em

A

Example.
font-size: 2rem;
1 em = 16px = 100%
Dynamic sizing of text, in proportion to a standard, being 16px = 1em
Dynamic sizing of text, relative to the html elements paren

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

rem

A

Dynamic sizing of text, relative to the root

Preferable to use for texts

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

CSS Float and Clear

A

float
The html element “floats”, so that other elements can wrap around the element
clear
Opposite of float, the html element does not allow wrapping around of other elements

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