Test 2 Flashcards

1
Q

Which property is used to change the background color?

  • color
  • bgcolor
  • background-color
A

background-color

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

How do you insert a comment in a CSS file?

’ this is a comment

/* this is a comment */

// this is a comment

// this is a comment //

A

/* this is a comment */

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

How do you select all p elements inside a div element?

  • div.p
  • div p
  • div + p
A

div p

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

Which property is used to change the left margin of an element?

  • padding-left
  • margin-left
  • indent
A

margin-left

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

Which CSS property is used to change the text color of an element?

text-color

fgcolor

color

A

color

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

How do you display a border like this:
The top border = 10 pixels
The bottom border = 5 pixels
The left border = 20 pixels
The right border = 1pixel?

  • border-width:10px 20px 5px 1px;
  • border-width:5px 20px 10px 1px;
  • border-width:10px 5px 20px 1px;
  • border-width:10px 1px 5px 20px;
A

border-width:10px 1px 5px 20px;

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

Which CSS property controls the text size?

  • font-size
  • font-style
  • text-size
  • text-style
A

font-size

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

How do you display hyperlinks without an underline?

  • a {text-decoration:none;}
  • a {underline:none;}
  • a {decoration:no-underline;}
  • a {text-decoration:no-underline;}
A

a {text-decoration:none;}

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

How do you group selectors?

  • Separate each selector with a comma
  • Separate each selector with a plus sign
  • Separate each selector with a space
A

Separate each selector with a comma

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

How do you select an element with id “demo”?

  • demo
  • *demo
  • .demo
  • # demo
A

demo

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

Which property is used to change the font of an element?

font-family

font

Both font-family and font can be used

A

Both font-family and font can be used

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

Which is the correct CSS syntax?

  • {body:color=black;}
  • {body;color:black;}
  • body:color=black;
  • body {color: black;}
A

body {color: black;}

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

How do you make the text bold?

  • font:bold;
  • style:bold;
  • font-weight:bold;
A

font-weight:bold;

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

How do you select elements with class name “test”?

  • test
  • # test
  • .test
  • *test
A

.test

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

How do you add a background color for all

elements?

h1 {background-color:#FFFFFF;}

h1. all {background-color:#FFFFFF;}
all. h1 {background-color:#FFFFFF;}

A

h1 {background-color:#FFFFFF;}

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

Which HTML tag is used to define an internal style sheet?

  • <style></style>
  • <css></css>
A

<style></style>

17
Q

What is the default value of the position property?

  • static
  • absolute
  • relative
  • fixed
18
Q

Where in an HTML document is the correct place to refer to an external style sheet?

  • In the section
  • In the section
  • At the end of the document
A

In the

section

19
Q

What is the correct CSS syntax for making all the

elements bold?

p {text-size:bold;}

p {font-weight:bold;}

A

p {font-weight:bold;}

20
Q

When using the padding property; are you allowed to use negative values?

  • No
  • Yes
21
Q

How do you make each word in a text start with a capital letter?

  • text-transform:uppercase
  • You can’t do that with CSS
  • text-transform:capitalize
A

text-transform:capitalize

22
Q

How do you make a list that lists its items with squares?

  • list-style-type: square;
  • list: square;
  • list-type: square;
A

list-style-type: square;

23
Q

Which HTML attribute is used to define inline styles?

  • class
  • styles
  • font
  • style
24
Q

What is the correct HTML for referring to an external style sheet?

  • <style></style>
  • <stylesheet>mystyle.css</stylesheet>
  • <link></link>
A

<link></link>