CSS Basics 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

what does css handle

A

styling of the website

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

basic syntax

A

rule set
declaration block
declarations

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

rule set

A

h1 {
background: pink;
font-size: 1.5em;
}

selector (h1) and declaration block

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

declaration box

A

{
background: pink;
font-size: 1.5em;
}

where the declarations are organized

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

declarations

A

{
background: pink;
font-size: 1.5em;
}

each of these lines is a declaration

property (font-size) + value (1.53m)

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

what makes it cascading

A

browser reads CSS top to bottom

boxes lower down override higher up boxes

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

applying css to html:
inline

A

<p>Some red text.</p>

<p>plain old p text</p>

when css is applied directly to the element in the html file through a style attribute

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

applying css to html:

<style></style>

element in the <head>

A

<head>
<title>title</title>
<style>

    p {
      color: blue;
      font-size: 42px;
      font-weight: 700;
    }
  
</style>
</head>

when css is applied via a style element box in the header section in the html file

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

applying css to html:
external stylesheet

A

<head>
<meta></meta>
<title>
Page title for browser tab.
</title>
<!-- The following link points to a stylesheet called "index.css". -->
<link></link>
</head>

link href=”styles.css” –> linking to an external stylesheet (.css file) in your project file

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

which method is the best?

A

external spreadsheet

good web developers separate their concerns
html –> good for structure and content
css –> styling
JS –> behavior and interactivity

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

what methods are bad and why?

A

inline –> messy, not efficient
style element –> messy and long (good in quick demos or single paged sites)

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