Вы находитесь на странице: 1из 11

Javascript Fundamental Quiz

1) You are a junior web designer. Your company assigns you to work on a JavaScript project. Which of the following are the 
advantages of using JavaScript for form validation? 
       a) Conservation of client CPU resources 
       b) Increased validity of form submission 
       c) Conservation of bandwidth 
       d) Increase end­user satisfaction 
       e) Either BCD 

2) Your company assigns you to work on a JavaScript project. With the DATE object, which of the following allows you to call a 
function based on an elapsed time? 
       a) setElapsedTime() 
       b) Timeout() 
       c) setTimeout() 
       d) setTime() 

3) You are working on a JavaScript project. What is used to restart the inner most loop? 
       a) Abort 
       b) Breakloop 
       c) Stop 
       d) Continue label 

4) You work on a JavaScript project. Which of the following correctly describe the relationships of JavaScript and "objects"? 
       a) JavaScript is Object­oriented 
       b) JavaScript is Object­based 
       c) JavaScript is Object­driven 
       d) JavaScript has no relationship with objects 

5) You work on a JavaScript project. How do you prompt users with messages and at the same time requesting user inputs? 
       a) Alert() 
       b) Display() 
       c) Prompt() 
       d) Confirm() 

6) Which of the following is the correct syntax of FOR? 
       a) for ( increment; initialize; test) 
       b) for ( initialize; test), increment 
       c) for ( initialize; test; increment) 
       d) for ( test; initalize; increment) 
7) In your JavaScript code, how do you find out which character occurs at the 5th position in a string "How are you"? 
       a) Substring() 
       b) String() 
       c) Stringlength() 
       d) CharAt() 

8) Which of the following do you use for a multi­way branch?
       a) If 
       b) Ifthen 
       c) Ifelse 
       d) switch 
       e) for 

9) You want to design a form validation mechanism. Using string methods, which of the following are the steps involved ?
       a) Check for the presence of certain characters 
       b) Check the position of substrings 
       c) Test the length of data 
       d) Check the variable type of the strings 
       e) Either ABC 

10) Which of the following is the minimum browser version that supports JavaScript 
       a) Navigator v2.0 
       b) Mozilla V1.5 
       c) IE 2.0 
       d) Navigator V1.0 

11)  Under which of the following conditions will you need to include semi colons on a line of code? 
       a) When you have multiple statements on multiple lines 
       b) When you have multiple statements on a line 
       c) When you have single statement on multiple lines 
       d) When you have single statement on a line 

12) Which of the following are the valid JavaScript versions?
       a) Version 1.2 
       b) Version 1.1 
       c) Version 1.3 
       d) Version 1.4 
       e) All of the above 

13) Which of the following languages will you consider as being similar to JavaScript?
       a) C 
       b) C++ 
       c) Pascal 
       d) PHP 
       e) Either A & C 

14) You plan the coding of your project. When must the object references be ready? 
       a) at run time 
       b) at compile time 
       c) at debug time 
       d) at code time 

15) Which of the following correctly describe cookies ?
       a) Often referred to as "persistent cookies" 
       b) Often referred to as "persistent HTML" 
       c) Small memory­resident pieces of information sent from a server to the client 
       d) Small memory­resident pieces of information sent from a client to the server 
       e) Either AB&C 

16) A program written by JavaScript is driven by
       a) Events 
       b) Classes 
       c) Objects 
       d) DLL 
       e) Components 

17) What are JavaScript relations with the underlying operating platform? 
       a) Platform dependent 
       b) Platform linkage 
       c) Platform independent 
       d) Platform binding 

18) When you plan for the JavaScript variable names, the first character must be?
       a) Underscore 
       b) Comma 
       c) Hyphen 
       d) Letter 
       e) Either A&D 

19) Which of the following correctly describe JavaScript as a language? 
       a) It is based on object creation 
       b) It focuses on component building 
       c) It focuses on logic flow 
       d) It emphasis on SCRIPTING 

20) When authoring web page with Javascript, why should you explicitly include the window object into your codes? 
       a) this is a good practice 
       b) this is REQUIRED 
       c) this ensures browser compatibility 
       d) this ensures OS compatibility 

XML

XML Quiz
There are 22 questions in this quiz. Good luck! 
Passing grade is 70% = C. 

1) What does XML stand for?
       a) eXtensible Markup Language 
       b) X­Markup Language 
       c) Example Markup Language 
       d) eXtra Modern Link 

2) Which of the following is (are) a valid XML name(s)?
       a) 1­2­4_6 
       b) :3:­3:5:­7 
       c) ;123456 
       d) 3:4;­7 

3) DOM 2 doesn't provide mechanism for interrogating and modifying the namespace for a document.
       a) True 
       b) False 

4) The DOM specification describes how strings are to be manipulated by the DOM by defining the datatype _______. It is encoded 
using _______ encoding scheme.
       a) DOMString, UTF­8 
       b) DOMString, Unicode 
       c) UNICODEString, Unicode 
       d) String, Unicode 
5) An MNC receives at its headquarter from its subsidiaries, XML documents containing various reports of that subsidiary. These 
reports need to be displayed to the person responsible at the headquarter for that subsidiary in a user­friendly manner (allowing 
searches through the document) and the person is allowed to make any changes/comments that he/she desires. Once the user is done 
with all the changes/comments the information needs to be fed into the central database. Which of the following is MOST appropriate 
for processing these XML documents?
       a) DOM 
       b) SAX 
       c) CSS 
       d) XSL 

6) Which of the following is an XML­based service IDL that defines the service interface and its implementation characteristics.
       a) UDDI 
       b) WSDL 
       c) SOAP 
       d) Path 

7) Which statement about XML is true?
       a) Elements may nest but not overlap 
       b) Quoting attributes is optional 
       c) Elements may have multiple attributes with the same name 

8) What is the correct declaration syntax for the version of XML document?
       a) <?xml version="1.0" /> 
       b) <?xml version="1.0"?> 
       c) <xml version="1.0" /> 

9) How is an empty element field defined?
       a) <name></name 
       b) <name /> 
       c) <name/> 
       d) All of the above 

10) XML document must be valid?
       a) True 
       b) False 

11) Every XML document must be well formed
       a) True 
       b) False 
12) Every XML document must have an associated DTD or schema
       a) True 
       b) False 

13) XML preserves white spaces
       a) True 
       b) False 

14) For the XML parser to ignore a certain section of your XML document, which syntax is correct?
       a) <![CDATA[ Text to be ignored ]]> 
       b) <xml:CDATA[ Text to be ignored ]> 
       c) <PCDATA> Text to be ignored </PCDATA> 
       d) <CDATA> Text to be ignored </CDATA> 

15) What is a correct way of referring to a stylesheet called "style.xsl"?
       a) <stylesheet type="text/xsl" href="style.xsl" /> 
       b) <link type="text/xsl" href="style.xsl" /> 
       c) <?xml­stylesheet type="text/xsl" href="style.xsl" ?> 

16) Which is not a correct name for an XML element?
       a) <first name> 
       b) <age> 
       c) <NAME> 

17) What does DTD stand for?
       a) Document Type Definition 
       b) Dynamic Type Definition 
       c) Direct Type Definition 

18) What makes XML more powerful than HTML?
       a) Not as much coding is needed 
       b) Its ability to adapt to new uses 
       c) The fact that its supported by all of the major software vendors 

19) Unlike most other markup languages, including HTML, XML allows you to do what?
       a) Create new tags 
       b) Exchange information over the Web 
       c) Put your tags in any order, with closing tags optional 

20)  In what year did the World Wide Web Consortium release its draft of XML?
       a) 1994 
       b) 1995 
       c) 1996 
       d) 1997 

21) What organization presented the first version of Starndardized Generalized Markup Language (SGML) in 1980?
       a) Internet Engineering Task Force (IETF) 
       b) IEEE 
       c) American National Standards Institute (ANSI) 
       d) OASIS 

22) You can use XSL Transformation (XSLT) to convert database files described by XML to Structured Query Language (SQL) 
statements, which creates the tables, indexes and views that the XML data describes.
       a) True 
       b) False 

CSS Quiz
There are 26 questions in this quiz. Good luck! 
Passing grade is 70% = C. 

1) What does CSS stand for?
       a) Creative Style Sheets 
       b) Computer Style Sheets 
       c) Cascading Style Sheets 
       d) Cascade Style Sheets 
       e) Colorful Style Sheets 

