Intro to CSS Flashcards

1
Q

What does CSS stand for?

A

Cascading Style Sheets

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

CSS rule set
e.g. p {
color: blue;
}

Selector = p

Declaration block = { color:blue; }

Declaration = color:blue;

Property = color

Value = blue

A

Selector—The beginning of the ruleset used to target the element that will be styled.

Declaration Block—The code in-between (and including) the curly braces ({ }) that contains the CSS declaration(s).

Declaration—The group name for a property and value pair that applies a style to the selected element.

Property—The first part of the declaration that signifies what visual characteristic of the element is to be modified.

Value—The second part of the declaration that signifies the value of the property.

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

CSS inline style
e.g. <p style='color:blue;'>Hello there!</p>

Opening tag = <p style='color:blue;'>

Attribute = style=’color:blue;’

Declaration = color:blue;

Property = color

value = blue

A

Opening Tag—The start of an HTML element. This is the element that will be styled.

Attribute—The style attribute is used to add CSS inline styles to an HTML element.

Declaration—The group name for a property and value pair that applies a style to the selected element.

Property—The first part of the declaration that signifies what visual characteristic of the element is to be modified.

Value—The second part of the declaration that signifies the value of the property.

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

How do you write css code in html?

A

Using the <style>
</style> element.

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

How do you link a css file to a html file?

A

Using the <link></link> element.
!Must be placed within the <head> element.!

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

What are the required attributes when using the <link></link> element?

e.g. <link></link>
if its a local file then instead of starting with https you would start with ./

A

href — like the anchor element, the value of this attribute must be the address, or path, to the CSS file.

rel — this attribute describes the relationship between the HTML file and the CSS file. Because you are linking to a stylesheet, the value should be set to stylesheet.

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