MIS 3313 - CH 5 & 6

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

16. By default, each block-level element fills up the entire width of its parent element. a. True b. False

*a. True

17. In the default normal flow each block exists on its own line and is displayed from the browser window's top to its bottom. a. True b. False

*a. True

19. "Replaced inline elements" are elements whose content and appearance are defined by some external resource such as <img> or the various form elements. a. True b. False

*a. True

22. Only positioned elements will make use of their z-index. a. True b. False

*a. True

24. Block-level elements will flow from top to bottom, while inline elements flow from left to right within a block. a. True b. False

*a. True

26. When you float multiple items that are in proximity, each floated item in the container will be nestled up beside the previously floated item provided there is room. a. True b. False

*a. True

28. The :hover pseudo-class, and the visibility property can be used to hide and display a larger version of an image when the user moves the mouse over a thumbnail image. a. True b. False

*a. True

29. When using CSS to hide elements on the page, the display property takes an item out of the flow: it is as if the element no longer exists. a. True b. False

*a. True

7. Which of the following is true? a. When using the reserved keyword function and a function name, you are defining what the function does. b. Both the reserved keyword function and its name are required when you are calling the function. c. You can only call a function if you have previously defined all of its parameters using the reserved keyword function. d. all of these are true.

*a. When using the reserved keyword function and a function name, you are defining what the function does

12. The JavaScript method .toString(): a. puts a number is displayable form b. returns the length of a string of characters c. displays the JavaScript on a webpage d. saves the answer to a file

*a. puts a number is displayable form

9. Which of the following is the correct comparison operator for equals? a. = b. == c. != d. !==

*b. ==

20. Block-level elements cannot contain other block-level elements. a. True b. False

*b. False

21. Elements with fixed positioning move when the user scrolls up and down the page. a. True b. False

*b. False

23. For the z-index property, items closest to the viewer (thus on the top) have a smaller z-index value. a. True b. False

*b. False

27. In responsive design, the media queries must be coded in the <meta> tag. a. True b. False

*b. False

1. Which of the following is true regarding JavaScript? a. JavaScript is a full-fledged compiled, object-oriented language. b. JavaScript runs directly inside the browser without the need for the JVM. c. JavaScript is popular for its ability to run on any platform with a JVM installed. d. JavaScript is object oriented in that the objects in JavaScript are class-based.

*b. JavaScript runs directly inside the browser without the need for the JVM.

JavaScript was first introduced by __________. a. Microsoft b. Netscape c. Oracle d. Adobe

*b. Netscape

15. Which of the following statements is false concerning CSS Preprocessors? a. Developers can take advantage of programming concepts such as variables and functions. b. The main advantage of CSS preprocessors is that developers need not write any CSS at all. c. CSS preprocessors are programs that generate CSS. d. A CSS preprocessor can provide additional functionality not available in CSS

*b. The main advantage of CSS preprocessors is that developers need not write any CSS at all.

2. Which of the following is an inline element by default? a. <div> b. <p> c. <h1> d. <span>

<span>

1. Which of the following is a block level element by default? a. <span> b. <img> c. <ul> d. <a>

<ul>

18. JavaScript relies on server-side processing to execute the code. a. True b. False

FALSE

18. It is impossible to change the display behavior of a block-level element to inline even if you are using CSS. a. True b. False

False

19. Flash applets require the Java Plug-in to run on the client machine. a. True b. False

False

22. JavaScript is the client-side implementation of the Java programming language, both developed by Sun Java in collaboration with Oracle. a. True b. False

False

23. A key feature in AJAX programming is that the asynchronous data requests require a response from the server before the next lines of code can be executed. a. True b. False

False

25. One way to center a containing block element on the page is to use { float: center; } in your CSS. a. True b. False

False

27. Like many programming languages, JavaScript variable declarations require a data type such as int, char or string. a. True b. False

False

29. There are objects that are included in the JavaScript language; but you cannot define your own kind of objects. a. True b. False

False

30. When using CSS to hide elements on the page, the visibility property takes an item out of the flow: it is as if the element no longer exists. a. True b. False

False

32. A JavaScript event is an action that can be detected by JavaScript, which can only be triggered by user interaction. a. True b. False

False

14. Which of the following is NOT an advantage of grid systems? a. Grid systems make it easier to create multicolumn layouts. b. Grid systems can be used as a way to achieve visual uniformity in a design, making the elements on the page look planned and harmonious. c. Grid systems increase your ability to closely control the styling on your page without causing conflicts. d. Text and graphics can more easily be aligned and sized according to the grid system's pre-defined CSS classes for the grids.

Grid systems increase your ability to closely control the styling on your page without causing conflicts.

3. Which of the following is considered server-side scripting? a. Flash objects b. Java applets c. JavaScript d. PHP

PHP

12. Which of the following is not a key component of responsive design? a. Customizing the CSS for different viewports using media queries. b. Setting viewports via the <meta> tag c. Relying on inline styles to limit inheritance d. Scaling images to the viewport size

Relying on inline styles to limit inheritance

20. Java applets require the Java Runtime Environment to run on the client machine. a. True b. False

True

21. JavaScript is an implementation of a standardized scripting language called ECMAScript. a. True b. False

True

24. Any text within the opening and closing <noscript> ... </noscript> tags will be displayed only to users without the ability to load JavaScript. a. True b. False

True

25. The principles of Graceful Degradation and Progressive Enhancement are implemented differently, but either strategy can successfully be used to accommodate users with older browsers. *a. True b. False

True

26. In JavaScript a variable can be an integer then later can be a string if so desired. a. True b. False

True

28. Variable assignment can happen at declaration-time by appending the value to the declaration, or at run time with a simple right-to-left assignment. a. True b. False

True

30. Concatenation can be written in either of the following ways:var str = greet.concat("Morning"); var str = greet + "Morning"; a. True b. False

True

31. To interact with the HTML document in which it is contained, JavaScript uses the Document Object Model also referred to as the DOM Tree. a. True b. False

True

10. An approach in which a design is adapted to increasingly advanced devices and browsers is called: a. progressive enhancement b. backward compatibility c. graceful degradation d. content first

a. progressive enhancement

10. If A is true and B is false, which of the following results is returned for these the Boolean operators based on the truth tables? a. A && B is true b. A || B is true c. A || B is false d. A ! B is false

b. A || B is true

3. Use ________ positioning to slightly change the location of an element in relation to where it would otherwise appear when rendered by a browser. a. absolute b. float c. relative d. z-index

relative

13. The Bootstrap framework was originally created by____________. a. the designers at Twitter b. the designers at Adobe c. the designers at Apple d. the designers at Google

the designers at Twitter

14. Which is true about the JavaScript statement var x = 3? a. The variable x has been declared but not initialized. b. The variable x has been declared and initialized. c. The variable x has been initialized but not declared. d. The variable x has not been declared nor initialized.

*b. The variable x has been declared and initialized.

16. What is the value of jobs[2] in the following section of code?var jobs= new Array("Programming", "Database management", "Web Design"); a. Programming b. Database management c. Web Design d. The array has been declared but no values have been assigned.

*c. Web Design

6. When we say that JavaScript variables are a dynamically typed we mean that a. JavaScript functions run sequentially in the order that the script was typed. b. it doesn't matter where the JavaScript code is typed on the page. c. a variable type can be an integer, and then later a string, then later an object. d. a variable type cannot be changed after the variable has been initialized.

*c. a variable type can be an integer, and then later a string, then later an object.

13. If you want to execute one set of statements when a condition evaluates to false and another set of statements when the condition evaluates to true, the best statement to use is a(n) _____. a. if...then statement b. case statement c. if...else statement d. if statement

*c. if...else statement

15. Which of the following are correct syntax for JavaScript comments? a. // My comments b. /* My comments and some more comments */ c. /* More comments */ d. All of these are correct

*d. All of these are correct

8. Which of the following is true about the alert( ) function a. The alert( ) function makes the browser show a pop-up to the user. b. The alert( ) function obscures the underlying webpage. c. The user has to click OK before any other actions can be taken. d. All of these are true.

*d. All of these are true.

11. The JavaScript function to place the date on a page is: a. Now( ) b. Math.Date( ) c. Math.Today( ) *d. Date ( )

*d. Date()

2. Which of the following is NOT an advantage of client-side scripting? a. Processing can be offloaded from the server to client machines. b. The browser can respond more rapidly to user events than a request to a remote server could. c. Client-side scripting reduces the load on the server. d. Idiosyncrasies between various browsers and operating systems make it easy to test for all potential client configurations.

