QCC ET-570 CSS Quiz Week 5 Study Notes

  • What does CSS stand for?
  • What is the correct HTML for referring to an external style sheet?
  • How do you insert a comment in a CSS file?
  • Which is the correct CSS syntax?
  • Which property is used to change the background color?
  • How do you select an element with id "demo"?
  • Which CSS property is used to change the text color of an element?
  • How do you select elements with class name "test"?
  • Be familiar with the “Chania” lab from this week’s class:

ET570 Quiz Week 5 References:

Week 5 content

  1. What does CSS stand for?
    Cascading Style Sheets

Colorful Style Sheets

Computer Style Sheets

Creative Style Sheets

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

Top of Form

<stylesheet>mystyle.css</stylesheet>

<style src="mystyle.css">

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

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

Top of Form

In the <head> section

At the end of the document

In the <body> section

  1. Bottom of Form

Bottom of Form

6. Which is the correct CSS syntax?

Top of Form

{body;color:black;}

{body:color=black;}

body {color: black;}

body:color=black;

Bottom of Form

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

Top of Form

/* this is a comment */

// this is a comment //

// this is a comment

' this is a comment

Bottom of Form

8. Which property is used to change the background color?

Top of Form

background-color

color

bgcolor

Bottom of Form

9. How do you add a background color for all <h1> elements?

Top of Form

h1 {background-color:#FFFFFF;}

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

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

Bottom of Form

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

Top of Form

color

text-color

fgcolor

Bottom of Form

How do you select an element with id "demo"?

Top of Form

#demo

.demo

demo

*demo

Bottom of Form

. How do you select elements with class name "test"?

Top of Form

*test

.test

test

#test

Bottom of Form

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

Top of Form

div.p

div p

div + p

Bottom of Form

How do you group selectors?

Top of Form

Separate each selector with a space

Separate each selector with a comma

Separate each selector with a plus sign

Bottom of Form

  1. How do you create(declare) a function in JavaScript?
  2. How do you call a function named "myFunction"?
  3. How to write an IF statement in JavaScript?
  4. How to write an IF statement for executing some code if "i" is NOT equal to 5?
  5. How does a WHILE loop start?
  6. How can you add a comment in a JavaScript?
  7. How to insert a comment that has more than one line?
  8. What is the correct way to write(declare) a JavaScript array?
  9. How do you declare a JavaScript variable?
  10. Which operator is used to assign a value to a variable?

Page 1