CIS101 Practice Test - Pace



CIS101 Practice Test for HTML and JavaScript

These are samples of the type of questions you will be asked during the CIS101 in class exam. The exam will be closed book, closed notes. You will be able to use help for 1st Page 2000. Solutions to these questions will be distributed next week.

During the exam you will produce an html document. The JavaScript portion of this exam will be administered on paper. You will need to be able to save your html files and submit it to your instructor via the digital dropbox.

The final exam will not be restricted to the topics covered in this practice exam. These are only samples of the type of questions that will be asked. All of the material covered for HTML and JavaScript is eligible for the final exam.

That includes:

• HTML projects 1-3, 6

• JavaScript all materials except Lesson 4

Part 1: HTML

Write the html code that creates the following Web document. During the exam you will be able to refer the attached HTML Quick Reference (see last page).

1. Set the title equal to Santini Pizza

2. Set the document back color to the color code 94d6e7

3. Start with a centered level 1 (H1) heading with the text “Santini Pizza”

4. Add a horizontal rule separator

5. Display the following text as below. Santini Pizza should be in bold. Include a hyperlink to the Web address , with the linked text being the words “fantastic review”. Also include an e-mail link to orders@.

Santini Pizza has been in business for the past 50 years. We specialize in unique

pizzas and other Italian dishes. Located on Main Street, Santini Pizza is proud to be on the city's "Ten Best Restaurants" list for the past seven years. Here is a link to our latest fantastic review.

Call 1-219-555-2510 for reservations or orders today, or e-mail your order to

orders@.

6. Insert a level 2 leading (H2) with font color equal to red, text equal to “Our services include:”

7. Insert a bulleted list with the following text. The last bullet should be bold, italic.

• Take out orders

• Delivery services at no charge

• Dozens of toppings available

• The best pizza in town!

8. Insert a level 3 heading (H3) with font color equal to green, text equal to “Specials this week! Order by number:”

9. Insert a numbered list (ordered list) with the following elements

1. Large pepperoni pizza - $11

2. Meatball hero - $4.99

3. Personal pan pizza, choice of one topping - $2.99

4. Chicken parmigiana with spaghetti - $6.99

10. Display an image of the Italian flag centered with a width of 250 and a height of 155. The file name is Italian-Flag.gif.

11. End the page with another horizontal rule separator.

12. Save your html file with the following name:

yourlastname_yourfirstinitial_exam.htm

(the same format as other assignments you have submitted)

Your Web document should look like this when you are done:

[pic]

JavaScript

1. JavaScript is an example of an interpreted language. Explain what an interpreter does.

2. Give an example of a variable you used in one of your JavaScript programs. Describe how programming languages use variables.

3. If the following code were to execute in a JavaScript, describe what would appear in a Web document:

document.write(“Today is ”,Date(), “”);

4. What is the purpose of the tag?

5. Why do programmers include comments in their code?

6. What is meant by the term concatenation?

7. After the following code executes what will display on the screen:

var length=4.1;

var width = 2.0;

document.write(“The area of the rectangle is equal to “ + length*width)

8. Describe what the following code does:

var radius=10:

document.write(“The area of the circle is “ + radius*radius*Math.PI);

9. Given the following code:

var firstName = prompt(“Enter your first name: “,””);

Add code that does the following:

Add a second prompt statement that asks the user to enter their last name. Create a variable named lastName to store the answer entered by the user.

Add a document.write statement that displays the name in the following format:

last name, first name

For example, the name Sally Jones would display as

Jones, Sally

Hint: use concatenation.

10. Explain what the difference is between an event and an event handler.

11. Give an example of an event and its corresponding event handler.

12. Explain the difference between onMouseOver and onMouseOut.

CIS101 HTML QUICK REFERENCE

This document will be available to you during your in class exam.

| | | |

|Type |Tag |Description |

| | |Creates an HTML document |

|Basic | | |

| | |Sets off the title and other information that isn't displayed on |

| | |the Web page itself |

| | |Sets off the visible portion of the document |

| | |Puts the name of the document in the title bar. Must be in the |

| | |header i.e. |

|Body Attributes | |Sets the background color, using name or hex value |

| | |Sets the text color, using name or hex value |

| | |Sets the foreground color, using name or hex value |

|Text | through |Creates the largest headline (h1) through smallest headline (h6) |

| | |Creates bold text |

| | |Creates italic text |

| | |Sets font color, using name or hex value |

| | |Centers both text and images |

| | |Creates a hyperlink |

|Link | | |

| | |Creates a mailto link |

| | |Creates a target location within a document |

| | |Links to that target location from elsewhere in the document |

|List | |Creates a numbered list. precedes each list item |

| | |Creates an unordered or bulleted list. precedes each list |

| | |item |

|Divider | |Creates a new paragraph, closing tag often unnecessary |

| | |Inserts a Line break |

| | |Inserts a horizontal rule |

| | | |

|Image | |Adds an image. Width and height attributes represent the size of |

| | |image in pixel or percentage |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download