CSS Basics and Setup Flashcards

0
Q

In the CSS folder what do you put to stylistically change the tag?

A

(Tag Name, e.g. span) {
(Style Attribute: choice; , e.g. color: red;)
}

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

How do you link an HTML sheet to a CSS sheet?

A

Put “” in the “ “ tags.

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

How do you write a comment in CSS?

A

/Comment goes here./

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

How do you put CSS in an HTML document without using inline CSS?

A

Use style tags “ “ (different from the style attribute) in the head tags “ “ and put CSS in them. Note: You do not need a CSS Link

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

What do you do if you want a more complicated color like medium dark red or light magenta?

A

Use a hexadecimal value instead of a color.
Make sure you use the pound (aka hashtag sign) before the value.
For example: color: #ff0000;
Note: The values are case-insensitive so F = f.
Find the one you need here: http://bit.ly/36KFwk

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

What do you do if you want text to adjust to the screen instead of staying the same size?

A

Use “em” instead of “px”.

Note: 1em is the same as the default text size on the machine on which it is being read.

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

What fonts can all devices see?

A

serif - Sort of like D’Nealian
sans-serif - Sort of like block
cursive - It is, of course, cursive

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

How do you put backup fonts in CSS?

A

You separate the with commas in order from most preferable to least preferable.
Note: Always use the default you want some where in there
For Example:
color: Veranda, Futura, sans-serif;

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

What three properties should divisions have?

A
background-color, height, and width
Ex. div {
     background-color: #ff0000;
     height: 50 px;
     width: 50 px;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What property can you use to set borders and how do you use it?

A
border: #px solid/dashed color
Ex.
table{
     border: 2px dashed #ff0000;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What property do you have to change so you can customize links and how do you change it?

A
Set the property "text-decoration" to "none"
Ex. a {
     color: #ff0000;
     text-decoration: none;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What do you do to have your selector be only things nested in certain HTML tags?

A

List them in order of broad to the specific one you want.
Ex. div p span {
color: red;
}
This only effects span in paragraphs in the division tags.

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

What selector can you use to select everything?

A
  • (astrus)
    Ex. * {
    background-color: #ff0000
    }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What happens if you have a general selector (ex. p) telling paragraphs to do something and a specific selector (ex. div p) telling them to do something else?

A

CSS will follow the most specific selector, however it does follow the general selector when it does not coincide with the more specific one.
Ex. p would apply to all paragraphs except for ones in dividers if div p was another selector

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

What do you need to select a tag directly inside of a tag instead of any type of that tag that is inside of that tag?
Ex. <ul> (“<div>”) <p> (</p><div>) (</div>) <p> (“</p></div>”) </ul>
ul div gets what is in parentheses, however you just want what is in quotations, directly after ul

A

> (the greater than mark)
Ex. ul > div {
background-color: #ff0000;
}

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

What CSS selector do you use if you want multiple elements (Ex. div, td, p) but only certain tags with that element?

A
Use a class. 
First identify the tags in HTML 
Ex. <div class="yay">  </div>  <p class="yay">  </p>
Then write in the selector
Ex.  .yay {
     background-color: #ff0000;
}