ACTIVITY:

CSS QUIZ – ADVANCED – USING CSS, SELECTORS AND THE BOX MODEL

1.  What are the three general methods that you can use to implement CSS styles in a web page?

……………………………………………….

……………………………………………….

……………………………………………….

2.  What are the three most important types of selector in a CSS style sheet?

……………………………………………….

……………………………………………….

……………………………………………….

3.  What type of selector is being used here?

#content{text-align: center}

………………………………………………..

4.  What type of selector is being used here?

.paratext3{text-align: left; color: blue}

………………………………………………..

5.  What does CSS stand for?

a.  Colorful Style Sheets

b.  Computer Style Sheets

c.  Cascading Style Sheets

d.  Creative Style Sheets

6.  What is the main difference between class and id selectors that would impact on your choice of what to use on a web page?

…………………..……………………………………………….

7.  What is the correct HTML for referring to an external stylesheet?

a.  <stylesheet>mystyle.css</stylesheet>

b.  <link rel="stylesheet" type="text/css" href="mystyle.css">

c.  <link rel="stylesheet" type="text/css" src="mystyle.css">

d.  <style src="mystyle.css">

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

a.  In the <head> section

b.  At the end of the document

c.  In the <body> section

d.  At the top of the document

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

a.  <css>

b.  <style>

c.  <script>

10.  Which HTML attribute is used to define inline styles?

a.  style

b.  styles

c.  class

d.  font

11.  Which is the correct CSS syntax?

a.  {body: color=black(body}

b.  body: color=black

c.  body {color: black}

d.  {body; color: black}

What does this code actually do?

12.  How do you insert a comment in a CSS file?

a.  //This is a comment//

b.  //This is a comment

c.  /*This is a comment*/

d.  'This is a comment

13.  Which CSS property is used to change the background colour?

a.  background-color:

b.  bgcolor:

c.  color:

14.  Identify the 7 errors in the following:

P {colour: #FFFFFF; align-text; "left"; background-color= #FFFF33]

……………………………………………………

……………………………………………………

……………………………………………………

……………………………………………………

……………………………………………………

……………………………………………………

……………………………………………………

15.  How do you add a background colour for all <h1> elements?

a.  h1 {background-color: #FFFFFF}

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

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

16.  How do you change the text colour of an element?

a.  color:

b.  text-color:

c.  fgcolor:

d.  text-color=

17.  Which CSS property controls the text size?

a.  text-style

b.  font-style

c.  text-size

d.  font-size

18.  What is the correct CSS syntax for making all the <p> elements bold?

a.  <p style="font-size: bold">

b.  <p style="text-size: bold">

c.  p {font-weight: bold}

d.  p {text-size: bold}

19.  How do you display hyperlinks without an underline?

a.  a {underline: none}

b.  a {decoration: no underline}

c.  a {text-decoration: none}

d.  a {text-decoration: no underline}

20.  How do you change the font of an element?

a.  font-family:

b.  font=

c.  f:

21.  How do you make the text bold?

a.  font-weight: bold

b.  font: b

c.  style: bold

22.  How do you change the left margin of an element?

a.  text-indent:

b.  margin:

c.  margin-left:

d.  indent:

23.  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 = 1 pixel?

a.  border-width: 5px 20px 10px 1px

b.  border-width: 10px 5px 20px 1px

c.  border-width: 10px 1px 5px 20px

d.  border-width: 10px 20px 5px 1px

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

a.  list-style-type: square

b.  list-type: square

c.  type: square

d.  type: 2

25.  The following diagram represents the box model. Name the features indicated:

Activity - CSS Quiz - Advanced - Using CSS, Selectors and the Box Model.doc Version 1

Page 5 of 5