Fina1 Review Questions 1 with Answers Definitions: 1. CSS element. Ans: The HTML tag to which the style applies. Examples: body, h1, p, img, td. 2. CSS property. Ans: The aspect of the element that is being modified. Examples: font-family, color, background-color, text-align. 3. CSS value. Ans: The chosen setting for the property. Examples: Verdana, AliceBlue, Beige, center. In this document-level style body { font-family:Verdana; } body is the element, font-family is the property, and Verdana is the value. 4. Server side programming. Ans: Computations that are performed by the browser using a language like JavaScript. 5. Client side programming. Ans: Computations that are performed by the server, such as updating databases. 6. Alert box. Ans: A popup box, also called message box, that displays a message. To make the alert box disappear, click the OK button. To display an alert box, use the JavaScript line window.alert(message); 7. Status bar. Ans: An area at the extreme lower left of the browser window that can contain output. To display a message in the status bar: window.status = message; 8. Concatenation operator. Ans: Takes two strings, a string and a number or a number and a string and simply sticks them together. The symbol for the concatenation operator is +. If + operates on two numbers, it means addition. 9. Assignment operator. Ans: = is the assignment operator. In the expression x = 2 + y;, the right side 2 + y is computed and then assigned to the left side variable x. 10. Arithmetic operator. Ans: One of these operators: + : addition, - : subtraction, * : multiplication, / : division. They are used for performing computations. 11. Comparison operator. Ans: One of the operators: == : equal to, < : less then, <= : less than or equal to, > : greater than, >= : greater then or equal to, != : not equal to. 12. Builtin function. Ans: A function that comes with JavaScript. It need not be defined by the programmer. Examples of Math builtin functions: Math.sqrt, Math.pow, Math.random, Math.floor. 13. Event handler. Ans: A function that is called in an onclick or onload attritute. Questions. 14. How many spaces does the browser display between a and b?
a b
Ans: 1 1 1 1 The sum of these is 4. 15. Write code to define a button with caption Push Me. Ans: