CSS Flashcards

1
Q

CSS

A

CSS stands for Cascading Style Sheets.

CSS saves a lot of work. It can control the layout of multiple web pages all at once.

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

Tip

A

The word cascading means that a style applied to a parent element will also apply to all children elements within the parent.

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

Ways

A

CSS can be added to HTML documents in 3 ways:

Inline - by using the style attribute inside HTML elements
Internal - by using a <style> element in the <head> section
External - by using a <link></link> element to link to an external CSS file</style>

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

Inline CSS

A

An inline CSS is used to apply a unique style to a single HTML element.

An inline CSS uses the style attribute of an HTML element.

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

Internal CSS

A

An internal CSS is used to define a style for a single HTML page.

An internal CSS is defined in the <head> section of an HTML page, within a <style> element.</style>

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

External CSS

A

External CSS
An external style sheet is used to define the style for many HTML pages.

To use an external style sheet, add a link to it in the <head> section of each HTML page:

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

CSS Border

A

The CSS border property defines a border around an HTML element.
p {
border: 2px solid powderblue;
}

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

CSS Padding

A

The CSS padding property defines a padding (space) between the text and the border.
p {
border: 2px solid powderblue;
padding: 30px;
}

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

CSS Margin

A

The CSS margin property defines a margin (space) outside the border.

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

Link to External CSS

A

External style sheets can be referenced with a full URL or with a path relative to the current web page.

Example
This example uses a full URL to link to a style sheet:

<link></link>

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