Sams Teach Yourself JavaScript in 24 Hours

Sams Teach Yourself JavaScript in 24 Hours

By Michael Moncur

Quiz

Test your knowledge of the JavaScript techniques you used in this hour by answering the following questions.

Questions

1:

Which of these properties can you use to show or hide an element of a document and have the remainder of the document expand or collapse to fill the space?

  1. style.visibility
  2. style.display
  3. style.collapse
A1:

b. The style.display property can hide or show an object and the rest of the document is reformatted accordingly.

2:

Which HTML tags are typically used to define layers?

  1. <div> or <body>
  2. <span> or <script>
  3. <div> or <span>
A2:

c. The <div> or <span> tags are typically used to define layers.

3:

Which of the following properties prevents the scrolling window text from showing below the window?

  1. overflow: hidden
  2. border-style: solid
  3. position: relative
A3:

a. The overflow: hidden property prevents the text from showing below the window.

Share ThisShare This

Informit Network