*d. Idiosyncrasies between various browsers and operating systems make it easy to test for all potential client configurations.

5. Of the following web clients, which will run JavaScript by default? a. a screen reader used for Accessibility purposes for the visually impaired. b. a text-based browser like Lynx c. an automated software agent like a web crawler client d. the default browser on an iPhone

*d. the default browser on an iPhone

7. Scenario 2: Josh wants a three column layout for his profile page. He creates a div with an ID named main as a wrapper for all the page content. Then he adds the three divs for the columns and wants to use CSS to float them side by side on the page. Select the true statement below based on Josh's code: a. The three columns display side by side as Josh intended. b. Only two columns display side by side because there isn't enough room in the main container div for the third column to fit side by side in its container. c. Josh could float the third column (col3) to the right so that it will line up correctly on the top margin and fit within the main container div. d. Josh could change the width of the main container div to 100% to allow his three columns to fit side by side on any screen size or device.

b. Only two columns display side by side because there isn't enough room in the main container div for the third column to fit side by side in its container.

9. Scenario 2: Josh wants a three column layout for his profile page. He creates a div with an ID named main as a wrapper for all the page content. Then he adds the three divs for the columns and wants to use CSS to float them side by side on the page. In Josh's code below, what does the class .clear do? a. It forces the footer to break clear of the main container div and be absolutely positioned. b. It forces the three column divs to display side by side on the page. c. It forces the footer to display on a new row underneath the column divs. d. It forces the footer background color to be transparent and inherit the main container background color.

c. It forces the footer to display on a new row underneath the column divs.

6. Scenario 1: Liz is starting to work on the layout for her personal portfolio website. After creating an HTML document she codes a new div element with an ID named container right after opening body tag that will serve as a wrapper for all of the content that appears on the webpage. She configures the CSS styles as follows:#container { margin-left: auto; margin-right: auto;width: 960px; } What effect will these new rules have on the web page display? a. The container div will be centered in the browser window and will automatically reflow the content when the browser window is smaller than 960 pixels in width. b. The left and right margins around the container div will automatically have a fixed width of 960 pixels. c. The container div will always have a fixed width of 960 pixels and will be centered in the browser window. d. All the written text content inside the container div will automatically be center aligned on the webpage and limited to a fixed width of 960 pixels.

c. The container div will always have a fixed width of 960 pixels and will be centered in the browser window.

17. What does the following JavaScript code do (assume it is in a script element)?function myFcn( a, b, c ){ var q = b; q = c; return q;}var x = myFcn( 1, "stuff", "whatever" ); document.write( "<p>" + x + "</p>" ); a. Writes the number 1 to the web page. b. Writes the string stuff to the web page. c. Writes the string whatever to the web page. d. Nothing as there is an error in the code.

c. Writes the string whatever to the web page.

5. To stop elements from flowing around a floated element, use the ___________ property. a. float-none b. clear c. clear-float d. clear-both

clear

11. Which of the following is NOT a benefit of the mobile first design approach? In other words, which of the following is false? a. It accommodates an increasingly larger audience accessing websites from mobile devices. b. Designing the mobile version first forces designers to focus on the most important content first. c. Implementation of the mobile version of the site is not likely to be merely an afterthought. d. Mobile first design always eliminates the need for progressive enhancement for larger screen sizes.

d. Mobile first design always eliminates the need for progressive enhancement for larger screen sizes.

4. ________ will cause an element to not display when the page is rendered by a browser. a. display: block; b. display: none; c. display: hide; d. display; 0%;

display:none;

8. Scenario 2: Josh wants a three column layout for his profile page. He creates a div with an ID named main as a wrapper for all the page content. Then he adds the three divs for the columns and wants to use CSS to float them side by side on the page. Based on Josh's code below, which CSS layout approach has he used? a. fixed b. liquid c. hybrid d. responsive

fixed


Ensembles d'études connexes

Economics Review (Chapter 12) - Money Growth and Inflation

View Set

Sensors, Optical Encoders, LVDTs

View Set

Management of Patients with Oncologic Disorders (Chapter 15)

View Set

NSG 460 Exam 6 Practice Questions

View Set