2) Where in an HTML document is the correct place to refer to an external style sheet?
       a) In the <body> section 
       b) At the end of the document 
       c) At the top of the document 
       d) In the <head> section 
       e) Between head and body 

3) Which HTML tag is used to define an internal style sheet?
       a) css 
       b) text/style 
       c) style 
       d) script 

4) Which HTML attribute is used to define inline styles?
       a) font 
       b) styles 
       c) css 
       d) text 
       e) style 

5) Which is the correct CSS syntax?
       a) body {color: black} 
       b) body:color=black 
       c) {body:color=black(body} 
       d) {body;color:black} 

6) How do you insert a comment in a CSS file?
       a) /* this is a comment */ 
       b) ' this is a comment 
       c) // this is a comment // 
       d) // this is a comment 

7) Which property is used to change the background color?
       a) bgcolor: 
       b) background­color: 
       c) color: 

8) How do you add a background color for all "<h1>" elements?
       a) all.h1 {background­color:#FFFFFF} 
       b) h1.all {background­color:#FFFFFF} 
       c) h1 {background­color:#FFFFFF} 

9) How do you change the text color of an element?
       a) text­color: 
       b) color: 
       c) text­color= 
       d) font­color: 
10) Which CSS property controls the text size?
       a) font­style 
       b) text­style 
       c) font­size 
       d) text­size 

11) What is the correct CSS syntax for making all the <p> elements bold?
       a) p {text­size:bold} 
       b) p {font­weight:bold} 
       c) style:bold 
       d) p{font:bold} 

12) How do you display hyperlinks without an underline?
       a) a {decoration:no underline} 
       b) a {text­decoration:no underline} 
       c) a {underline:none} 
       d) a {text­decoration:none} 

13) How do you make each word in a text start with a capital letter?
       a) text­transform:uppercase 
       b) text­transform:capitalize 
       c) You can't do that with CSS 

14) How do you change the font of an element?
       a) fon­face: 
       b) font­family: 
       c) f: 
       d) font­style: 

15) How do you make the text bold?
       a) font:b 
       b) style:bold 
       c) font­weight:bold 

16) How do you display a border like this: The top border = 10 pixels, The bottom border = 5 pixels, The left border = 20 pixels, The 
right border = 1pixel?
       a) border­width:10px 20px 5px 1px 
       b) border­width:10px 1px 5px 20px 
       c) border­width:10px 5px 20px 1px 
       d) border­width:5px 20px 10px 1px 
17) How do you change the left margin of an element?
       a) padding: 
       b) indent: 
       c) margin: 
       d) text­indent: 
       e) margin­left: 

18) To define the space between the element's border and content, you use the padding property, but are you allowed to use negative 
values?
       a) Yes 
       b) No 

19) How do you make a list that lists its items with squares?
       a) type: square 
       b) list­style­type: square 
       c) list­type: square 
       d) style­list: square 

20) What is the correct HTML for referring to an external style sheet?
       a) <link rel="stylesheet" type="text/css" href="mainstyle.css"> 
       b) <style src="mainstyle.css"> 
       c) <stylesheet>mainstyle.css</stylesheet> 
       d) <link url="stylesheet" type="text/css" href="mainstyle.css"> 

21) Which HTML tag is used to define an internal style sheet?
       a) <script> 
       b) <css> 
       c) <stylesheet> 
       d) <style> 

22) Which HTML attribute is used to define inline styles?
       a) styles 
       b) class 
       c) font 
       d) style 

23) What is the correct CSS syntax for making all the <p> elements bold?
       a) p {font­weight:bold} 
       b) p {text­size:bold} 
       c) <p style="text­size:bold"> 
       d) <p style="font­size:bold"> 

24) How do you make each word in a text start with a capital letter?
       a) text­transform:capitalize 
       b) ext­transform:uppercase 
       c) You can't do that with CSS 

25) How do you change the left margin of an element?
       a) left­margin: 
       b) margin: 
       c) margin­left: 
       d) text­indent: 

26) What are the three methods for using style sheets with a web page
       a) Dreamweaver, GoLive or FrontPage 
       b) Inline, embedded or document level and external 
       c) Handcoded, Generated or WYSIWYG 

Вам также может понравиться