Q1.
A Text Stream Object allows you to access (read/write) the contents
of text files stored on the web server.
Correct Answer : T
Your Answer :
QuestionID : 10336 Subject Name HTML
Q2. Which type of internet address is unique?
1. DNS
2. Default Gateway
3. ISP
4. IP
Correct Answer : 4
Your Answer :
QuestionID : 10345 Subject Name HTML
Q3. _________ is Javascript`s default object
1. Document
2. Window
3. Browser
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10348 Subject Name HTML
Q4. It is considered permissible to use heading tags for general font formatting
when designing for greater web accessibility.
Correct Answer : T
Your Answer :
QuestionID : 10349 Subject Name HTML
Q5. What is the correct syntax for referring to an external script called "xxx.js"?
1. < script src="xxx.js">
2. < script href="xxx.js">
3. < script name="xxx.js">
4. < script ="xxx.js">
Correct Answer : 1
Your Answer :
QuestionID : 10351 Subject Name HTML
Q6. When making a 2-window frameset, you must name the windows "menu" and "main”?
Correct Answer : F
Your Answer :
QuestionID : 10355 Subject Name HTML
Q7. Use < td> and < /td > to add ___________ to your tables
1. steps
2. columns
3. rows
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10366 Subject Name HTML
Q8. < SPAN>, < B> and < I> are examples of what _________ tags
1. Inline tags
2. Block tags
3. Price tags
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10368 Subject Name HTML
Q9. What is the correct JavaScript syntax to write "Hello World"?
1. "Hello World"
2. document.write("Hello World")
3. response.write("Hello World")
4. ("Hello World")
Correct Answer : 2
Your Answer :
QuestionID : 10378 Subject Name HTML
Q10. ________ is NOT a valid CSS selector
1. ID selectors
2. HEAD selectors
3. TAG selectors
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10379 Subject Name HTML
Q11. How are sessions maintained?
1. The browser sends a cookie to the server with each request.
2. The browser sends a QueryString variable to the server with each request.
3. The browser sends a hidden Form variable to the server with each request.
4. The browser sends a long variable to the server in the BODY of each
request.
Correct Answer : 1
Your Answer :
QuestionID : 10381 Subject Name HTML
Q12. __________ is NOT a valid value for the visibility property
1. Hidden
2. Visible
3. Middle
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10384 Subject Name HTML
Q13. When does the application OnEnd event handler fire?
1. After every request for an application document, since web servers are
stateless servers.
2. As soon as there are no open connections to any application document.
3. When the web server is stopped in an orderly fashion.
4. When there are no application requests for the amount of time defined by
the SessionTimeout variable.
Correct Answer : 3
Your Answer :
QuestionID : 10387 Subject Name HTML
Q14. The _____ is used as a template for defining the user interface for your web
class.
1. HTML page
2. browser
3. internet
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10394 Subject Name HTML
Q15. "< %=" is the same as ______________
1. Document.Write
2. < %
3. Response.Write
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10396 Subject Name HTML
Q16. Abandon is an ASP ________ object method.
1. server
2. session
3. response
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10400 Subject Name HTML
Q17. Text files are useful for storing small amounts of information such as the top
ten visited pages in your website. What is the limitation of using this method?
1. a. Cannot password protect a text file.
2. b. Not recommended if the information constantly changes.
3. c. Not very efficient in allowing multiple users accessing it at the same
time.
4. d. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10406 Subject Name HTML
Q18. How does a "for" loop start?
1. for (i = 0; i <= 5)
2. for (i <= 5; i++)
3. for i = 1 to 5
4. for (i = 0; i <= 5; i++)
Correct Answer : 4
Your Answer :
QuestionID : 10407 Subject Name HTML
Q19. ________of these page extensions WILL NOT recognize and execute an include
file
1. .stm
2. .html
3. .asp
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10412 Subject Name HTML
Q20. What is the correct JavaScript syntax to insert a comment that has more than
one line?
1. //This comment has
more than one line//
2. < !--This comment has
more than one line-->
3. /*This comment has
more than one line*/
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10413 Subject Name HTML
Q21. The user must enable __________ for Sessions to work
1. A Microsoft Passport account
2. JavaScript
3. Cookies
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10414 Subject Name HTML
Q22. ActiveX Data Objects (ADO) comes installed with ASP and allows your pages to
easily connect to databases. Which two ADO objects are used to open a connection
and interact with the database?
1. Connection object, RecordingSet object
2. Connection object, Recordset object
3. Connect object, RecordingSet object
4. Connect object, Recordset object
Correct Answer : 2
Your Answer :
QuestionID : 10415 Subject Name HTML
Q23. MapPath is an ASP ________ object method.
1. session
2. request
3. server
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10416 Subject Name HTML
Q24. What is the correct way to write a JavaScript array?
1. var txt = new Array:1=("tim")2=("kim")3=("jim")
2. var txt = new Array="tim","kim","jim"
3. var txt = new Array(1:"tim",2:"kim",3:"jim")
4. var txt = new Array("tim","kim","jim")
Correct Answer : 4
Your Answer :
QuestionID : 10422 Subject Name HTML
Q25. Server-Side Includes (also known as SSI) allows you to do what?
1. Allows you to include server executed code into any ASP application.
2. Allows you to use one file in several different web pages.
3. Allows you to use a piece of code more than once.
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10429 Subject Name HTML
Q26. The following snippet of code is an example of ______ type of connection
MyConn.Open "MailingList"
1. DSN
2. DSN-less
3. Neither
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10430 Subject Name HTML
Q27. How do you put a message in the browser`s status bar?
1. statusbar = "put your message here"
2. window.status("put your message here")
3. window.status = "put your message here"
4. status("put your message here")
Correct Answer : 3
Your Answer :
QuestionID : 11635 Subject Name HTML
Q28. The ___________ color is the default color of a hyperlink.
1. green
2. blue
3. red
4. yellow
Correct Answer : 2
Your Answer :
QuestionID : 11647 Subject Name HTML
Q29. HTML supports 6 different levels of headings.
Correct Answer : T
Your Answer :
QuestionID : 11651 Subject Name HTML
Q30. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11655 Subject Name HTML
Q31. START alters the numbering sequence in the middle of an Ordered list.
Correct Answer : F
Your Answer :
QuestionID : 11659 Subject Name HTML
Q32. Once the screen is divided into different sections, each section can be loaded
with a different HTML document using the _____________tag.
1. Frame tag
2. Body tag
3. Anchor tag
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11665 Subject Name HTML
Q33. Methods are used to read or modify the data contained in an object.
Correct Answer : T
Your Answer :
QuestionID : 11671 Subject Name HTML
Q34. A filename always has to be mentioned before the # symbol in the HREF
attribute of a link.
Correct Answer : F
Your Answer :
QuestionID : 11672 Subject Name HTML
Q35. The ______________ attribute of the < FORM> tag points to the URL of a program
on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 11682 Subject Name HTML
Q36. The name Cookie has a special significance with respect to object oriented
programming language.
Correct Answer : F
Your Answer :
QuestionID : 14249 Subject Name HTML
Q37. ________ and ________attributes are used to control the size of the image on
the web page.
1. Height ……width
2. Height……length
3. Size and width
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14250 Subject Name HTML
Q38. The___________attribute takes text to be displayed in case the Browser is
unable to display the image specified in the SRC attribute.
1. Title
2. Alt
3. Src
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14251 Subject Name HTML
Q39. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14252 Subject Name HTML
Q40. The distance between the data in a cell and the boundaries of the cell is
controlled by __________attribute.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14254 Subject Name HTML
Q41. The form tag has two properties namely ____________ and ____________.
1. Method, Action
2. SRC, Link
3. Submit, post
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14259 Subject Name HTML
Q42. HTML tags are of two types:
Paired Tags
Singular Tags
Correct Answer : T
Your Answer :
QuestionID : 14262 Subject Name HTML
Q43. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14266 Subject Name HTML
Q44. START alters the numbering sequence in the middle of an Ordered list.
Correct Answer : F
Your Answer :
QuestionID : 14267 Subject Name HTML
Q45. ___________ enable a Web page to be broken into different sections.
1. pages
2. Frames
3. Sections
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14277 Subject Name HTML
Q46. The vertical or the horizontal alignment for every cell in a given row is
controlled by using the VALIGN and ALIGN attributes in the row`s < TR> tag.
Correct Answer : T
Your Answer :
QuestionID : 14283 Subject Name HTML
Q47. The ______________ attribute of the < FORM> tag points to the URL of a program
on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 14287 Subject Name HTML
Q48. The Post method sends data captured by the form elements to the web server,
encoded as part of the URL that points to the web server.
Correct Answer : F
Your Answer :
QuestionID : 14289 Subject Name HTML
Q49. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 14291 Subject Name HTML
Q50. As Soon as the < FORM >< /FORM > tags are encountered by the browser, the
browse creates an array called form 1
in the absence of a Form name being specified in the HTML code.
Correct Answer : T
Your Answer :
Q1. What is the correct way to include the file "time.inc"?
1. < % #include file="time.inc" %>
2. < !--#include file="time.inc"-->
3. < include file="time.inc">
4. < % include file="time.inc" %>
Correct Answer : 2
Your Answer :
QuestionID : 10329 Subject Name HTML
Q2. Most search engines give serious importance to meta tags when ranking websites
in
their listings
Correct Answer : T
Your Answer :
QuestionID : 10333 Subject Name HTML
Q3. To keep the browser from performing a script as soon as it is loaded you need
to write the script as a _______
1. delay
2. performance
3. function
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10335 Subject Name HTML
Q4. How do you create a FileSystemObject?
1. Server.CreateObject("FileSystemObject")
2. Server.CreateObject("Scripting.FileSystemObject")
3. Create("FileSystemObject")
4. Create Object:"Scripting.FileSystemObject"
Correct Answer : 2
Your Answer :
QuestionID : 10336 Subject Name HTML
Q5. Which type of internet address is unique?
1. DNS
2. Default Gateway
3. ISP
4. IP
Correct Answer : 4
Your Answer :
QuestionID : 10346 Subject Name HTML
Q6. The major difference between the <br> and <p> tag is that <br> forces a
break with a white space, whereas <p> is essentially just a line return.
Correct Answer : T
Your Answer :
QuestionID : 10353 Subject Name HTML
Q7. Hex-colors are the only way to define colors on the web?
Correct Answer : F
Your Answer :
QuestionID : 10354 Subject Name HTML
Q8. Settings for columns (<td> tag) have higher priority than settings for rows
(<tr> tag)
Correct Answer : T
Your Answer :
QuestionID : 10361 Subject Name HTML
Q9. Adding _top to a link within a frameset does what ?
1. cancels all frames, loads in full browser window
2. loads page in parent frame
3. loads the page into the current window loads the page into the current
window
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10369 Subject Name HTML
Q10. What is the correct HTML for referring to an external style sheet?
1. < stylesheet>mystyle.css
2. < link rel="stylesheet" type="text/css" href="mystyle.css">
3. < style src="mystyle.css">
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10370 Subject Name HTML
Q11. How to display hyperlinks without an underline?
1. a {underline:none}
2. a {text-decoration:no underline}
3. a {text-decoration:none}
4. a {decoration:no underline}
Correct Answer : 3
Your Answer :
QuestionID : 10374 Subject Name HTML
Q12. CSS lets you separate the layout from _______
1. Selectors
2. Content
3. Tables
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10377 Subject Name HTML
Q13. CSS can be added to a page on how many levels?
1. 4 - Tag, Head, External file and Meta tag
2. 2 - Head and External file
3. 3 - Tag, Head and External file
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10378 Subject Name HTML
Q14. ________ is NOT a valid CSS selector
1. ID selectors
2. HEAD selectors
3. TAG selectors
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10383 Subject Name HTML
Q15. What is the correct syntax for referring to an external script called
"xxx.js"?
1. <script src="xxx.js">
2. <script href="xxx.js">
3. <script name="xxx.js">
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10384 Subject Name HTML
Q16. When does the application OnEnd event handler fire?
1. After every request for an application document, since web servers are
stateless servers.
2. As soon as there are no open connections to any application document.
3. When the web server is stopped in an orderly fashion.
4. When there are no application requests for the amount of time defined by
the SessionTimeout variable.
Correct Answer : 3
Your Answer :
QuestionID : 10385 Subject Name HTML
Q17. In a URL, the "http" is considered ________.
1. a scripting language
2. a protocol
3. a server
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10388 Subject Name HTML
Q18. How do you create a function?
1. function=myFunction()
2. function:myFunction()
3. function myFunction()
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10404 Subject Name HTML
Q19. IsClientConnected is a property of ________ ASP object
1. Server
2. Response
3. Session
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10406 Subject Name HTML
Q20. How does a "for" loop start?
1. for (i = 0; i <= 5)
2. for (i <= 5; i++)
3. for i = 1 to 5
4. for (i = 0; i <= 5; i++)
Correct Answer : 4
Your Answer :
QuestionID : 10422 Subject Name HTML
Q21. Server-Side Includes (also known as SSI) allows you to do what?
1. Allows you to include server executed code into any ASP application.
2. Allows you to use one file in several different web pages.
3. Allows you to use a piece of code more than once.
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10425 Subject Name HTML
Q22. How do you find the largest number of 2 and 4?
1. Math.ceil(2,4)
2. top(2,4)
3. ceil(2,4)
4. Math.max(2,4)
Correct Answer : 4
Your Answer :
QuestionID : 10434 Subject Name HTML
Q23. How can you make an e-mail link?
1. < a href="xxx@yyy">
2. < mail href="xxx@yyy">
3. < a href="mailto:xxx@yyy">
4. < mail>xxx@yyy
Correct Answer : 3
Your Answer :
QuestionID : 10952 Subject Name HTML
Q24. HTML elements must always properly nest.
Correct Answer : F
Your Answer :
QuestionID : 10957 Subject Name HTML
Q25. Do not include the XHTML namespace when including XHTML in an XML document.
Correct Answer : F
Your Answer :
QuestionID : 11630 Subject Name HTML
Q26. An HTML document is divided into_________ _________ and the________ ________
sections
1. Head and body
2. Head and tag
3. Images and hyperlinks
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11636 Subject Name HTML
Q27. An Image can be inserted into the HTML page using _________ tag that takes the
name of the image file as an attribute.
1. IMG
2. SRC
3. GIF
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11640 Subject Name HTML
Q28. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11642 Subject Name HTML
Q29. CELLSPACING controls the distance between the data in a cell and the
boundaries of the cell.
Correct Answer : F
Your Answer :
QuestionID : 11660 Subject Name HTML
Q30. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11663 Subject Name HTML
Q31. HTML allows only static text to be displayed on the page.
Correct Answer : T
Your Answer :
QuestionID : 11672 Subject Name HTML
Q32. The ______________ attribute of the < FORM> tag points to the URL of a program
on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 11674 Subject Name HTML
Q33. The ___________button sends the current information held in each field of the
form to the web server for further processing.
1. Reset
2. Submit
3. Command button
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11677 Subject Name HTML
Q34. Information can be stored locally in the browser which can be sent to the
server whenever required by using____________.
1. Variables
2. Local variables
3. Cookies
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 11678 Subject Name HTML
Q35. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 11679 Subject Name HTML
Q36. The Select object allows multiple choices from a list of choices that are
offered.
Correct Answer : T
Your Answer :
QuestionID : 11684 Subject Name HTML
Q37. External Style Sheets can be saved as file using _____________ extensions,
which can link to web pages by the _____________tag.
1. JS , anchor
2. CSS, link
3. VBS, link
4. All of the above
Correct Answer : 2
Your Answer :
QuestionID : 14242 Subject Name HTML
Q38. The tag used for inserting spaces in HTML documents is < MARKER >.
Correct Answer : F
Your Answer :
QuestionID : 14243 Subject Name HTML
Q39. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14244 Subject Name HTML
Q40. Ordered lists are used for Bullets.
Correct Answer : F
Your Answer :
QuestionID : 14249 Subject Name HTML
Q41. ________ and ________attributes are used to control the size of the image on
the web page.
1. Height ……width
2. Height……length
3. Size and width
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14256 Subject Name HTML
Q42. The default HTML page that is delivered to a client connected to a Web Server
is____________.
1. Main Page
2. Template
3. Home Page
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 14259 Subject Name HTML
Q43. HTML tags are of two types:
Paired Tags
Singular Tags
Correct Answer : T
Your Answer :
QuestionID : 14271 Subject Name HTML
Q44. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14275 Subject Name HTML
Q45. ALlGN=LEFT indicates the image is aligned to the left with respect to the
screen.
Correct Answer : F
Your Answer :
QuestionID : 14282 Subject Name HTML
Q46. A filename always has to be mentioned before the # symbol in the HREF
attribute of a link.
Correct Answer : F
Your Answer :
QuestionID : 14284 Subject Name HTML
Q47. Various form elements can be specified as attributes of the _______________
tag.
1. Input tag
2. Name tag
3. Anchor tag
4. Body tag
Correct Answer : 1
Your Answer :
QuestionID : 14286 Subject Name HTML
Q48. ________________ is the only property of the string object.
1. Name
2. Value
3. Length
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 14289 Subject Name HTML
Q49. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 14292 Subject Name HTML
Q50. Date object enables the creation of an object that contains information about
a particular date.
Correct Answer : T
Your Answer : Q1. Given the statement :
“if IsValid(a) Or IsValid(b) Then”,
In the above statement the IsValid(b) function always get called
Correct Answer : F
Your Answer :
QuestionID : 10330 Subject Name HTML
Q2. A variable that your webpage can store on or retrieve from the user’s computer
is known as
1. Java
2. Cookie
3. Applet
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10337 Subject Name HTML
Q3. Web Server is designed to locate, address and send out simple HTML pages to
all other users who access these pages.
Correct Answer : T
Your Answer :
QuestionID : 10344 Subject Name HTML
Q4. Which of the following can you NOT specify with the window.open method?
1. Which browser buttons and menus
2. Email address
3. Size and position of the new window
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10345 Subject Name HTML
Q5. _________ is Javascript`s default object
1. Document
2. Window
3. Browser
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10346 Subject Name HTML
Q6. The major difference between the <br> and <p> tag is that <br> forces a
break with a white space, whereas <p> is essentially just a line return.
Correct Answer : T
Your Answer :
QuestionID : 10347 Subject Name HTML
Q7. In table formatting, the cellspacing attribute declares the amount of white
space around the image or text included within the tag.
Correct Answer : F
Your Answer :
QuestionID : 10356 Subject Name HTML
Q8. < form method="POST" action="mailto:
[email protected]" enctype="text/plain">
< p>What is your gender?
< input type="radio" value="y">yes
< input type="radio" value="n">no
< /p>
< p>Do you smoke?
< input type="radio" value="y" >yes
< input type="radio" value = "n" > no
< /p >
< p> < input type="submit" value="Submit" >
< input type="reset" value="Reset" >< /p >
< /form >
Which of the following is the worst problem in this form?
1. Name attribute not used.
2. Values are similar for both sets of questions.
3. It is no longer legal to request gender information.
4. The action will not return form results.
Correct Answer : 1
Your Answer :
QuestionID : 10359 Subject Name HTML
Q9. How can you make a list that lists the items with circles?
1. < list>
2. < ul>
3. < dl>
4. < ol>
Correct Answer : 2
Your Answer :
QuestionID : 10362 Subject Name HTML
Q10. Request.Form.Count returns ______________
1. The number of characters in the form`s name attribute
2. The number of values submitted in the form
3. The number of seconds since the form was submitted
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10368 Subject Name HTML
Q11. What is the correct JavaScript syntax to write "Hello World"?
1. "Hello World"
2. document.write("Hello World")
3. response.write("Hello World")
4. ("Hello World")
Correct Answer : 2
Your Answer :
QuestionID : 10373 Subject Name HTML
Q12. Where is the correct place to insert a JavaScript?
1. Both the <head> section and the <body> section are correct
2. The <body> section
3. The <head> section
4. none of the above
Correct Answer : 1
Your Answer :
QuestionID : 10375 Subject Name HTML
Q13. CSS can be defined for entire pages by simply adding what to the head section?
1. Script
2. Class structure
3. Style definition
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10377 Subject Name HTML
Q14. CSS can be added to a page on how many levels?
1. 4 - Tag, Head, External file and Meta tag
2. 2 - Head and External file
3. 3 - Tag, Head and External file
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10387 Subject Name HTML
Q15. The _____ is used as a template for defining the user interface for your web
class.
1. HTML page
2. browser
3. internet
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10394 Subject Name HTML
Q16. "< %=" is the same as ______________
1. Document.Write
2. < %
3. Response.Write
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10400 Subject Name HTML
Q17. Text files are useful for storing small amounts of information such as the top
ten visited pages in your website. What is the limitation of using this method?
1. a. Cannot password protect a text file.
2. b. Not recommended if the information constantly changes.
3. c. Not very efficient in allowing multiple users accessing it at the same
time.
4. d. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10401 Subject Name HTML
Q18. __________ ASP property is used to identify a user
1. The Server object
2. The Application object
3. An ASP Cookie
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10402 Subject Name HTML
Q19. Session variables are also popular in that they temporarily store information
on a user-by-user basis as long as the visitor remains active on your site. What is
a limitation of this method?
1. Once the visitor leaves the site, any current information is lost such as
the contents in a shopping cart.
2. A user may elect not to accept a session variable
3. Both a & b options
4. None of these options
Correct Answer : 3
Your Answer :
QuestionID : 10407 Subject Name HTML
Q20. ________of these page extensions WILL NOT recognize and execute an include
file
1. .stm
2. .html
3. .asp
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10411 Subject Name HTML
Q21. How can we protect databases from accidental viewing or intentional attempt at
downloading?
1. Use garbled file names
2. Regularly change the DSN and DSN-less connection strings
3. Put the databases into directories higher than the root - in other words,
directories not accessible via the web browser
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10418 Subject Name HTML
Q22. What information can a connection string contain about the database you are
trying to connect to?
1. Type of database
2. Location of database
3. username & password
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10423 Subject Name HTML
Q23. ASP comes with built-in _________ component that displays a different
advertisement each time a user enters or refreshes a page
1. AdRotator
2. Rotate Adds
3. Advertisement
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10435 Subject Name HTML
Q24. Who is making the Web standards?
1. Microsoft
2. Netscape
3. The World Wide Web Consortium (W3C)
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10952 Subject Name HTML
Q25. HTML elements must always properly nest.
Correct Answer : F
Your Answer :
QuestionID : 10954 Subject Name HTML
Q26. Predefined entities represent special markup Characters.
Correct Answer : T
Your Answer :
QuestionID : 10957 Subject Name HTML
Q27. Do not include the XHTML namespace when including XHTML in an XML document.
Correct Answer : F
Your Answer :
QuestionID : 11633 Subject Name HTML
Q28. Ordered lists are used for Bullets.
Correct Answer : F
Your Answer :
QuestionID : 11635 Subject Name HTML
Q29. The ___________ color is the default color of a hyperlink.
1. green
2. blue
3. red
4. yellow
Correct Answer : 2
Your Answer :
QuestionID : 11639 Subject Name HTML
Q30. The___________attribute takes text to be displayed in case the Browser is
unable to display the image specified in the SRC attribute.
1. Title
2. Alt
3. Src
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11649 Subject Name HTML
Q31. The___________attribute takes text to be displayed in case the Browser is
unable to display the image specified in the SRC attribute.
1. Title
2. Alt
3. Src
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11657 Subject Name HTML
Q32. HTML allows only static text to be displayed on the page.
Correct Answer : T
Your Answer :
QuestionID : 11659 Subject Name HTML
Q33. Once the screen is divided into different sections, each section can be loaded
with a different HTML document using the _____________tag.
1. Frame tag
2. Body tag
3. Anchor tag
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11662 Subject Name HTML
Q34. The _________________ attribute of the < FRAME > tag disables the user`s
ability to resize theframe.
1. Noresize
2. Nochange
3. SRC
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 11663 Subject Name HTML
Q35. HTML allows only static text to be displayed on the page.
Correct Answer : T
Your Answer :
QuestionID : 11667 Subject Name HTML
Q36. A table header row is defined with the < TD> and < /TD> tag pair.
Correct Answer : F
Your Answer :
QuestionID : 11668 Subject Name HTML
Q37. If a variable is declared outside the body of the function, it is available
throughout script inside
all functions and elsewhere in the program.
Correct Answer : T
Your Answer :
QuestionID : 11669 Subject Name HTML
Q38. The color of the links can be changed in the < Body> tag.
Correct Answer : T
Your Answer :
QuestionID : 11672 Subject Name HTML
Q39. The ______________ attribute of the < FORM> tag points to the URL of a program
on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 11679 Subject Name HTML
Q40. The Select object allows multiple choices from a list of choices that are
offered.
Correct Answer : T
Your Answer :
QuestionID : 11682 Subject Name HTML
Q41. The name Cookie has a special significance with respect to object oriented
programming language.
Correct Answer : F
Your Answer :
QuestionID : 14241 Subject Name HTML
Q42. An HTML document is divided into_________ _________ and the________ ________
sections
1. Head and body
2. Head and tag
3. Images and hyperlinks
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14243 Subject Name HTML
Q43. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14248 Subject Name HTML
Q44. ________ __________ enable a jump to a particular location in a document.
1. static linking
2. dynamic linking
3. web linking
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14253 Subject Name HTML
Q45. CELLSPACING controls the distance between the data in a cell and the
boundaries of the cell.
Correct Answer : F
Your Answer :
QuestionID : 14257 Subject Name HTML
Q46. ___________tag starts text from a new line skipping one line in between.
1. < BR >
2. < HR >
3. < P >
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14276 Subject Name HTML
Q47. Methods are used to read or modify the data contained in an object.
Correct Answer : T
Your Answer :
QuestionID : 14287 Subject Name HTML
Q48. The Post method sends data captured by the form elements to the web server,
encoded as part of the URL that points to the web server.
Correct Answer : F
Your Answer :
QuestionID : 14289 Subject Name HTML
Q49. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 14293 Subject Name HTML
Q50. The name Cookie has a special significance with respect to object oriented
programming language.
Correct Answer : F
Your Answer :
ACTS, Pune
HTML & Java Script Page 1
HTML Question Bank
1. Is .htm and .html the same?
1. No
2. Yes
2. What is the difference between XML and HTML?
1. HTML is used for exchanging data, XML is not.
2. XML is used for exchanging data, HTML is not.
3. HTML can have user defined tags, XML cannot
4. Both b and c above
3. Which tags are most commonly used by search engines?
1. Heading
2. Title
3. Paragrah
4. All of above
4. What is the <br> tag for?
1. Space
2. Paragraph break
3. Line break
4. Word break
5. What is the attribute for <image> tag?
1. pt
2. url
3. path
4. src
6. Can a data cell contain images?
1. Yes
2. No
7. Each list item in an ordered or unordered list has which tag?
1. list tag
2. ls tag
3. li tag
4. ol tag
ACTS, Pune
HTML & Java Script Page 2
8. Which of the following tags below are used for a multi-line text input control?
1. textml tag
2. text tag
3. textarea tag
4. Both b and c above
9. <meta> tag cannot be defined in the <head> tag.
1. False
2. True
10. Which of the following attributes below are used for a font name?
1. fontname
2. fn
3. font
4. face
11. Is width=”100” and width=”100%” the same?
1. No
2. Yes
12. What are <div> tags used for?
1. To replace paragraphs. i.e. p tags
2. To logically divide the paragraphs
3. To logically divide the document
4. To provide space between tables
13. What is cell padding?
1. Used to separate cell walls from their contents.
2. Used to set space between cells
3. Both a and b above
4. Used to provide width to a cell
14. Can I play audios in HTML?
1. No
2. Yes
15. What attribute is used to specify number of rows?
1. Rownum
2. Rownumb
3. rn
4. Rowspan
ACTS, Pune
HTML & Java Script Page 3
16. What are meta tags used for?
1. To store information usually relevant to browsers and search engines.
2. To only store information usually relevant to browsers
3. To only store information about search engines.
4. To store information about external links
17. How can we resize the image?
1. Using resize attribute
2. Using height and width
3. Using size attribute
4. Using rs attribute
18. For Frames in HTML, how do you specify the rest of the screen?
1. Using &
2. Using $
3. Using *
4. Using #
19. bgcolor is an attribute of body tag
1. True
2. False
ACTS, Pune
HTML & Java Script Page 4
Java Script Question Bank
1. What language defines the behavior of a web page?
1. HTML
2. CSS
3. XML
4. Java Script
2. Which of the following is the tainted property of a window object in Java
Script?
1. Pathname
2. Protocol
3. Defaultstatus
4. Host
3. How to append a value to an array of Java Script?
1. arr[arr.length] = value
2. arr[arr.length+1] = new Arrays()
3. arr[arr.length-1] = value
4. arr[arr.length*1] = value
4. Why so Java and Java Script have similar name?
5. Java Script is a stripped-down version of Java
6. The syntax of Java is loosely based on Java syntax
7. They both support Object Oriented Programming
8. None of the above
5. Which machine actually executes the Java Script?
1. The web server
2. The machine which is running a web browser
3. Java Script engine
4. Both A and C
6. Is it possible to declare a variable in Java Script along its type?
1. Yes
2. No
7. Which of the following are capable of Java Script functions?
1. Returning multiple values
2. Accepting parameters and returning values
3. Accepting parameters
4. all of the above
ACTS, Pune
HTML & Java Script Page 5
8. How does Java Script store dates in objects of Date type?
1. The number of days since January 1st, 1900
2. The number of seconds since January 1st, 1970
3. The number of milliseconds since January 1st, 1970
4. The number of picoseconds since January 1st, 1970
9. Which attribute is used to hold the Java Script version?
1. SCRIPT
2. VERSION
3. LANGUAGE
4. VER
10. Which of the following is correct to write “Hello World” on the web page?
1. System.out.println(“Hello World”)
2. print(“Hello World”)
3. document.write(“Hello World”)
4. response.write(“Hello World”)
11. Which of the following syntax is correct to refer an external script called
“formValidation.js”?
1. < script href = “formValidation.js”>
2. < script source = “formValidation.js”>
3. < script name = “formValidation.js”>
4. < script src = “formValidation.js”>
12. What type of image maps could be used with Java Script?
1. Client-side image maps
2. Server-side image maps
3. Both A and B
4. Localhost image maps
13. Which of the following is the correct way for writing Java Script array?
1. var salaries = new Array( 1:39438, 2:39839 3:83729)
2. var salaries = new (Array:1=39438, Array:2=39839, Array:3=83729)
3. var salaries = new Array(39438,39839,83729)
4. var salaries = new Array() values=39438,39839,83729
14. What is the purpose of <noscript> tag in Java Script?
1. Prevents scripts on the page from executing.
2. Enclose text to be displayed by non-JavaScript browsers
3. Suppresses the result to be displayed on the web page
4. None of the above
ACTS, Pune
HTML & Java Script Page 6
15. Java Script entities start with ____________ and end with ______________
1. Semicolon, colon
2. Semicolon, Ampersand
3. Ampersand, colon
4. Ampersand, semicolon
16. Which of the following is a server-side Java Script object?
1. Function
2. File
3. FileUpload
4. Date
17. Which of the following is a client-side Java Script object?
1. File
2. Function
3. FileUpload
4. Time
18. Which of the following method is used to evaluate a string of Java Script code
in the context of the
specified object?
1. Eval
2. ParseDoule
3. ParseObject
4. Efloat
19. What is the event that fires when the form elements : <button>.<textarea> loses
the focus?
1. Onclick
2. Ondblclick
3. Onfocus
4. Onblur
20. Which of the following is used to capture all click events in a window?
1. window.captureEvents(Event.CLICK);
2. window.routeEvents(Event.CLICK );
3. window.handleEvents (Event.CLICK);
4. window.raiseEvents(Event.CLICK );
21. Javascript is an object oriented language?
1. False
2. True
ACTS, Pune
HTML & Java Script Page 7
22. C-style block-level scoping is not supported in Java script
1. False
2. True
23. To insert a JavaScript into an HTML page, which tag is used?
1. < script=’java’>
2. < javascript>
3. < script>
4. < js>
24. If we don’t want the script to write page content, under which HTML tag should
the JS tag be placeD?
1. < body>
2. < head>
3. Any of a and b above
4. Both b and c above
25. Which of the following statements are true for Java script?
1. JavaScript is case sensitive
2. JavaScript statements can be grouped together in blocks
3. semicolon at the end of statement is mandatory
4. Both a and b above
26. Which of the following statements are false for Java script?
1. Variable names are not case sensitive
2. Variable names must begin with a letter or the underscore character
3. Var is used to declare a variable
4. Both b and c above
27. Which of the below is used in Java script to insert special characters?
1. &
2. \
3. -
4. %
28. JavaScript ignores extra spaces
1. True
2. False
ACTS, Pune
HTML & Java Script Page 8
29. Which of the ways below is incorrect of instantiating a date?
1. new Date(dateString)
2. new Date()
3. new Date(seconds)
4. new Date(year, month, day, hours, minutes, seconds, milliseconds)
30. Which of the following statements are false for Java script?
1. JavaScript can react to events
2. JavaScript can read and write HTML elements
3. JavaScript cannot be used to create cookies
4. Both b and c above
31. What is negative infinity in Java script?
1. Any of below
2. number in JavaScript, derived by dividing number by a negative number.
3. number in JavaScript, derived by dividing number by zero.
4. number in JavaScript, derived by dividing negative number by zero
32. ___________ JavaScript is also called client-side JavaScript.
1. Microsoft
2. Navigator
3. LiveWire
4. Native
33. Java script can be used for Storing the form's contents to a database file on
the server
1. False
2. True
34. Which of the following is not a valid JavaScript variable name?
1. 2java
2. _java_and_ java _names
3. javaandjava
4. None of the above
35. Which is the correct way to write a JavaScript array?
1. var txt = new Array(1:"arr",2:"kim",3:"jim")
2. var txt = new Array:1=(" arr ")2=("kim")3=("jim")
3. var txt = new Array("arr ","kim","jim")
4. var txt = new Array=" arr ","kim","jim"
ACTS, Pune
HTML & Java Script Page 9
36. File is server-side JavaScript object
1. True
2. False
37. What java wrapper type is created when a JavaScript object is sent to Java?
1. ScriptObject
2. JavaObject
3. Jobject
4. JSObject
38. Which attribute needs to be changed to make elements invisible?
1. visibilty
2. visible
3. invisibility
4. invisible
39. Java Script supports all boolean operators
1. True
2. False
40. What is the alternate name for Java script?
1. LimeScript
2. Both a and d
3. ECMScript
4. ECMAScript
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
1
Contents
Architecture of
web................................................................................
...................................................................................
. 1
HTML...............................................................................
...................................................................................
......................... 4
CSS ...............................................................................
...................................................................................
..........................14
PHP................................................................................
...................................................................................
.........................23
XML ...............................................................................
...................................................................................
.........................29
JSON...............................................................................
...................................................................................
........................33
AJAX ..............................................................................
...................................................................................
.........................33
Web
Security...........................................................................
...................................................................................
...............34
UI.................................................................................
...................................................................................
...........................34
Architecture of web
1. A piece of icon or image on a web page associated with another webpage is called
a) url b) hyperlink c) plugin d) none of the mentioned
2. Dynamic web page
a) is same every time whenever it displays
b) generates on demand by a program or a request from browser
c) both (a) and (b)
d) none of the mentioned
3. What is a web browser?
a) a program that can display a web page
b) a program used to view html documents
c) it enables user to access the resources of internet
d) all of the mentioned
4. Common gateway interface is used to
a) generate executable files from web content by web server
b) generate web pages
c) stream videos
d) none of the mentioned
5. URL stands for
a) unique reference label b) uniform reference label
c) uniform resource locator d) unique resource locator
6. A web cookie is a small piece of data
a) sent from a website and stored in user’s web browser while a user is browsing a
website
b) sent from user and stored in the server while a user is browsing a website
c) sent from root server to all servers
d) none of the mentioned
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
2
7. Which one of the following is not used to generate dynamic web pages?
a) PHP b) ASP.NET c) JSP d) None of the mentioned
8. An alternative of javascript on windows platform is
a) VBScript b) ASP.NET c) JSP d) None of the mentioned
9. What is document object model (DOM)?
a) convention for representing and interacting with objects in html documents
b) application programming interface
c) hierarchy of objects in ASP.NET
d) none of the mentioned
10. AJAX stands for
a) asynchronous javascript and xml b) advanced JSP and xml
c) asynchronous JSP and xml d) advanced javascript and xml
11. The number of objects in a Web page which consists of 4 jpeg images and HTML
text is ________
a) 4 b) 1 c) 5 d) None of the mentioned
Explanation: 4 jpeg images + 1 base HTML file.
12. The default connection type used by HTTP is _________
a) Persistent b) Non-persistent
c) Either of the mentioned d) None of the mentioned
13. The time taken by a packet to travel from client to server and then back to the
client is called
a) STT b) RTT c) PTT d) None of the mentioned
Explanation: RTT stands for round-trip time.
14. The HTTP request message is sent in _________ part of three-way handshake.
a) First b) Second c) Third d) None of the mentioned
15. In the process of fetching a web page from a server the HTTP request/response
takes __________ RTTs.
a) 2 b) 1 c) 4 d) 3
16. The first line of HTTP request message is called _____________
a) Request line b) Header line c) Status line d) Entity line
Explanation: The line followed by request line are called header lines and status
line is the initial part of
response message.
17. The values GET, POST, HEAD etc are specified in ____________ of HTTP message
a) Request line b) Header line c) Status line d) Entity body
Explanation: It is specified in the method field of request line in the HTTP
request message.
18. The __________ method when used in the method field, leaves entity body empty.
a) POST b) GET c) Both of the mentioned d) None of the mentioned
19. The HTTP response message leaves out the requested object when ____________
method is used
a) GET b) POST c) HEAD d) PUT
20. Find the oddly matched HTTP status codes
a) 200 OK b) 400 Bad Request
c) 301 Moved permanently d) 304 Not Found
Explanation: 404 Not Found.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
3
21. Which of the following is not correct ?
a) Web cache doesnt has its own disk space
b) Web cache can act both like server and client
c) Web cache might reduce the response time
d) Web cache contains copies of recently requested objects
22. The conditional GET mechanism
a) Imposes conditions on the objects to be requested
b) Limits the number of response from a server
c) Helps to keep a cache upto date
d) None of the mentioned
13. Which of the following is present in both an HTTP request line and a status
line?
a) HTTP version number b) URL c) Method d) None of the mentioned
14. Multiple object can be sent over a TCP connection between client and server in
a) persistent HTTP b) nonpersistent HTTP
c) both (a) and (b) d) none of the mentioned
15. HTTP is ________ protocol.
a) application layer b) transport layer
c) network layer d) none of the mentioned
16. In the network HTTP resources are located by
a) uniform resource identifier
b) unique resource locator
c) unique resource identifier
d) none of the mentioned
17. HTTP client requests by establishing a __________ connection to a particular
port on the server.
a) user datagram protocol
b) transmission control protocol
c) broader gateway protocol
d) none of the mentioned
18. In HTTP pipelining
a) multiple HTTP requests are sent on a single TCP connection without waiting for
the corresponding responses
b) multiple HTTP requests can not be sent on a single TCP connection
c) multiple HTTP requests are sent in a queue on a single TCP connection
d) none of the mentioned
19. FTP server listens for connection on port number
a) 20 b) 21 c) 22 d) 23
20. In FTP protocol, client contacts server using ____ as the transport protocol.
a) transmission control protocol
b) user datagram protocol
c) datagram congestion control protocol
d) stream control transmission protocol
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
4
21. In which mode FTP, the client initiates both the control and data connections.
a) active mode b) passive mode
c) both (a) and (b) d) none of the mentioned
22. The file transfer protocol is built on
a) data centric architecture b) service oriented architecture
c) client server architecture d) none of the mentioned
23. In file transfer protocol, data transfer can be done in
a) stream mode b) block mode c) compressed mode d) all of the mentioned
HTML
Q1. Body tag do not have a attribute
a. text b. bgcolor c. font
Q2. To increase font size
a. <font size=5> b. <text size=5> c. <size=5>
Q3. It will bring the text on next line
a. <br> b. <break> c. <b>
Q4. It will always display data on next line
a. <p> b. <h> c. <pre>
Q5. It will display data after leaving one line
a. <h3> b. <p> c. <b>
Q6. In img tag align attribute can not have value
a. left b. right c. center
Q7. small tag increase font size
a. to 3 b. +1 from current size c. -1 from current size
Q8. big tag increase font size
a. to 4 b.+1 from current size c. -1 from current size
Q9. it is used to link two file
a. anchor tag b. link c. href
Q10. B and strong tag is used to make text
a. italic b. bold c. underline
Q11. It is used to give red color to the text
a. <font color=”red”> b. <fon color=”blue”> c. <text color=”red”>
Q12. minimum heading is
a. <h1> b. <h5> c. <h6>
Q13. Max heading is
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
5
a. <h6> b. <h5> c. <h1>
Q14. It is used to display data as it appear in editor
a. <BLOCKQUOTE> b. <PRE> c. <EM>
Q15. Hyperlink is also cold as
a. HOT SPOT b. LINK c. A
Q16. It is used to display data in center and bold in table tag
a. td b. th c. tr
Q17. It is used to display image
a. <image link=”pot.gif”> b. <img src=”pot.gif”> c.<img href=”pot.gif”>
Q18. which attribute is used to keep background fixed
a. bgproperties b. attachment c. scroll
Q19. It is used to animate text
a. blink b. marquee c.<a>
Q20. It is used to display horizontal line
a. <line> b. <hr> c.<vr>
Q21. This attribute will increase the speed of marquee text
a. scrollamount b. speed c. Behavior
Q22. This attribute of form take you to the another page
a. action b. anchor c.name
Q23. This display data of form in url
a. <form method=”post”> b. <form method=”get”> c. <form method=”dopost”>
Q24. How to give link to your email
a. <a href=”www.reidffmail.com”/>
b. c . <a href=”mailto:
[email protected]”>
c. <a email=”
[email protected]”>
Q25. It allows you to select only one option at a time
a. choice b. checkbox c. radio
Q26. It allows you to select multiple option at a time
b. Choice b. checkbox c. radio
Q27. What is the correct tag for drop down box
a. <select> b. <combobox> c. <option>
Q28. Which attribute enables you to select multiple option in dropdown box
a. multiple b. selected c. more
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
6
Q29. Which attribute display data on button
a.name b. value c. button
Q30. Which attributes value is used as variable
a. value b. name c. submit
Q31. What is default value of submit button in IE
a. SUBMITQUERY b. SUBMIT c. RESET
Q32. Correct tag to clear form
a. <input type=”reset” value=”reset”>
b. <input type=”clear” value=”reset”>
c. <input type=”button” value=”reset”>
Q33. To mark checkbox checked as default you use
a. <input type=”checkbox” checked=ch
b. <input type=”checkbox” checked=”true”>
c. <input type=”checkbox” checked=unchecked”>
Q34. What is the correct HTML for adding a background color?
a. <body bgcolor="yellow">
b. <background>yellow</background>
c. <body color="yellow">
Q35. How can you open a link in a new browser window?
a. <a href="url" target="_blank">
b. <a href="url" new>
c. <a href="url" target="new">
Q36. Choose the correct HTML to left-align the content inside a tablecell?
a. <tdleft> b. +<td leftalign> c. <td valign="left"> d. <td align="left">
Q37. How can you make a list that lists the items with bullets?
a. <ol> b. <list> c. <ul> d. <dl>
Q38. What is the correct HTML for making a drop-down list?
a. <list> b. <input type="dropdown"> c. <input type="list"> d. <select>
Q39. What is the correct HTML for making a text area?
a. <input type="textarea"> b. <textarea> c. <input type="textbox">
Q40. Links are also known as
a. Hotspots b. Anchors c. Both 1 and 2 d. None of the above
Q41. While ____ is a generic inline element that applies no inherent formatting,
the ____ is a generic block
leve element that applies no inherent formatting.
a. DIV, SPAN b. GROUP, DIV c. SPAN, DIV d. SPAN, GROUP
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
7
Q42.How do you display hyperlinks without an underline?
a. {text-decoration:none} b. {text-decoration:no underline}
c. {underline:none} d. {decoration:no underline}
Q43. In the SELECT element, the attribute SIZE specifies
a. Height b. Width c. Max size d. Visible size
Q44. The SRC attribute of______ specifies the URL of a HTML file to be displayed in
a Frame
a. IFrame b. Frameset c. src d. href
Q45. The linked regions of an image map are called_____
a. anchors b. source c. transfer d. hot regions
Q46. The ______attribute takes text to be displayed in case the Browser is unable
to display the image specified
in the SRC attribute.
a. ALT b. href c. link d. vspace
Q47. Main protocol used in Internet is:
a. IPX/SPX b. Zolan Bus c. TCP/IP d. X.25
Q48. Who is making the Web standards?
a. The World Wide Web Consortium b. Microsoft c. Netscape
Q49.Which of these tags are all <table> tags?
a. <table><tr><tt> b. <thead><body><tr> c. <table><head><tfoot> d. <table><tr><td>
Q50. What is the correct HTML for inserting a background image?
a. <img src="background.gif" background>
b. <body background="background.gif">
c. <background img="background.gif">
Q51. How to open link in new unique window
a. Target=_new b. Target=_self c. Target=_blank
Q52. align attribute can not be used with
a. Hr b. H1 c. Font
Q53. What is ALT text
a. Text display when image is not found b. Text display when you hold mouse over
image c. Both
Q54. How can you make a row stretch over 2 column
a. <td colspan=2> b. <td rowspan=2> c. <rd colspan=2>
Q55. How to define table background color
a. Background-color= b. bgcolor= c. ackgroundcolor=
Q56. How to table give border color
a. Border= b. Bordercolor= c. Bgcolor=
Q57. Default font size is
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
8
a. 7 b. 2 c. 3
Q58. Server is one who
a. Provide service b. Host website c. Both
Q59. It will put horizontal line on the text
a. Hr b. Strike c. Table
Q60. Tag used to give heading to option in select tag
a. <optgoup lable=”heading”> b. <option value=”heading”> c. <select
name=”heading”>
Q61. Which two tag has same effect
a. <i>,<b> b.<strong><b> c. <b><cite>
Q62. Attribute used to increase the height of line in <hr> tag
a. Height b. Size c. Length
Q63. It will increase the speed of marquee tag
a. Scroll b. Scrollamount c. Behavior
Q64. What are the attribute of anchar tag
a. Name,href,target,src b. Name,href,target,title c. Href, tooltip,src
Q65. It interprete the html code
a. Server b. Browser c. notepad
Q66. Which of the following is true about HTML 5?
a. HTML5 is the next major revision of the HTML standard superseding HTML 4.01,
XHTML 1.0, and XHTML 1.1.
b. HTML5 is a standard for structuring and presenting content on the World Wide
Web.
c. HTML5 is a cooperation between the World Wide Web Consortium W3C and the Web
Hypertext Application
Technology Working Group WHATWG.
d. All of the above.
Q67. Which of the following feature is a part of HTML 5?
a. Persistent Local Storage b. WebSocket c. Server-Sent Events d. All of the
above.
Q68. Which of the following feature is a part of HTML 5?
a. Canvas b. Audio & Video c. Geolocation d. All of the above.
Q69. Which of the following browser supports HTML5 in its latest version?
a. Apple Safari b. Google Chrome c. Both of the above. d. None of the above.
Q70. Which of the following browser supports HTML5 in its latest version?
a. Mozilla Firefox b. Opera c. Both of the above. d. None of the above.
Q71. Which of the following browser supports HTML5 in its latest version?
a. Mozilla Firefox b. Opera c. Both of the above.d. None of the above.
Q72. Is HTML5 backward compatible with old browsers?
a. true b. false
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
9
Q73. Are HTML tags case sensitive?
a. true b. false
Q74. Which of the following tag represents a generic document or application
section in HTML5?
a. section b. article c. aside d. header
Q75. Which of the following tag represents an independent piece of content of a
document in HTML5?
a. section b. article c. aside d. header
Q76. Which of the following tag represents a piece of content that is only slightly
related to the rest of the page
in HTML5?
a. section b. article c. aside d. header
Q77. Which of the following tag represents the header of a section in HTML5?
a. section b. article c. aside d. header
Q78. Which of the following tag represents the footer of a section in HTML5?
a. footer b. nav c. section d. dialog
Q79. Which of the following tag represents a section of the document intended for
navigation in HTML5?
a. footer b. nav c. section d. dialog
Q80. Which of the following tag can be used to mark up a conversation in HTML5?
a. footer b. nav c. dialog d. figure
Q81. Which of the following tag can be used to associate a caption together with
some embedded content in
HTML5?
a. footer b. nav c. dialog d. figure
Q82. Which of the following is correct about custom attributes in HTML5?
a. A custom data attribute starts with data- and would be named based on your
requirement.
b. You would be able to get the values of these attributes using JavaScript APIs
or CSS in similar way as you
get for standard attributes.
c. Both of the above. d. None of the above.
Q83. Which of the following is correct about custom attributes in HTML5?
a. A custom data attribute starts with data- and would be named based on your
requirement.
b. You would be able to get the values of these attributes using JavaScript APIs
or CSS in similar way as you
get for standard attributes.
c. Both of the above. d. None of the above.
Q84. Which of the following is correct about Web form 2.0 in HTML5?
a. Web Forms 2.0 is an extension to the forms features found in HTML4.
b. Form elements and attributes in HTML5 provide a greater degree of semantic
mark-up than HTML4.
c. Form elements and attributes in HTML5 remove a great deal of the need for
tedious scripting and styling
that was required in HTML4.
d. All of the above.
Q85. Which of the following is correct about Web form 2.0 in HTML5?
a. Web Forms 2.0 is an extension to the forms features found in HTML4.
b. Form elements and attributes in HTML5 provide a greater degree of semantic
mark-up than HTML4.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
10
c. Form elements and attributes in HTML5 remove a great deal of the need for
tedious scripting and styling
that was required in HTML4.
d. All of the above.
Q86. Which of the following input control represents a date and time year, month,
day, hour, minute, second,
fractions of a second encoded according to ISO 8601 with the time zone set to UTC
in Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q87. Which of the following input control represents a date and time year, month,
day, hour, minute, second,
fractions of a second encoded according to ISO 8601 with no time zone information
in Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q88. Which of the following input control represents a date year, month, day
encoded according to ISO 8601 in
Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q89. Which of the following input control represents a date consisting of a year
and a month encoded according
to ISO 8601 in Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q90. Which of the following input control represents a date consisting of a year
and a week number encoded
according to ISO 8601 in Web Form 2.0?
a. week b. time c. number d. range
Q91. Which of the following input control represents a time hour, minute, seconds,
fraction al seconds encoded
according to ISO 8601 in Web Form 2.0?
a. week b. time c. number d. range
Q92. Which of the following input control accepts only numerical value in Web Form
2.0?
a. week b. time c. number d. range
Q93. Which of the following input control is used for input fields that should
contain a value from a range of
numbers in Web Form 2.0?
a. week b. time c. number d. range
Q94. Which of the following input control is used for input fields that should
contain an e-mail address in Web
Form 2.0?
a. email b. url c. number d. range
Q95. Which of the following input control is used for input fields that should
contain an URL address in Web
Form 2.0?
a. email b. url c. number d. range
Q96. Which of the following tag is used to represent the result of different types
of output in HTML5?
a. output b. placeholder c. autofocus d. required
Q97. Which of the following tag provides a hint to the user of what can be entered
in the field in HTML5?
a. output b. placeholder c. autofocus d. required
Q98. Which of the following tag automatically focus one particular form field in
HTML5?
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
11
a. output b. placeholder c. autofocus d. required
Q99. Which of the following tag insists to have a value in an input control in
HTML5?
a. output b. placeholder c. autofocus d. required
Q100. Can you use SVG tags directly in HTML5 without any plugin?
a. true b. false
Q101. Can you use MathML tags directly in HTML5 without any plugin?
a. true b. false
Q102. Which of the following is true about Cookies?
a. Cookies are included with every HTTP request, thereby slowing down your web
application by
transmitting the same data.
b. Cookies are included with every HTTP request, thereby sending data unencrypted
over the internet.
c. Cookies are limited to about 4 KB of data .Not enough to store required data.
d. All of the above.
Q103. Which of the following is true about Session Storage in HTML5?
a. HTML5 introduces the session Storage attribute which would be used by the sites
to add data to the
session storage.
b. It will be accessible to any page from the same site opened in that window i.e.
session.
c. As soon as you close the window, session would be lost.
d. All of the above.
Q104. Which of the following is true about Local Storage in HTML5?
a. HTML5 introduces the local Storage attribute which would be used to access a
page's local storage area
without no time limit.
b. This local storage will be available whenever you would use that page.
c. Both of the above.
d. None of the above.
Q105. When a session storage data gets deleted in HTML5?
a. The Session Storage Data would be deleted by the browsers immediately after the
session gets terminated.
b. If you want to clear all settings, you need to call localStorage. clear method.
c. Both of the above.
d. None of the above.
Q106. How to delete a local storage data in HTML5?
a. To clear a local storage setting you would need to call localStorage.remove′key
′; where 'key' is the key of
the value you want to remove.
b. If you want to clear all settings, you need to call localStorage. clear method.
c. Both of the above.
d. None of the above.
Q107. Which of the following is correct about Server Side EventsSSE in HTML5?
a. Using SSE you can push DOM events continously from your web server to the
visitor's browser.
b. The event streaming approach opens a persistent connection to the server,
sending data to the client
when new information is available, eliminating the need for continuous polling.
c. Server-sent events standardizes how we stream data from the server to the
client.
d. All of the above.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
12
Q108. Which of the following is correct about Server Side EventsSSE in HTML5?
a. To use Server-Sent Events in a web application, you would need to add an
<eventsource> element to
the document.
b. The src attribute of <eventsource> element should point to an URL which should
provide a persistent
HTTP connection that sends a data stream containing the events.
c. The URL would point to a PHP, PERL or any Python script which would take care
of sending event data
consistently.
d. All of the above.
Q109. Which of the following is correct Content-type header that a server side
script should send for SSE in
HTML5?
a. Content-Type: text/event-stream b. Content-Type: text/application-stream
c. Content-Type: text/data-stream d. None of the above.
Q110. Which of the following is correct about WebSockets in HTML5?
a. Web Sockets is a next-generation bidirectional communication technology for web
applications which
operates over a single socket and is exposed via a JavaScript interface in HTML 5
compliant browsers.
b. Once you get a Web Socket connection with the web server, you can send data
from browser to server
by calling a send method, and receive data from server to browser by an onmessage
event handler.
c. Both of the above.
d. None of the above.
Q111. Which value of Socket.readyState atribute of WebSocket indicates that the
connection has not yet been
established?
a. 0 b. 1 c. 2 d. 3
Q112. Which value of Socket. readyState atribute of WebSocket indicates that the
connection is established and
communication is possible?
a. 0 b. 1 c. 2 d. 3
Q113. Which value of Socket.readyState atribute of WebSocket indicates that the
connection is going through
the closing handshake?
a. 0 b. 1 c. 2 d. 3
Q114. Which value of Socket.readyState atribute of WebSocket indicates that the
connection has been closed or
could not be opened?
a. 0 b. 1 c. 2 d. 3
Q115. Which of the following is true about 'canvas' tag in HTML5?
a. HTML5 element <canvas> gives you an easy and powerful way to draw graphics
using JavaScript.
b. It can be used to draw graphs, make photo compositions or do simple and not so
simplea nimations.
c. Both of the above.
d. None of the above.
Q116. Which of the following is true about 'audio' tag in HTML5?
a. HTML5 supports <audio> tag which is used to embed sound content in an HTML or
XHTML document.
b. The current HTML5 draft specification does not specify which audio formats
browsers should support in
the audio tag.
c. Both of the above.
d. None of the above.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
13
Q117. Which of the following is true about 'audio' tag in HTML5?
a. Commonly used audio formats ogg, mp3 and wav are supported.
b. You can use <source> tag to specify media along with media type and many other
attributes.
c. An audio element allows multiple source elements and browser will use the first
recognized format.
d. All of the above.
Q118. Which of the following is true about 'video' tag in HTML5?
a. HTML5 supports <video> tag which is used to embed a video file in an HTML or
XHTML document.
b. The current HTML5 draft specification does not specify which video formats
browsers should support in
the video tag.
c. Ogg files with Thedora video codec and Vorbis audio codec are supported.
d. All of the above.
Q119. Which of the following is true about 'video' tag in HTML5?
a. MPEG4 files with H.264 video codec and AAC audio codec are supported.
b. You can use <source> tag to specify media along with media type and many other
attributes.
c. An video element allows multiple source elements and browser will use the first
recognized format.
d. All of the above.
Q120. Which of the following is correct about geolocation api in HTML5?
a. HTML5 Geolocation API lets you share your location with your favorite web
sites.
b. A Javascript can capture your latitude and longitude and can be sent to backend
web server and do
fancy location-aware things like finding local businesses or showing your location
on a map.
c. Today most of the browsers and mobile devices support Geolocation API.
d. All of the above.
Q121. Which of the following is correct about geolocation api in HTML5?
a. The geolocation APIs work with a new property of the global navigator object.
b. The geolocation object is a service object that allows widgets to retrieve
information about the
geographic location of the device.
c. Both of the above.
d. None of the above.
Q122. Which of the following method returns a geolocation object in HTML5?
a. navigator.geolocation b. browser.geolocation c. API.geolocation d.None of the
above.
Q123. Which of the following method retrieves the current geographic location of
the user?
a. geolocation.getCurrentPosition b. geolocation.watchPosition
geolocation.clearPosition d. None of the above.
Q124. Which of the following method cancels an ongoing watchPosition call?
a. geolocation.getCurrentPosition b. geolocation.watchPosition
c. geolocation.clearPosition d. None of the above.
Q125. Which of the following is correct about web workers in HTML5?
a. Web Workers do all the computationally expensive tasks without interrupting the
user interface and
typically run on separate threads.
b. Web Workers allow for long-running scripts that are not interrupted by scripts
that respond to clicks or
other user interactions.
c. Web Workers allow long tasks to be executed without yielding to keep the page
responsive.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
14
d. All of the above.
Q126. Which of the following attribute specifies a keyboard shortcut to access an
element in HTML5?
a. accesskey b. key c. contextmenu d. contextkey
Q127. Which of the following attribute specifies if the user can edit the element's
content or not?
a. editable b. contenteditable c. contextmenu d. content
Q128. Which of the following attribute specifies the context menu for an element?
a. key b. contextcontent c. contextmenu d. context
Q129. Which of the following attribute specifies whether or not a user is allowed
to drag an element?
a. drag b. content c. context d. draggable
Q130. Which of the following attribute is used to group elements?
a. item b. itemprop c. itemcheck d. itemgroup
Q131. Which of the following attribute is used to group items?
a. item b. itemprop c. itemcheck d. itemgroup
Q132. Which of the following attribute specifies if the element must have it's
spelling or grammar checked?
a. item b. itemcheck c. spellcheck d. itemgroup
Q133. Which of the following attribute triggers event when the document goes
offline?
a. offline b. off c. out d. onbeforeonload
Q134. Which of the following attribute triggers an abort event?
a. offline b. onabort c. abort d. onbeforeonload
Q135. Which of the following attribute triggers event after the document is
printed?
a. offlineprint b. onprint c. onafterprint d. onbeforeprint
Q136. Which of the following attribute triggers event before the document loads?
a. offline b. onabort c. onload d. onbeforeonload
Q137. Which of the following attribute triggers event before the document is
printed?
a. onbeforeprint b. onafterprint c. onprint d. beforeprint
Q138. Which of the following attribute triggers event when the window loses focus?
a. onbeforeload b. onblur c. onlostfocus d. lostfocus
Q139. Which of the following attribute triggers event when media can start play,
but might has to stop for
buffering?
a. onbeforeplay b. onplay c. oncanplay d. oncanplaythrough
CSS
Q1. Which of the following is correct about CSS?
a. CSS is used to control the style of a web document in a simple and easy way.
b. You can write CSS once and then reuse same sheet in multiple HTML pages.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
15
c. All of the above.
Q2. Which of the following is correct about CSS?
a. Style sheets allow content to be optimized for more than one type of device.
b. CSS can store web applications locally with the help of an offline catche.
c. Using CSS, we can view offline websites. The cache also ensures faster loading
and better overall
performance of the website.
d. All of the above.
Q3. Which of the following is a component of CSS style rule?
a. Selector b. Property c. Value d. All of the above.
Q4. Which of the following selector matches all elements of a type?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q5. Which of the following selector matches the name of any element type?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q6. Which of the following selector matches a particular element only when it lies
inside a particular element?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q7. Which of the following selector matches a element based on its class attribute?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q8. Which of the following selector matches a element based on its id?
a. The Id Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q9. How to apply a style to several specific element types?
a. Use the type selector with, delimiter b. Use the type selector with .delimiter
c. Use the ID selector with ; delimiter d. Use the ID selector with > delimiter
Q10. Which property applies a color to text?
a. text-color b. foreground-color c. background-color d. color
Q11. Which values for font-family property is valid?
a. Times New Roman, serif b. “Times New Roman", serif
c. Times New Roman; serif;zz d. “Times New Roman"; "serif";
Q12. What does the ID selector do?
a. Apply the style to a specific element b. Apply the style to all the elements
d. Apply the style to a group of elements d. Apply the style to elements of the
same type
Q13. Which of the following is a way to associate styles with your HTML document?
a. Embedded CSS - The <style> Element b. Inline CSS - The style Attribute
c. Both of the above. d. None of the above.
Q14. Which of the following is a way to associate styles with your HTML document?
a. External CSS - The Element b. Imported CSS - @import Rule
c. Both of the above. d. None of the above.
Q15. Which of the following is a true about CSS style overriding?
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
16
a. Any inline style sheet takes highest priority. So, it will override any rule
defined in tags or rules defined in
any external style sheet file.
b. Any rule defined in tags will override rules defined in any external style
sheet file.
c. Any rule defined in external style sheet file takes lowest priority, and rules
defined in this file will be
applied only when above two rules are not applicable.
d. All of the above.
Q16. Which of the following defines a measurement as a percentage relative to
another value, typically an
enclosing element?
a. % b. cm c. em d. ex
Q17. Which of the following defines a measurement in centimeters?
a. % b. cm c. em d. ex
Q18. Which of the following defines a relative measurement for the height of a font
in em spaces?
a. % b. cm c. em d. ex
Q19. Which of the following defines a measurement relative to a font's x-height?
a. % b. cm c. em d. ex
Q20. Which of the following defines a measurement in inches?
a. in b.mm c. pc d. pt
Q21. Which of the following defines a measurement in millimetre ?
a. in b. mm c. pc d. pt
Q22. Which of the following defines a measurement in picas?
a. in b. mm c. pc d. pt
Q23. Which of the following defines a measurement in points?
a. in b. mm c. pc d. pt
Q24. Which of the following defines a measurement in screen pixels?
a. px d. vh c. vw d. vmin
Q25. Which of the following defines 1% of viewport height?
a. px b. vh c. vw d. vmin
Q26. Which of the following is correct about Hex Code format of CSS colors?
a. The first two digitsRR represent a red value. b. The next two are a green
valueGG.
c. The last are the blue valueBB. d. All of the above.
Q27. Which of the following is correct about Short Hex Code format of CSS colors?
a. This is a shorter form of the six-digit notation.
b. In this format, each digit is replicated to arrive at an equivalent six-digit
value.
c. Each hexadecimal code will be preceded by a pound or hash sign '#'.
d. All of the above.
Q28. Which of the following is correct about RGB Values format of CSS colors?
a. This color value is specified using the rgb property.
b. This property takes three values, one each for red, green, and blue.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
17
c. The value can be an integer between 0 and 255 or a percentage.
d. All of the above.
Q29. Which of the following is correct about Browser Safe Colors?
a. These are 216 colors which are supposed to be most safe and computer
independent colors.
b. These colors vary from hexa code 000000 to FFFFFF.
c. These colors are safe to use because they ensure that all computers would
display the colors
correctly when running a 256 color palette.
d. All of the above.
Q30. Which of the following property is used to set the background color of an
element?
a. background-color b. background-image c. background-repeat d. background-
position
Q31. Which of the following property is used to set the background image of an
element?
a. background-color b. background-image c. background-repeat d. background-
position
Q32. Which of the following property is used to control the repetition of an image
in the background?
a. background-color b. background-image c. background-repeat d. background-
position
Q33. Which of the following property is used to control the position of an image in
the background?
a. background-color b. background-image c. background-repeat d. background-
position
Q34. Which of the following property is used to control the scrolling of an image
in the background?
a. background-attachment b. background c. background-repeat d. background-position
Q35. Which of the following property is used as a shorthand to specify a number of
other background
properties?
a. background-attachment b. background c. background-repeat d. background-position
Q36. Which of the following property is used to change the face of a font?
a. font-family b. font-style c. font-variant d. font-weight
Q37. Which of the following property is used to make a font italic or oblique?
a. font-family b. font-style c. font-variant d. font-weight
Q38. Which of the following property is used to create a small-caps effect?
a. font-family b. font-style c. font-variant d. font-weight
Q39. Which of the following property is used to increase or decrease how bold or
light a font appears?
a. font-family b. font-style c. font-variant d. font-weight
Q40. Which of the following property is used to increase or decrease the size of a
font?
a. font-size b. font c. font-variant d. font-weight
Q41. Which of the following property is used as shorthand to specify a number of
other font properties?
a. font-size b. font c. font-variant d. font-weight
Q42. Which of the following property is used to set the color of a text?
a. color b. direction c. letter-spacing d. word-spacing
Q43. Which of the following property is used to set the text direction?
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
18
a. color b. direction c. letter-spacing d. word-spacing
Q44. Which of the following property is used to add or subtract space between the
letters that make up a word?
a. color b. direction c. letter-spacing d. word-spacing
Q45. Which of the following property is used to add or subtract space between the
words of a sentence?
a. color b. direction c. letter-spacing d. word-spacing
Q46. Which of the following property is used to add or subtract space between the
words of a sentence?
a. text-indent b. text-align c. text-decoration d. text-transform
Q47. Which of the following property is used to align the text of a document?
a. text-indent text-alignc c. text-decoration d. text-transform
Q48. Which of the following property is used to underline, overline, and
strikethrough text?
a. text-indent b. text-align c. text-decoration d. text-transform
Q49. Which of the following property is used to capitalize text or convert text to
uppercase or lowercase letters?
a. text-indent b. text-align c. text-decoration d. text-transform
Q50. Which of the following property is used to control the flow and formatting of
text?
a. white-space b. text-shadow c. text-decoration d. text-transform
Q51. Which of the following property is used to set the text shadow around a text?
a. white-space b. text-shadow c. text-decoration d. text-transform
Q52. Which of the following property is used to set the width of an image border?
a. border b. height c. width d. moz-opacity
Q53. Which of the following property is used to set the height of an image?
a. border b. height c. width d. moz-opacity
Q54. Which of the following property is used to set the width of an image?
a. border b. height c. width d. moz-opacity
Q55. Which of the following property is used to set the opacity of an image?
a. border b. height c. width d. moz-opacity
Q56. Which of the following property of a anchor element signifies unvisited
hyperlinks?
a. :link b. :visited c. :hover d. :active
Q57. Which of the following property of a anchor element signifies visited
hyperlinks?
a. :link b. :visited c. :hover d. :active
Q58. Which of the following property of a anchor element signifies an element that
currently has the user's
mouse pointer hovering over it?
a. :link b. :visited c. :hover d. :active
Q59.Which of the following property of a anchor element signifies an element on
which the user is currently
clicking?
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
19
a. :link b. :visited c. :hover d. :active
Q60. Which of the following property of a table element specifies whether the
browser should control the
appearance of the adjacent borders that touch each other or whether each cell
should maintain its style?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells
Q61. Which of the following property of a table element specifies the width that
should appear between table
cells?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells
Q62. Which of the following property of a table element controls the placement of
the table caption?
a. :border-collapse b. :border-spacing c. :caption-side d.- :empty-cells
Q63. Which of the following property of a table element specifies whether the
border should be shown if a cell
is empty?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells
Q64. Which of the following property of a table element allows browsers to speed up
layout of a table by
using the first width properties it comes across for the rest of a column rather
than having to load the
whole table before rendering it?
a. :table-layout b. :border-spacing c. :caption-side d. :empty-cells
Q65. Which of the following property specifies the color of a border?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Q66. Which of the following property specifies whether a border should be solid,
dashed line, double line, or
one of the other possible values?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Q67. Which of the following property specifies the width of a border?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Q68. Which of the following property changes the color of bottom border?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Q69. Which of the following property changes the color of top border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-
bottom-color
Q70. Which of the following property changes the color of left border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-
bottom-color
Q71. Which of the following property changes the color of right border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-
bottom-color
Q72. Which of the following property changes the style of bottom border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q73. Which of the following property changes the style of top border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q74. Which of the following property changes the style of left border?
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
20
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q75. Which of the following property changes the style of right border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q76. Which of the following property changes the width of bottom border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q77. Which of the following property changes the width of top border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q78. Which of the following property changes the width of left border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q79. Which of the following property changes the width of right border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q80. Which of the following property specifies a shorthand property for setting the
margin properties in one
declaration?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q81. Which of the following property specifies the bottom margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q82. Which of the following property specifies the top margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q83. Which of the following property specifies the left margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q84. Which of the following property specifies the right margin of an element?
a. :margin-right b. :margin-bottom c. :margin-top d. :margin-left
Q85. Which of the following property allows you to control the shape or appearance
of the marker of a list?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q86. Which of the following property specifies whether a long point that wraps to a
second line should align
with the first line or start underneath the start of the marker of a list?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q87. Which of the following property specifies an image for the marker rather than
a bullet point or number?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q88. Which of the following property serves as shorthand for the marker properties?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q89. Which of the following property specifies the distance between a marker and
the text in the list?
a. marker-offset b. list-style-position c. list-style-image d. list-style
Q90. Which of the following property specifies the bottom padding of an element?
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
21
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q91. Which of the following property specifies the top padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q92. Which of the following property specifies the left padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q93. Which of the following property specifies the right padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q94. Which of the following property serves as shorthand for the padding
properties?
a. padding b. padding-top c. padding-left d. padding-right
Q95. Which of the following value of cursor shows it as crosshair or plus sign?
a. crosshair b. default c. pointer d. move
Q96. Which of the following value of cursor shows it as an arrow?
a. crosshair b. default c. pointer d. move
Q97. Which of the following value of cursor shows it as a pointing hand?
a. crosshair b. default c. pointer d. move
Q98. Which of the following value of cursor shows it as the 'I' bar?
a. crosshair b. default c. pointer d. move
Q99. 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
Q100. Where in an HTML document is the correct place to refer to an external style
sheet?
In the <body> section
a. At the end of the document b. At the top of the document
c. In the <head> section d. Between head and body
Q101. Which HTML tag is used to define an internal style sheet?
a. css b. text/style c. style d. script
Q102. Which HTML attribute is used to define inline styles?
a. font b. styles c. css d. text e. style
Q103. Which is the correct CSS syntax?
a. body {color: black} b. body:color=black c. {body:color=black(body} d.
{body;color:black}
Q104. 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// b. //this
is a comment
Q105. Which property is used to change the background color?
a. bgcolor: b. background-color: c. color:
Q106. 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}
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
22
Q107. How do you change the text color of an element?
a. text-color: b. color: c. text-color= d. font-color:
Q108. Which CSS property controls the text size?
a. font-style b. text-style c. font-size d. text-size
Q109. 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}
Q110. 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}
Q111. 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
Q112. How do you change the font of an element?
a. fon-face: b. font-family: c. f: d. font-style:
Q113. How do you make the text bold?
a. font:b b. style:bold c. font-weight:bold
Q114. 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
Q115. How do you change the left margin of an element?
a. padding: b. indent: c. margin: d. text-indent: e. margin-left:
Q116. 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
Q117. 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
Q118. 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">
Q119. 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">
Q120. How do you make each word in a text start with a capital letter?
a. text-transform:capitalize b. text-transform:uppercase c. You can't do that with
CSS
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
23
Q121. 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
Q122. Which of the following styles is recommended?
a. In-Line styles b. External styles c. Embedded styles d. Multiple styles
Q113. In what form are style rules presented?
a. selector { property: value } b. selector { property= value }
c. selector ( property: value ) d. selector ( property= value )
Q114. What selector should you use when applying a style to multiple elements?
a. ID b. Class c. Type d. Any of the above
PHP
Q1. What PHP stands for?
a. Hypertext Preprocessor b. Pre Hypertext Processor c. Pre Hyper Processor d. Pre
Hypertext Process
Q2. Which of the following tags is not a valid way to begin and end a PHP code
block?
a. <% %> b. <? ?> c. <?php ?> d. <! !>
Q3. How does the identity operator === compare two values?
a. It converts them to a common compatible data type and then compares the
resulting values
b. It returns True only if they are both of the same type and value
c. If the two values are strings, it performs a lexical comparison
d. It bases its comparison on the C strcmp function exclusively
e. It converts both values to strings and compares them
Q4. Variables always start with a ........ in PHP
a. Pond-sign b. Yen-sign c. Dollar-sign d. Euro-sign
Q5. What is the value displayed when the following is executed? Assume that the
code was executed using
the following URL:
testscript.php?c=25
<?php
function process($c, $d = 25)
{
global $e;
$retval = $c + $d - $_GET['c'] - $e;
return $retval;
}
$e = 10;
echo process(5);
?>
a. 25 b. -5 c. 10 d. 5 e. 0
Q6. PHP is an open source software
a. True b. False
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
24
Q7.Which of the following is not valid PHP code?
a. $_10 b. ${“MyVar”} c. &$something d. $10_somethings e. $aVaR
Q8.PHP runs on different platforms (Windows, Linux, Unix, etc.)
a. True b. False
Q9. Array values are keyed by ______ values (called indexed arrays) or using ______
values (called
associative arrays). Of course, these key methods can be combined as well.
a. Float, string b. Positive number, negative number
c. Even number, string d. String, Boolean e. Integer, string
Q10. What will the following script output?
<?php
$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);
$sum = 0;
for ($i = 0; $i < 5; $i++) {
$sum += $array[$array[$i]];
}
echo $sum;
?>
a. 78 b. 19 c. NULL d. 5 e. 0
Q11. What elements will the following script output?
<?php
$array = array (true => 'a', 1 => 'b');
Var_dump ($array);
?>
a. 1 => 'b' b. True => 'a', 1 => 'b' c. 0 => 'a', 1 => 'b' d. None e. It will
output NULL
Q12.There are three different kind of arrays:
a. Numeric array, String array, Multidimensional array
b. Numeric array, Associative array, Dimensional array
c. Numeric array, Associative array, Multidimensional array
d. Const array, Associative array, Multidimensional array
Q13. Assume you would like to sort an array in ascending order by value while
preserving key associations.
Which of the following PHP sorting functions would you use?
a. ksort() b. asort() c. krsort() d. sort() e. usort()
Q14. What function computes the difference of arrays?
a. array_diff b. diff_array c. arrays_diff d. diff_arrays
Q15. What functions count elements in an array?
a. count b. Sizeof c. Array_Count d. Count_array
Q16. What array will you get if you convert an object to an array?
a. An array with properties of that object as the array's elements.
b. An array with properties of that array as the object's elements.
c. An array with properties of that object as the Key elements.
d. An array with keys of that object as the array's elements.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
25
Q17. How do you write “Hello World” in PHP
a. “Hello World”; b. echo “Hello World”; c. Document.Write d.(“Hello World”);
Q18. What is the correct way to end a PHP statement?
a. New Line b. ; c. . d. </php>
Q19.The PHP syntax is most similar to:
a. VBScript b. JavaScript c. Perl and C
Q20.How do you get information from a form that is submitted using the “get”
method?
a. Request.Form; b. $_GET[]; c. Request.QueryString
Q21. When using the POST method, the variables are displayed in the URL:
a. False b. True
Q22. In PHP you can use both single quotes ( ‘ ‘ ) and double quotes ( “ “ ) for
strings:
a. True b. False
Q23. Include files must have the file extension “.inc”
a. True b. False
Q24. What is the correct way to include the file “time.inc”?
a. <% include file= “time.inc” % > b. <?php jnclude_file(“time.inc”); ?>
c. <?php require(“time.inc”); ?> d. <!- - include file= “time.inc”- - >
Q25.What is the correct way to create a function in PHP?
a. create myFunction() b. new_function myFunction( ) c. function myFunction( )
Q26. What is the correct way to open the file “time.txt” as readable?
a. open(“time,txt”, “read”); b. open(“time.txt”); c. fopen(“time.txt”, “r”); d.
fopen(“time.txt”,
“r+”);
Q27. PHP allows you to send emails directly from a script
a. False b. True
Q28. What is the correct way to add 1 to the $count variable?
a. $count+ +; b. + + count c. $count = +1 d. count+ +;
Q30. What is a correct way to add a comment in PHP?
a. <comment>…</comment> b. /*…*/ c. *\..\* d. <!- - …- - >
Q31.PHP can be run on Microsoft Windows IIS (Internet Information Server):
a. True b . False
Q32. Which of the following is correct about PHP?
a. PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
b. PHP is a server side scripting language that is embedded in HTML.
c. It is used to manage dynamic content, databases, session tracking, even build
entire e-commerce sites.
d. All of the above.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
26
Q33. Which of the following is correct about PHP?
a. PHP performs system functions, i.e. from files on a system it can create, open,
read, write, and close them.
b. PHP can handle forms, i.e. gather data from files, save data to a file, thru
email you can send data, return data to
the user.
c. You add, delete, modify elements within your database thru PHP.
d. All of the above.
Q34. Which of the following is correct about PHP?
a. PHP can access cookies variables and set cookies.
b. Using PHP, you can restrict users to access some pages of your website.
c. It can encrypt data.
d. All of the above.
Q35. Using which of the following way can you embed PHP code in an HTML page?
a. <?php PHP code goes here ?> b. <? PHP code goes here ?>
c. <script language="php"> PHP code goes here </script> d. All of the above.
Q36. Which of the following is true about php.ini file?
a. The PHP configuration file, php.ini, is the final and most immediate way to
affect PHP's functionality.
b. The php.ini file is read each time PHP is initialized. c. Both of the above. d.
None of the above.
Q37. Which of the following is true about php.ini file?
a. The PHP configuration file, php.ini, is the final and most immediate way to
affect PHP's functionality.
b. The php.ini file is read each time PHP is initialized. C. Both of the above. d.
None of the above.
Q38. Is PHP whitespace sensitive?
a. false b. true
Q39. Is PHP case sensitive?
a. false b. true
Q40. Which of the following is true about php variables?
a. All variables in PHP are denoted with a leading dollar sign ($).
b. The value of a variable is the value of its most recent assignment.
c. Variables are assigned with the = operator, with the variable on the left-hand
side and the expression to be
evaluated on the right.
d. All of the above.
Q41. Which of the following is true about php variables?
a. Variables can, but do not need, to be declared before assignment.
b. Variables in PHP do not have intrinsic types - a variable does not know in
advance whether it will be used
to store a number or a string of characters.
c. Both of the above..
d. All of the above.
Q42. Which of the following type of variables are whole numbers, without a decimal
point, like 4195?
a. Integers b. Doubles c. Booleans d. Strings
Q43. Which of the following type of variables are floating-point numbers, like
3.14159 or 49.1?
a. Integers b. Doubles c. Booleans d. Strings
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
27
Q44. Which of the following type of variables have only two possible values either
true or false?
a. Integers b. Doubles c. Booleans d. Strings
Q45. Which of the following type of variables are special type that only has one
value: NULL?
a. Strings b. Doubles c. Booleans d. NULL
Q46. Which of the following type of variables are sequences of characters, like
'PHP supports string operations.'?
a. Strings b. Arrays c. Objects d. Resources
Q47. Which of the following type of variables are named and indexed collections of
other values?
a. Strings b. Arrays c. Objects d. Resources
Q48. Which of the following type of variables are instances of programmer-defined
classes?
a. Strings b. Arrays c. Objects d. Resources
Q49.Which of the following type of variables are special variables that hold
references to resources external to
PHP (such as database connections)?
a. Strings b. Arrays c. Objects d. Resources
Q50. Which of the following is correct about variable naming rules?
a. Variable names must begin with a letter or underscore character.
b. A variable name can consist of numbers, letters, underscores.
c. you cannot use characters like + , - , % , ( , ) . & , etc in a variable name.
d. All of the above.
Q51. Which of the following is correct about determine the "truth" of any value not
already of the Boolean type?
a. If the value is a number, it is false if exactly equal to zero and true
otherwise.
b. If the value is a string, it is false if the string is empty (has zero
characters) or is the string "0", and is true
otherwise.
c. Values of type NULL are always false.
d. All of the above.
Q52.Which of the following is correct about determine the "truth" of any value not
already of the Boolean type?
a. If the value is an array, it is false if it contains no other values, and it is
true otherwise. For an object,
containing a value means having a member variable that has been assigned a value.
b. Valid resources are true (although some functions that return resources when
they are successful will return
FALSE when unsuccessful).
c. Don't use double as Booleans.
d. All of the above.
Q53. Which of the following is correct about NULL?
a. NULL is a special type that only has one value: NULL.
b. The special constant NULL is capitalized by convention, but actually it is case
insensitive.
c. Both of the above. d. None of the above.
Q54. Which of the following is correct about NULL?
a. A variable that has been assigned NULL evaluates to FALSE in a Boolean context.
b. A variable that has been assigned NULL returns FALSE when tested with IsSet()
function.
c. Both of the above. d. None of the above.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
28
Q55. Which of the following is correct about constants?
a. To define a constant you have to use define() function.
b. To retrieve the value of a constant, you have to simply specify its name.
c. Both of the above. d. None of the above.
Q56. Which of the following is correct about constants?
a. Unlike with variables, you do not need to have a constant with a $.
b. Only scalar data (boolean, integer, float and string) can be contained in
constants.
c. Both of the above. d. None of the above.
Q57.Which of the following function returns selected parts of an array?
a. array_reverse() b. array_search() c. array_shift() d. array_slice()
Q58. Which of the following function returns the sum of the values in an array?
a. array_sum() b. array_splice() c. array_udiff() d. array_udiff_assoc()
Q59.Which of the following function checks if a specified value exists in an array?
a. extract() b. in_array() c. key() d. krsort()
Q60. Singly quoted strings are treated almost literally, whereas doubly quoted
strings replace variables with their
values as well as specially interpreting certain character sequences.
a. true b. false
Q61. Doubly quoted strings are treated almost literally, whereas singly quoted
strings replace variables with their
values as well as specially interpreting certain character sequences.
a. true b. false
Q62. How will you concatenate two strings?
a. Using . operator. b. Using + operator. c. Using add() function d. Using
append() function
Q63. If there is any problem in loading a file then the require() function
generates a warning but the script will
continue execution.
a. true b. false
Q64. If there is any problem in loading a file then the include() function
generates a warning but the script will
continue execution.
a. true b. false
Q65. Which of the following function opens a file?
a. fopen() b. fread() c. filesize() d. file_exist()
Q66. Which of the following function is used to read the content of a file?
a. fopen() b. fread() c. filesize() d. file_exist()
Q67. Which of the following function is used to get the size of a file?
a. fopen() b. fread() c. filesize() d. file_exist()
Q68. Which of the following function is used to check if a file exists or not?
a. fopen() b. fread() c. filesize() d. file_exist()
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
29
Q69. Can you assign the default values to a function parameters?
a. true b. false
Q70.Which of the following is used to set cookies?
a. setcookie() function b. $_COOKIE variable c. $HTTP_COOKIE_VARS variable d.
isset() function
Q71. Which of the following is used to get cookies?
a. getcookie() function b. $_COOKIE variable c. isset() function d. None of the
above.
Q72. Which of the following is used to check that a cookie is set or not?
a. getcookie() function b. $_COOKIE variable c. isset() function d. None of the
above.
Q73. Which of the following is used to delete a cookie?
a. setcookie() function b. $_COOKIE variable c. isset() function d. None of the
above.
Q74. Which of the following is used to create a session?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Q75. Which of the following is used to access session variables in PHP?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Q76. Which of the following is used to check if session variable is already set or
not in PHP?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Q77. Which of the following is used to destroy the session?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Q78. Which of the following provides access to the uploaded file in the temporary
directory on the web server?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
Q79. Which of the following provides the actual name of the uploaded file?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
Q80.Which of the following provides the size of the uploaded file in PHP?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
Q81. Which of the following provides content type of the uploaded file in PHP?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
XML
Q1. What does XML stand for?
a. Example Markup Language b. X-Markup Language
c. extensible Markup Language d. eXtra Modern Link
Q2. There is a way of describing XML data, how?
a. XML uses a DTD to describe the data
b. XML uses a description node to describe data
c. XML uses XSL to describe data
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
30
Q3. XML’s goal is to replace HTML
a. False b. True
Q4. What is the correct syntax of the declaration which defines the XML version?
a. <xml version= “1.0”/> b. <?xml version= “1.0”/> c. <?xml version = “1.0”?>
Q5. What does DTD stand for?
a. Dynamic Type Definition b. Direct Type Definition
c. Document Type Definition d. Do the Dance
Q6. Is this a “well formed” XML document?
<?xml version= “1.0”?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don’t forget me this weekend!</body>
</note>
a. No b.Yes
Q7. Is this a “well formed” XML document?
<?xml version= “1.0”?>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don’t forget me this weekend!</body>
a. No b. Yes
Q8. Which statement is true?
a. All XML documents must have a DTD b. All XML elements must be lower case
c. All XML elements must be properly closed d. All the statements are true
Q9. Which statement is true?
a. XML tags are case sensitiv b. XML documents must have a root tag
c. XML elements must be properly nested d. All the statements are true
Q10. XML preserves white spaces
a. True b. False
Q11. Is this a “well formed” xml document?
<?xml version= “1.0”?>
<note>
<to age= “29”>Tove</to>
<from>Jani</from>
</note>
a. Yes b. No
Q12. Is this a “well formed” xml document?
<?xml version= “1.0”?>
<note>
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
31
<to age= 29>Tove</to>
<from>Jani</from>
</note>
a. Yes b. No
Q13. XML elements cannot be empty
a. False b. True
Q14. Which is not a correct name for an XML element?
a. <Note> b. All 3 names are incorrect c. <1 dollar> d. <h1>
Q15. Which is not a correct name for an XML element?
a. <NAME> b. <first name> c. <age> d. All 3 names are incorrect
Q16. Which is not a correct name for an XML document?
a. <xmldocument> b. <phone number> c. All 3 names are incorrect d. <7eleven>
Q17. XML attribute values must always be enclosed in quotes
a. False b. True
Q18. What does XSL stand for?
a. eXtra Style Language b. eXtensible Style Listing
c. eXpandable Style Language d. eXtensible Stylesheet Language
Q19. What is a correct way of referring to a stylesheet called “mystyle.xsl”?
a. <stylesheet type= “text/xsl” href= “mystyle.xsl”/>
b. <link type="text/xsl" href="mystyle.xsl" />
c. <?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?>
Q20. For the XML parser to ignore a certain section of your XML document, which
syntax is
correct?
a. <CDATA> Text to be ignored </CDATA> b. <![CDATA[ Text to be ignored ]]>
c. <xml:CDATA[ Text to be ignored ]> d. <PCDATA> Text to be ignored </PCDATA>
Q21. Which statement is true?
a. All the statements are true b. All XML elements must have a closing tag
c. All XML elements must be lower case d. All XML documents must have a DTD
Q22. Is it easier to process XML than HTML?
a. Yes b. No c. Sometimes d. Cant say
Q23. Which of the following programs support XML or XML applications?
a. Internet Explorer 5.5 b. Netscape 4.7 c. RealPlayer. d. both 1 and 2
Q24. Kind of Parsers are
a. well-formed b. well-documented c. non-validating and validating d. none of the
above
Q25. Well formed XML document means
a. it contains a root element
b. it contain an element
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
32
c. it contains one or more elements
d. must contain one or more elements and root element must contain all other
elements
Q26. Comment in XML document is given by
a. <?-- --> b. <!-- --!> c. <!-- --> d. </-- -- >
Q27. Which of the following strings are a correct XML name?
a. _myElement b. my Element c. #myElement d. None of the above
Q28. Which of the following XML fragments are well-formed?
a. <?xml?> b. <?xml version="1.0"?>
c. <?xml encoding="JIS"?> d. <?xml encoding="JIS" version="1.0"?>
Q29.Valid XML document means (most appropriate)
a. the document has root element
b. the document contains atleast one or more root element
c. the XML document has DTD associated with it & it complies with that DTD
d. Each element must nest inside any enclosing element property
Q30. XML uses the features of
a. HTML b. XHTML c. VML d. SGML
Q31. Which of the following XML documents are well-formed?
a. <firstElement>some text goes here
<secondElement>another text goes here</secondElement>
</firstElement>
b. <firstElement>some text goes here</firstElement>
<secondElement> another text goes here</secondElement>
c. <firstElement>some text goes here
<secondElement> another text goes here</firstElement>
</secondElement>
d. </firstElement>some text goes here
</secondElement>another text goes here<secondElement>
<firstElement>
Q32. To use the external DTD we have the syntax
a. <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
b. <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
c. <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT “order.dtd”?>
d. <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
Q33. The syntax for parameter entity is
a, <! ENTITY % NAME DEFINITION> b. < ENTITY % NAME DEFINITION>
c. <! ENTITY $ NAME DEFINITION> d. < ENTITY % NAME DEFINITION>
Q34. Which of the following XML fragments are well-formed?
a. <myElement myAttribute="someValue"/> b. <myElement myAttribute=someValue/>
c. <myElement myAttribute=’someValue’> d. <myElement myAttribute="someValue’/>
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
33
Q35. how to include external dtd in xml file
a. <!DOCTYPE rootnode SYSTEM "name of dtd file"> b. <!DOCTYPE childnode SYSTEM
"name of dtd file">
c. <!DOCTYPE rootnode src="name of dtd file"> d. <!DOCTYPE SYSTEM "name of dtd
file">
JSON
Q1. JSON stands for
a. java source object notes b. javascript object notation c. javascript orientation
d. none
Q2.JSON is
a. language and platform independent b. language dependent and platform independent
c. language independent and platform dependent d. none
Q3. Json is used to
a. Transfer data as key value pair b. Transfer data as image c. Transfer data as
arraylist d. None
Q4.To send data as Jason in php we use
a. json_encode(); b. encode_json() c. parsejson d. none
Q5.To read json data received from server javascript use
a. parseJSON(); b. parseHTML(); c. parseOBJECT() d. none
AJAX
Q1. Using AJAX we can make our web page
a. More inactive and faster b. Easy to connect web page with server
c. more dynamic d. none
Q2. XML Http Request object is a part of
a. W3C andard b. DOM Level 3 c. both 1 and 2 d. none
Q3. AJAX is combination of
a. java+css+xml b. java+css+DOM+xml c. avascript+css+DOM+XMLHttpRequest
Q4. What is AJAX?
a. AJAX = Asynchronous JavaScript and XML. b. AJAX = Asynchronous rquest and XML.
c. AJAX = Asynchronous JavaScript and HTML d. None
Q5. Ajax request pass through total how many readystate
a. 5 b. 4 c. 3 d. none
Q6. which Ajax property is used to read data from server
a. responseText b. responsetext c. responsedata d. none
Q7. Which method of Ajax hit server
a. send b. Hit c. Go d. none
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
34
Web Security
Q1. What is XSS stands for
a) Cross Site Scripting b) Extended site security c) None
Q2. ____ commonly targets scripts embedded in a page which are executed on the
client-side (in the user’s
web browser) rather than on the server-side
a) XSS b) SQL Injection c) None
Q3. attack by which fraudsters impersonate a legitimate company and attempt to
steal people’s personal
information or login credentials is called
a) Phishing email b) SQL Injection c) None
Q4. When developers fail to protect their users sensitive information such as user
names, passwords, and
session tokens there is a possibility of _________.
a) SQL Injection
b) Insecure Direct Object Reference
c) Cross-Site Request Forgery
d) Broken Authentication and Session Management
Q5. A security measure to stop unauthorized access to documents is:
a) Network access control. c) Business continuity/disaster recovery.
b) Physical access restrictions. d) Backup/restore.
Q6. What is an example of vulnerabilities in web-based programs and environments?
A. SQL injection B. Cross-site scripting C. All of the above D. None of the above
Q7. CSRF is stand for
A. Cross-Site Request Forgery B. Cross script format
C. Cascading script format D. Cross site required format
Q8. the placement of malicious code in SQL statements, via web page input. Is
called
a. SQL injection b. Cross-Site Request Forgery c. None
Q9. Phishing is form of___
A.Spamming B.Identity Theft C.Impersonation
Q10. Sniffing is used to perform___
A. Passive stack B. Active stack C. None
Q11. What is the best statement for taking advantage of a weakness in the security
of an IT System
A.Threat B. Attack C. Vulnerability
UI
1) Which of the following is correct about Bootstrap?
a. Bootstrap is a sleek, intuitive, and powerful, mobile first front-end framework
for faster andeasier web
development.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
35
b. It uses HTML, CSS and Javascript.
c. Bootstrap was developed by Mark Otto and Jacob Thornton at Twitter.
d. All of the above.
2) Which of the following is correct about Bootstrap?
a. Bootstrap's responsive CSS adjusts to Desktops,Tablets and Mobiles.
b. Provides a clean and uniform solution for building an interface for developers.
c. It contains beautiful and functional built-in components which are easy to
customize.
d. All of the above.
3) Which of the following is a part of Mobile First Strategy of Bootstrap?
a. Content: Determine what is most important.
b. Layout: Design to smaller widths first. Base CSS address mobile device first;
media queriesaddress for tablet,
desktops.
c. Progressive Enhancement: Add elements as screen size increases.
d. All of the above.
4) Which of the following is correct about Bootstrap Grid System?
a. Rows must be placed within a .container class for proper alignment and padding.
b. Use rows to create horizontal groups of columns.
c. Content should be placed within the columns, and only columns may be the
immediate childrenof rows.
d. All of the above.
5) Which of the following is correct about Bootstrap Grid System?
a. Predefined grid classes like .row and .col-xs-4 are available for quickly making
grid layouts. LESSmixins can
also be used for more semantic layouts.
b. Columns create gutters (gaps between column content) via padding. That padding
is offset inrows for the
first and the last column via negative margin on .rows.
c. Grid columns are created by specifying the number of twelve available columns
you wish tospan. For
example, three equal columns would use three .col-xs-4.
d. All of the above.
6) Which of the following is correct about Bootstrap Media Query?
a. It simply applies some CSS, based on certain conditions set forth. If those
conditions are met,the style is
applied.
b. Both of the above.
c. None of the above.
7) Which of the following is correct about Bootstrap Media Query?
a. Media queries have two parts, a device specification and then a size rule.
b. Media Queries in Bootstrap allow you to move, show and hide content based on the
viewportsize.
c. Both of the above.
d. None of the above.
8) Which of the following is correct about Bootstrap Mobile First Strategy?
a. You need to add the viewport meta tag to the element, to ensure proper rendering
and touch zooming on
mobile devices.
b. width property controls the width of the device. Setting it to device-width will
make sure thatit is rendered
across various devices (mobiles,desktops,tablets...) properly.
c. initial-scale=1.0 ensures that when loaded, your web page will be rendered at a
1:1 scale, andno zooming
will be applied out of the box.
d. All of the above.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
36
9) Which of the following is correct about Bootstrap Responsive Images?
a. Bootstrap 3 allows you to make the images responsive by adding a class ..img-
responsive tothe <.img> tag.
b. ..img-responsive class applies max-width: 100%; and height: auto; to the image
so that itscales nicely to the
parent element.
c. Both of the above.
d. None of the above.
10) Which of the following is correct about Bootstrap cross browser consistency?
a. Bootstrap uses Normalize to establish cross browser consistency.
b. Normalize.css is a modern, HTML5-ready alternative to CSS resets.
c. Normalize.css is a small CSS file that provides better cross-browser consistency
in the defaultstyling of HTML
elements.
d. All of the above.
11) Which of the following class styles a table as a nice basic table with just
some light padding and horizontal
dividers?
A. table B. table-striped C. table-bordered D. table-hover
12) Which of the following class styles a table as a nice basic table with stripes
on rows?
A. table B. table-striped C. table-bordered D. table-hover
13) Which of the following class styles a table with borders surrounding every
element and rounded corners
around the entire table?
A. table B. table-striped C. table-bordered D. table-hover
14) Which of the following class styles a table with a light gray background to
rows while the cursor hovers over
them?
A. table B. table-striped C. table-bordered D. table-hover
15) Which of the following class applies the hover color to a particular row or
cell of a table?
A. active B. success C. warning D. danger
16) Which of the following class indicates a successful or positive action?
A. active B. success C. warning D. danger
17) Which of the following class indicates a warning that might need attention?
A. active B. success C. warning D. danger
18) Which of the following class indicates a dangerous or potentially negative
action?
A. active B. success C. warning D. danger
19) Which of the following class can be used to create a responsive table?
A. table-responsive B. responsive C. active D. table
20) Which of the following is the default layout of a bootstrap form?
A. vertical B. inline C. horizontal D. None of the above.
21) Which of the following class is required to be added to form tag to make it
inline?
A. inline B. form-inline C. horizontal D. None of the above.
Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 18 Advanced Web Programming Question Bank
37
22) Which of the following class is required to be added to form tag to make it
horizontal?
A. horizontal B. form-horizontal C. horizontal D. None of the above.
23) Which of the following is true about bootstrap help text?
a. Bootstrap form controls can have a block level help text that flows with the
inputs.
b. To add a full width block of content, use the .help-block after the <input>.
c. Both of the above.
d. None of the above.
24) Which of the following bootstrap style of button creates a default/ standard
button?
A.btn B. btn-primary C. btn-success D. btn-info
25) Which of the following bootstrap style of button provides extra visual weight
and identifies the primary
action in a set of buttons?
A.btn B. btn-primary C. btn-success D. btn-info
Vidyanidhi Info Tech Academy
PG DAC Question Bank
1
Vidyanidhi Info Tech Academy
Contents
Architecture of
web................................................................................
...................................................................................
. 1
HTML...............................................................................
...................................................................................
......................... 4
CSS ...............................................................................
...................................................................................
..........................15
PHP................................................................................
...................................................................................
.........................23
XML ...............................................................................
...................................................................................
.........................30
JSON...............................................................................
...................................................................................
........................33
AJAX ..............................................................................
...................................................................................
.........................34
Web
Security...........................................................................
...................................................................................
...............34
UI.................................................................................
...................................................................................
...........................35
Architecture of web
1. A piece of icon or image on a web page associated with another webpage is called
a) url b) hyperlink c) plugin d) none of the mentioned
2. Dynamic web page
a) is same every time whenever it displays
b) generates on demand by a program or a request from browser
c) both (a) and (b)
d) none of the mentioned
3. What is a web browser?
a) a program that can display a web page
b) a program used to view html documents
c) it enables user to access the resources of internet
d) all of the mentioned
4. Common gateway interface is used to
a) generate executable files from web content by web server
b) generate web pages
c) stream videos
d) none of the mentioned
5. URL stands for
a) unique reference label b) uniform reference label
c) uniform resource locator d) unique resource locator
6. A web cookie is a small piece of data
a) sent from a website and stored in user’s web browser while a user is browsing a
website
b) sent from user and stored in the server while a user is browsing a website
c) sent from root server to all servers
d) none of the mentioned
Vidyanidhi Info Tech Academy
PG DAC Question Bank
2
Vidyanidhi Info Tech Academy
7. Which one of the following is not used to generate dynamic web pages?
a) PHP b) ASP.NET c) JSP d) None of the mentioned
8. An alternative of javascript on windows platform is
a) VBScript b) ASP.NET c) JSP d) None of the mentioned
9. What is document object model (DOM)?
a) convention for representing and interacting with objects in html documents
b) application programming interface
c) hierarchy of objects in ASP.NET
d) none of the mentioned
10. AJAX stands for
a) asynchronous javascript and xml b) advanced JSP and xml
c) asynchronous JSP and xml d) advanced javascript and xml
11. The number of objects in a Web page which consists of 4 jpeg images and HTML
text is ________
a) 4 b) 1 c) 5 d) None of the mentioned
Explanation: 4 jpeg images + 1 base HTML file.
12. The default connection type used by HTTP is _________
a) Persistent b) Non-persistent
c) Either of the mentioned d) None of the mentioned
13. The time taken by a packet to travel from client to server and then back to the
client is called
a) STT b) RTT c) PTT d) None of the mentioned
Explanation: RTT stands for round-trip time.
14. The HTTP request message is sent in _________ part of three-way handshake.
a) First b) Second c) Third d) None of the mentioned
15. In the process of fetching a web page from a server the HTTP request/response
takes __________ RTTs.
a) 2 b) 1 c) 4 d) 3
16. The first line of HTTP request message is called _____________
a) Request line b) Header line c) Status line d) Entity line
Explanation: The line followed by request line are called header lines and status
line is the initial part of
response message.
17. The values GET, POST, HEAD etc are specified in ____________ of HTTP message
a) Request line b) Header line c) Status line d) Entity body
Explanation: It is specified in the method field of request line in the HTTP
request message.
18. The __________ method when used in the method field, leaves entity body empty.
a) POST b) GET c) Both of the mentioned d) None of the mentioned
19. The HTTP response message leaves out the requested object when ____________
method is used
a) GET b) POST c) HEAD d) PUT
20. Find the oddly matched HTTP status codes
a) 200 OK b) 400 Bad Request
Vidyanidhi Info Tech Academy
PG DAC Question Bank
3
Vidyanidhi Info Tech Academy
c) 301 Moved permanently d) 304 Not Found
Explanation: 404 Not Found.
21. Which of the following is not correct ?
a) Web cache doesnt has its own disk space
b) Web cache can act both like server and client
c) Web cache might reduce the response time
d) Web cache contains copies of recently requested objects
22. The conditional GET mechanism
a) Imposes conditions on the objects to be requested
b) Limits the number of response from a server
c) Helps to keep a cache upto date
d) None of the mentioned
13. Which of the following is present in both an HTTP request line and a status
line?
a) HTTP version number b) URL c) Method d) None of the mentioned
14. Multiple object can be sent over a TCP connection between client and server in
a) persistent HTTP b) nonpersistent HTTP
c) both (a) and (b) d) none of the mentioned
15. HTTP is ________ protocol.
a) application layer b) transport layer
c) network layer d) none of the mentioned
16. In the network HTTP resources are located by
a) uniform resource identifier
b) unique resource locator
c) unique resource identifier
d) none of the mentioned
17. HTTP client requests by establishing a __________ connection to a particular
port on the server.
a) user datagram protocol
b) transmission control protocol
c) broader gateway protocol
d) none of the mentioned
18. In HTTP pipelining
a) multiple HTTP requests are sent on a single TCP connection without waiting for
the corresponding
responses
b) multiple HTTP requests can not be sent on a single TCP connection
c) multiple HTTP requests are sent in a queue on a single TCP connection
d) none of the mentioned
19. FTP server listens for connection on port number
a) 20 b) 21 c) 22 d) 23
20. In FTP protocol, client contacts server using ____ as the transport protocol.
a) transmission control protocol
Vidyanidhi Info Tech Academy
PG DAC Question Bank
4
Vidyanidhi Info Tech Academy
b) user datagram protocol
c) datagram congestion control protocol
d) stream control transmission protocol
21. In which mode FTP, the client initiates both the control and data connections.
a) active mode b) passive mode
c) both (a) and (b) d) none of the mentioned
22. The file transfer protocol is built on
a) data centric architecture b) service oriented architecture
c) client server architecture d) none of the mentioned
23. In file transfer protocol, data transfer can be done in
a) stream mode b) block mode c) compressed mode d) all of the mentioned
HTML
Q1. Body tag do not have a attribute
a. text b. bgcolor c. font
Q2. To increase font size
a. <font size=5> b. <text size=5> c. <size=5>
Q3. It will bring the text on next line
a. <br> b. <break> c. <b>
Q4. It will always display data on next line
a. <p> b. <h> c. <pre>
Q5. It will display data after leaving one line
a. <h3> b. <p> c. <b>
Q6. In img tag align attribute can not have value
a. left b. right c. center
Q7. small tag increase font size
a. to 3 b. +1 from current size c. -1 from current size
Q8. big tag increase font size
a. to 4 b.+1 from current size c. -1 from current size
Q9. it is used to link two file
a. anchor tag b. link c. href
Q10. B and strong tag is used to make text
a. italic b. bold c. underline
Q11. It is used to give red color to the text
a. <font color=”red”> b. <fon color=”blue”> c. <text color=”red”>
Vidyanidhi Info Tech Academy
PG DAC Question Bank
5
Vidyanidhi Info Tech Academy
Q12. minimum heading is
a. <h1> b. <h5> c. <h6>
Q13. Max heading is
a. <h6> b. <h5> c. <h1>
Q14. It is used to display data as it appear in editor
a. <BLOCKQUOTE> b. <PRE> c. <EM>
Q15. Hyperlink is also cold as
a. HOT SPOT b. LINK c. A
Q16. It is used to display data in center and bold in table tag
a. td b. th c. tr
Q17. It is used to display image
a. <image link=”pot.gif”> b. <img src=”pot.gif”> c.<img href=”pot.gif”>
Q18. which attribute is used to keep background fixed
a. bgproperties b. attachment c. scroll
Q19. It is used to animate text
a. blink b. marquee c.<a>
Q20. It is used to display horizontal line
a. <line> b. <hr> c.<vr>
Q21. This attribute will increase the speed of marquee text
a. scrollamount b. speed c. Behavior
Q22. This attribute of form take you to the another page
a. action b. anchor c.name
Q23. This display data of form in url
a. <form method=”post”> b. <form method=”get”> c. <form method=”dopost”>
Q24. How to give link to your email
a. <a href=”www.reidffmail.com”/>
b. c . <a href=”mailto:[email protected]”>
c. <a email=”[email protected]”>
Q25. It allows you to select only one option at a time
a. choice b. checkbox c. radio
Q26. It allows you to select multiple option at a time
b. Choice b. checkbox c. radio
Vidyanidhi Info Tech Academy
PG DAC Question Bank
6
Vidyanidhi Info Tech Academy
Q27. What is the correct tag for drop down box
a. <select> b. <combobox> c. <option>
Q28. Which attribute enables you to select multiple option in dropdown box
a. multiple b. selected c. more
Q29. Which attribute display data on button
a.name b. value c. button
Q30. Which attributes value is used as variable
a. value b. name c. submit
Q31. What is default value of submit button in IE
a. SUBMITQUERY b. SUBMIT c. RESET
Q32. Correct tag to clear form
a. <input type=”reset” value=”reset”>
b. <input type=”clear” value=”reset”>
c. <input type=”button” value=”reset”>
Q33. To mark checkbox checked as default you use
a. <input type=”checkbox” checked=ch
b. <input type=”checkbox” checked=”true”>
c. <input type=”checkbox” checked=unchecked”>
Q34. What is the correct HTML for adding a background color?
a. <body bgcolor="yellow">
b. <background>yellow</background>
c. <body color="yellow">
Q35. How can you open a link in a new browser window?
a. <a href="url" target="_blank">
b. <a href="url" new>
c. <a href="url" target="new">
Q36. Choose the correct HTML to left-align the content inside a tablecell?
a. <tdleft> b. +<td leftalign> c. <td valign="left"> d. <td align="left">
Q37. How can you make a list that lists the items with bullets?
a. <ol> b. <list> c. <ul> d. <dl>
Q38. What is the correct HTML for making a drop-down list?
a. <list> b. <input type="dropdown"> c. <input type="list"> d. <select>
Q39. What is the correct HTML for making a text area?
a. <input type="textarea"> b. <textarea> c. <input type="textbox">
Q40. Links are also known as
Vidyanidhi Info Tech Academy
PG DAC Question Bank
7
Vidyanidhi Info Tech Academy
a. Hotspots b. Anchors c. Both 1 and 2 d. None of the above
Q41. While ____ is a generic inline element that applies no inherent formatting,
the ____ is a generic block
leve element that applies no inherent formatting.
a. DIV, SPAN b. GROUP, DIV c. SPAN, DIV d. SPAN, GROUP
Q42.How do you display hyperlinks without an underline?
a. {text-decoration:none} b. {text-decoration:no underline}
c. {underline:none} d. {decoration:no underline}
Q43. In the SELECT element, the attribute SIZE specifies
a. Height b. Width c. Max size d. Visible size
Q44. The SRC attribute of______ specifies the URL of a HTML file to be displayed in
a Frame
a. IFrame b. Frameset c. src d. href
Q45. The linked regions of an image map are called_____
a. anchors b. source c. transfer d. hot regions
Q46. The ______attribute takes text to be displayed in case the Browser is unable
to display the image specified
in the SRC attribute.
a. ALT b. href c. link d. vspace
Q47. Main protocol used in Internet is:
a. IPX/SPX b. Zolan Bus c. TCP/IP d. X.25
Q48. Who is making the Web standards?
a. The World Wide Web Consortium b. Microsoft c. Netscape
Q49.Which of these tags are all <table> tags?
a. <table><tr><tt> b. <thead><body><tr> c. <table><head><tfoot> d. <table><tr><td>
Q50. What is the correct HTML for inserting a background image?
a. <img src="background.gif" background>
b. <body background="background.gif">
c. <background img="background.gif">
Q51. How to open link in new unique window
a. Target=_new b. Target=_self c. Target=_blank
Q52. align attribute can not be used with
a. Hr b. H1 c. Font
Q53. What is ALT text
a. Text display when image is not found b. Text display when you hold mouse over
image c. Both
Q54. How can you make a row stretch over 2 column
a. <td colspan=2> b. <td rowspan=2> c. <rd colspan=2>
Q55. How to define table background color
Vidyanidhi Info Tech Academy
PG DAC Question Bank
8
Vidyanidhi Info Tech Academy
a. Background-color= b. bgcolor= c. ackgroundcolor=
Q56. How to table give border color
a. Border= b. Bordercolor= c. Bgcolor=
Q57. Default font size is
a. 7 b. 2 c. 3
Q58. Server is one who
a. Provide service b. Host website c. Both
Q59. It will put horizontal line on the text
a. Hr b. Strike c. Table
Q60. Tag used to give heading to option in select tag
a. <optgoup lable=”heading”> b. <option value=”heading”> c. <select
name=”heading”>
Q61. Which two tag has same effect
a. <i>,<b> b.<strong><b> c. <b><cite>
Q62. Attribute used to increase the height of line in <hr> tag
a. Height b. Size c. Length
Q63. It will increase the speed of marquee tag
a. Scroll b. Scrollamount c. Behavior
Q64. What are the attribute of anchar tag
a. Name,href,target,src b. Name,href,target,title c. Href, tooltip,src
Q65. It interprete the html code
a. Server b. Browser c. notepad
Q66. Which of the following is true about HTML 5?
a. HTML5 is the next major revision of the HTML standard superseding HTML 4.01,
XHTML 1.0, and XHTML 1.1.
b. HTML5 is a standard for structuring and presenting content on the World Wide
Web.
c. HTML5 is a cooperation between the World Wide Web Consortium W3C and the Web
Hypertext Application
Technology Working Group WHATWG.
d. All of the above.
Q67. Which of the following feature is a part of HTML 5?
a. Persistent Local Storage b. WebSocket c. Server-Sent Events d. All of the
above.
Q68. Which of the following feature is a part of HTML 5?
a. Canvas b. Audio & Video c. Geolocation d. All of the above.
Q69. Which of the following browser supports HTML5 in its latest version?
a. Apple Safari b. Google Chrome c. Both of the above. d. None of the above.
Q70. Which of the following browser supports HTML5 in its latest version?
a. Mozilla Firefox b. Opera c. Both of the above. d. None of the above.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
9
Vidyanidhi Info Tech Academy
Q71. Which of the following browser supports HTML5 in its latest version?
a. Mozilla Firefox b. Opera c. Both of the above. d. None of the above.
Q72. Is HTML5 backward compatible with old browsers?
a. true b. false
Q73. Are HTML tags case sensitive?
a. true b. false
Q74. Which of the following tag represents a generic document or application
section in HTML5?
a. section b. article c. aside d. header
Q75. Which of the following tag represents an independent piece of content of a
document in HTML5?
a. section b. article c. aside d. header
Q76. Which of the following tag represents a piece of content that is only slightly
related to the rest of the page
in HTML5?
a. section b. article c. aside d. header
Q77. Which of the following tag represents the header of a section in HTML5?
a. section b. article c. aside d. header
Q78. Which of the following tag represents the footer of a section in HTML5?
a. footer b. nav c. section d. dialog
Q79. Which of the following tag represents a section of the document intended for
navigation in HTML5?
a. footer b. nav c. section d. dialog
Q80. Which of the following tag can be used to mark up a conversation in HTML5?
a. footer b. nav c. dialog d. figure
Q81. Which of the following tag can be used to associate a caption together with
some embedded content in
HTML5?
a. footer b. nav c. dialog d. figure
Q82. Which of the following is correct about custom attributes in HTML5?
a. A custom data attribute starts with data- and would be named based on your
requirement.
b. You would be able to get the values of these attributes using JavaScript APIs
or CSS in similar way as you
get for standard attributes.
c. Both of the above. d. None of the above.
Q83. Which of the following is correct about custom attributes in HTML5?
a. A custom data attribute starts with data- and would be named based on your
requirement.
b. You would be able to get the values of these attributes using JavaScript APIs
or CSS in similar way as you
get for standard attributes.
c. Both of the above. d. None of the above.
Q84. Which of the following is correct about Web form 2.0 in HTML5?
a. Web Forms 2.0 is an extension to the forms features found in HTML4.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
10
Vidyanidhi Info Tech Academy
b. Form elements and attributes in HTML5 provide a greater degree of semantic
mark-up than HTML4.
c. Form elements and attributes in HTML5 remove a great deal of the need for
tedious scripting and styling
that was required in HTML4.
d. All of the above.
Q85. Which of the following is correct about Web form 2.0 in HTML5?
a. Web Forms 2.0 is an extension to the forms features found in HTML4.
b. Form elements and attributes in HTML5 provide a greater degree of semantic
mark-up than HTML4.
c. Form elements and attributes in HTML5 remove a great deal of the need for
tedious scripting and styling
that was required in HTML4.
d. All of the above.
Q86. Which of the following input control represents a date and time year, month,
day, hour, minute, second,
fractions of a second encoded according to ISO 8601 with the time zone set to UTC
in Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q87. Which of the following input control represents a date and time year, month,
day, hour, minute, second,
fractions of a second encoded according to ISO 8601 with no time zone information
in Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q88. Which of the following input control represents a date year, month, day
encoded according to ISO 8601 in
Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q89. Which of the following input control represents a date consisting of a year
and a month encoded according
to ISO 8601 in Web Form 2.0?
a. datetime b. datetime-local c. date d. month
Q90. Which of the following input control represents a date consisting of a year
and a week number encoded
according to ISO 8601 in Web Form 2.0?
a. week b. time c. number d. range
Q91. Which of the following input control represents a time hour, minute, seconds,
fraction al seconds encoded
according to ISO 8601 in Web Form 2.0?
a. week b. time c. number d. range
Q92. Which of the following input control accepts only numerical value in Web Form
2.0?
a. week b. time c. number d. range
Q93. Which of the following input control is used for input fields that should
contain a value from a range of
numbers in Web Form 2.0?
a. week b. time c. number d. range
Q94. Which of the following input control is used for input fields that should
contain an e-mail address in Web
Form 2.0?
a. email b. url c. number d. range
Q95. Which of the following input control is used for input fields that should
contain an URL address in Web
Form 2.0?
a. email b. url c. number d. range
Vidyanidhi Info Tech Academy
PG DAC Question Bank
11
Vidyanidhi Info Tech Academy
Q96. Which of the following tag is used to represent the result of different types
of output in HTML5?
a. output b. placeholder c. autofocus d. required
Q97. Which of the following tag provides a hint to the user of what can be entered
in the field in HTML5?
a. output b. placeholder c. autofocus d. required
Q98. Which of the following tag automatically focus one particular form field in
HTML5?
a. output b. placeholder c. autofocus d. required
Q99. Which of the following tag insists to have a value in an input control in
HTML5?
a. output b. placeholder c. autofocus d. required
Q100. Can you use SVG tags directly in HTML5 without any plugin?
a. true b. false
Q101. Can you use MathML tags directly in HTML5 without any plugin?
a. true b. false
Q102. Which of the following is true about Cookies?
a. Cookies are included with every HTTP request, thereby slowing down your web
application by
transmitting the same data.
b. Cookies are included with every HTTP request, thereby sending data unencrypted
over the internet.
c. Cookies are limited to about 4 KB of data .Not enough to store required data.
d. All of the above.
Q103. Which of the following is true about Session Storage in HTML5?
a. HTML5 introduces the session Storage attribute which would be used by the sites
to add data to the
session storage.
b. It will be accessible to any page from the same site opened in that window i.e.
session.
c. As soon as you close the window, session would be lost.
d. All of the above.
Q104. Which of the following is true about Local Storage in HTML5?
a. HTML5 introduces the local Storage attribute which would be used to access a
page's local storage area
without no time limit.
b. This local storage will be available whenever you would use that page.
c. Both of the above.
d. None of the above.
Q105. When a session storage data gets deleted in HTML5?
a. The Session Storage Data would be deleted by the browsers immediately after the
session gets
terminated.
b. If you want to clear all settings, you need to call localStorage. clear method.
c. Both of the above.
d. None of the above.
Q106. How to delete a local storage data in HTML5?
Vidyanidhi Info Tech Academy
PG DAC Question Bank
12
Vidyanidhi Info Tech Academy
a. To clear a local storage setting you would need to call localStorage.remove′key
′; where 'key' is the key of
the value you want to remove.
b. If you want to clear all settings, you need to call localStorage. clear method.
c. Both of the above.
d. None of the above.
Q107. Which of the following is correct about Server Side EventsSSE in HTML5?
a. Using SSE you can push DOM events continously from your web server to the
visitor's browser.
b. The event streaming approach opens a persistent connection to the server,
sending data to the client
when new information is available, eliminating the need for continuous polling.
c. Server-sent events standardizes how we stream data from the server to the
client.
d. All of the above.
Q108. Which of the following is correct about Server Side EventsSSE in HTML5?
a. To use Server-Sent Events in a web application, you would need to add an
<eventsource> element to
the document.
b. The src attribute of <eventsource> element should point to an URL which should
provide a persistent
HTTP connection that sends a data stream containing the events.
c. The URL would point to a PHP, PERL or any Python script which would take care
of sending event data
consistently.
d. All of the above.
Q109. Which of the following is correct Content-type header that a server side
script should send for SSE in
HTML5?
a. Content-Type: text/event-stream b. Content-Type: text/application-stream
c. Content-Type: text/data-stream d. None of the above.
Q110. Which of the following is correct about WebSockets in HTML5?
a. Web Sockets is a next-generation bidirectional communication technology for web
applications which
operates over a single socket and is exposed via a JavaScript interface in HTML 5
compliant browsers.
b. Once you get a Web Socket connection with the web server, you can send data
from browser to server
by calling a send method, and receive data from server to browser by an onmessage
event handler.
c. Both of the above.
d. None of the above.
Q111. Which value of Socket.readyState atribute of WebSocket indicates that the
connection has not yet been
established?
a. 0 b. 1 c. 2 d. 3
Q112. Which value of Socket. readyState atribute of WebSocket indicates that the
connection is established and
communication is possible?
a. 0 b. 1 c. 2 d. 3
Q113. Which value of Socket.readyState atribute of WebSocket indicates that the
connection is going through
the closing handshake?
a. 0 b. 1 c. 2 d. 3
Q114. Which value of Socket.readyState atribute of WebSocket indicates that the
connection has been closed or
could not be opened?
a. 0 b. 1 c. 2 d. 3
Vidyanidhi Info Tech Academy
PG DAC Question Bank
13
Vidyanidhi Info Tech Academy
Q115. Which of the following is true about 'canvas' tag in HTML5?
a. HTML5 element <canvas> gives you an easy and powerful way to draw graphics
using JavaScript.
b. It can be used to draw graphs, make photo compositions or do simple and not so
simplea nimations.
c. Both of the above.
d. None of the above.
Q116. Which of the following is true about 'audio' tag in HTML5?
a. HTML5 supports <audio> tag which is used to embed sound content in an HTML or
XHTML document.
b. The current HTML5 draft specification does not specify which audio formats
browsers should support in
the audio tag.
c. Both of the above.
d. None of the above.
Q117. Which of the following is true about 'audio' tag in HTML5?
a. Commonly used audio formats ogg, mp3 and wav are supported.
b. You can use <source> tag to specify media along with media type and many other
attributes.
c. An audio element allows multiple source elements and browser will use the first
recognized format.
d. All of the above.
Q118. Which of the following is true about 'video' tag in HTML5?
a. HTML5 supports <video> tag which is used to embed a video file in an HTML or
XHTML document.
b. The current HTML5 draft specification does not specify which video formats
browsers should support in
the video tag.
c. Ogg files with Thedora video codec and Vorbis audio codec are supported.
d. All of the above.
Q119. Which of the following is true about 'video' tag in HTML5?
a. MPEG4 files with H.264 video codec and AAC audio codec are supported.
b. You can use <source> tag to specify media along with media type and many other
attributes.
c. An video element allows multiple source elements and browser will use the first
recognized format.
d. All of the above.
Q120. Which of the following is correct about geolocation api in HTML5?
a. HTML5 Geolocation API lets you share your location with your favorite web
sites.
b. A Javascript can capture your latitude and longitude and can be sent to backend
web server and do
fancy location-aware things like finding local businesses or showing your location
on a map.
c. Today most of the browsers and mobile devices support Geolocation API.
d. All of the above.
Q121. Which of the following is correct about geolocation api in HTML5?
a. The geolocation APIs work with a new property of the global navigator object.
b. The geolocation object is a service object that allows widgets to retrieve
information about the
geographic location of the device.
c. Both of the above.
d. None of the above.
Q122. Which of the following method returns a geolocation object in HTML5?
a. navigator.geolocation b. browser.geolocation c. API.geolocation d.None of the
above.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
14
Vidyanidhi Info Tech Academy
Q123. Which of the following method retrieves the current geographic location of
the user?
a. geolocation.getCurrentPosition b. geolocation.watchPosition
geolocation.clearPosition d. None of the above.
Q124. Which of the following method cancels an ongoing watchPosition call?
a. geolocation.getCurrentPosition b. geolocation.watchPosition
c. geolocation.clearPosition d. None of the above.
Q125. Which of the following is correct about web workers in HTML5?
a. Web Workers do all the computationally expensive tasks without interrupting the
user interface and
typically run on separate threads.
b. Web Workers allow for long-running scripts that are not interrupted by scripts
that respond to clicks or
other user interactions.
c. Web Workers allow long tasks to be executed without yielding to keep the page
responsive.
d. All of the above.
Q126. Which of the following attribute specifies a keyboard shortcut to access an
element in HTML5?
a. accesskey b. key c. contextmenu d. contextkey
Q127. Which of the following attribute specifies if the user can edit the element's
content or not?
a. editable b. contenteditable c. contextmenu d. content
Q128. Which of the following attribute specifies the context menu for an element?
a. key b. contextcontent c. contextmenu d. context
Q129. Which of the following attribute specifies whether or not a user is allowed
to drag an element?
a. drag b. content c. context d. draggable
Q130. Which of the following attribute is used to group elements?
a. item b. itemprop c. itemcheck d. itemgroup
Q131. Which of the following attribute is used to group items?
a. item b. itemprop c. itemcheck d. itemgroup
Q132. Which of the following attribute specifies if the element must have it's
spelling or grammar checked?
a. item b. itemcheck c. spellcheck d. itemgroup
Q133. Which of the following attribute triggers event when the document goes
offline?
a. offline b. off c. out d. onbeforeonload
Q134. Which of the following attribute triggers an abort event?
a. offline b. onabort c. abort d. onbeforeonload
Q135. Which of the following attribute triggers event after the document is
printed?
a. offlineprint b. onprint c. onafterprint d. onbeforeprint
Q136. Which of the following attribute triggers event before the document loads?
a. offline b. onabort c. onload d. onbeforeonload
Q137. Which of the following attribute triggers event before the document is
printed?
Vidyanidhi Info Tech Academy
PG DAC Question Bank
15
Vidyanidhi Info Tech Academy
a. onbeforeprint b. onafterprint c. onprint d. beforeprint
Q138. Which of the following attribute triggers event when the window loses focus?
a. onbeforeload b. onblur c. onlostfocus d. lostfocus
Q139. Which of the following attribute triggers event when media can start play,
but might has to stop for
buffering?
a. onbeforeplay b. onplay c. oncanplay d. oncanplaythrough
CSS
Q1. Which of the following is correct about CSS?
a. CSS is used to control the style of a web document in a simple and easy way.
b. You can write CSS once and then reuse same sheet in multiple HTML pages.
c. All of the above.
Q2. Which of the following is correct about CSS?
a. Style sheets allow content to be optimized for more than one type of device.
b. CSS can store web applications locally with the help of an offline catche.
c. Using CSS, we can view offline websites. The cache also ensures faster loading
and better overall
performance of the website.
d. All of the above.
Q3. Which of the following is a component of CSS style rule?
a. Selector b. Property c. Value d. All of the above.
Q4. Which of the following selector matches all elements of a type?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q5. Which of the following selector matches the name of any element type?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q6. Which of the following selector matches a particular element only when it lies
inside a particular element?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q7. Which of the following selector matches a element based on its class attribute?
a. The Type Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q8. Which of the following selector matches a element based on its id?
a. The Id Selector b. The Universal Selector c. The Descendant Selector d. The
Class Selector
Q9. How to apply a style to several specific element types?
a. Use the type selector with, delimiter b. Use the type selector with .delimiter
c. Use the ID selector with ; delimiter d. Use the ID selector with > delimiter
Q10. Which property applies a color to text?
a. text-color b. foreground-color c. background-color d. color
Q11. Which values for font-family property is valid?
a. Times New Roman, serif b. “Times New Roman", serif
Vidyanidhi Info Tech Academy
PG DAC Question Bank
16
Vidyanidhi Info Tech Academy
c. Times New Roman; serif;zz d. “Times New Roman"; "serif";
Q12. What does the ID selector do?
a. Apply the style to a specific element b. Apply the style to all the elements
d. Apply the style to a group of elements d. Apply the style to elements of the
same type
Q13. Which of the following is a way to associate styles with your HTML document?
a. Embedded CSS - The <style> Element b. Inline CSS - The style Attribute
c. Both of the above. d. None of the above.
Q14. Which of the following is a way to associate styles with your HTML document?
a. External CSS - The Element b. Imported CSS - @import Rule
c. Both of the above. d. None of the above.
Q15. Which of the following is a true about CSS style overriding?
a. Any inline style sheet takes highest priority. So, it will override any rule
defined in tags or rules defined in
any external style sheet file.
b. Any rule defined in tags will override rules defined in any external style
sheet file.
c. Any rule defined in external style sheet file takes lowest priority, and rules
defined in this file will be
applied only when above two rules are not applicable.
d. All of the above.
Q16. Which of the following defines a measurement as a percentage relative to
another value, typically an
enclosing element?
a. % b. cm c. em d. ex
Q17. Which of the following defines a measurement in centimeters?
a. % b. cm c. em d. ex
Q18. Which of the following defines a relative measurement for the height of a font
in em spaces?
a. % b. cm c. em d. ex
Q19. Which of the following defines a measurement relative to a font's x-height?
a. % b. cm c. em d. ex
Q20. Which of the following defines a measurement in inches?
a. in b.mm c. pc d. pt
Q21. Which of the following defines a measurement in millimetre ?
a. in b. mm c. pc d. pt
Q22. Which of the following defines a measurement in picas?
a. in b. mm c. pc d. pt
Q23. Which of the following defines a measurement in points?
a. in b. mm c. pc d. pt
Q24. Which of the following defines a measurement in screen pixels?
a. px d. vh c. vw d. vmin
Vidyanidhi Info Tech Academy
PG DAC Question Bank
17
Vidyanidhi Info Tech Academy
Q25. Which of the following defines 1% of viewport height?
a. px b. vh c. vw d. vmin
Q26. Which of the following is correct about Hex Code format of CSS colors?
a. The first two digitsRR represent a red value. b. The next two are a green
valueGG.
c. The last are the blue valueBB. d. All of the above.
Q27. Which of the following is correct about Short Hex Code format of CSS colors?
a. This is a shorter form of the six-digit notation.
b. In this format, each digit is replicated to arrive at an equivalent six-digit
value.
c. Each hexadecimal code will be preceded by a pound or hash sign '#'.
d. All of the above.
Q28. Which of the following is correct about RGB Values format of CSS colors?
a. This color value is specified using the rgb property.
b. This property takes three values, one each for red, green, and blue.
c. The value can be an integer between 0 and 255 or a percentage.
d. All of the above.
Q29. Which of the following is correct about Browser Safe Colors?
a. These are 216 colors which are supposed to be most safe and computer
independent colors.
b. These colors vary from hexa code 000000 to FFFFFF.
c. These colors are safe to use because they ensure that all computers would
display the colors
correctly when running a 256 color palette.
d. All of the above.
Q30. Which of the following property is used to set the background color of an
element?
a. background-color b. background-image c. background-repeat d. background-
position
Q31. Which of the following property is used to set the background image of an
element?
a. background-color b. background-image c. background-repeat d. background-
position
Q32. Which of the following property is used to control the repetition of an image
in the background?
a. background-color b. background-image c. background-repeat d. background-
position
Q33. Which of the following property is used to control the position of an image in
the background?
a. background-color b. background-image c. background-repeat d. background-
position
Q34. Which of the following property is used to control the scrolling of an image
in the background?
a. background-attachment b. background c. background-repeat d. background-position
Q35. Which of the following property is used as a shorthand to specify a number of
other background
properties?
a. background-attachment b. background c. background-repeat d. background-position
Q36. Which of the following property is used to change the face of a font?
a. font-family b. font-style c. font-variant d. font-weight
Q37. Which of the following property is used to make a font italic or oblique?
a. font-family b. font-style c. font-variant d. font-weight
Vidyanidhi Info Tech Academy
PG DAC Question Bank
18
Vidyanidhi Info Tech Academy
Q38. Which of the following property is used to create a small-caps effect?
a. font-family b. font-style c. font-variant d. font-weight
Q39. Which of the following property is used to increase or decrease how bold or
light a font appears?
a. font-family b. font-style c. font-variant d. font-weight
Q40. Which of the following property is used to increase or decrease the size of a
font?
a. font-size b. font c. font-variant d. font-weight
Q41. Which of the following property is used as shorthand to specify a number of
other font properties?
a. font-size b. font c. font-variant d. font-weight
Q42. Which of the following property is used to set the color of a text?
a. color b. direction c. letter-spacing d. word-spacing
Q43. Which of the following property is used to set the text direction?
a. color b. direction c. letter-spacing d. word-spacing
Q44. Which of the following property is used to add or subtract space between the
letters that make up a word?
a. color b. direction c. letter-spacing d. word-spacing
Q45. Which of the following property is used to add or subtract space between the
words of a sentence?
a. color b. direction c. letter-spacing d. word-spacing
Q46. Which of the following property is used to add or subtract space between the
words of a sentence?
a. text-indent b. text-align c. text-decoration d. text-transform
Q47. Which of the following property is used to align the text of a document?
a. text-indent text-alignc c. text-decoration d. text-transform
Q48. Which of the following property is used to underline, overline, and
strikethrough text?
a. text-indent b. text-align c. text-decoration d. text-transform
Q49. Which of the following property is used to capitalize text or convert text to
uppercase or lowercase letters?
a. text-indent b. text-align c. text-decoration d. text-transform
Q50. Which of the following property is used to control the flow and formatting of
text?
a. white-space b. text-shadow c. text-decoration d. text-transform
Q51. Which of the following property is used to set the text shadow around a text?
a. white-space b. text-shadow c. text-decoration d. text-transform
Q52. Which of the following property is used to set the width of an image border?
a. border b. height c. width d. moz-opacity
Q53. Which of the following property is used to set the height of an image?
a. border b. height c. width d. moz-opacity
Vidyanidhi Info Tech Academy
PG DAC Question Bank
19
Vidyanidhi Info Tech Academy
Q54. Which of the following property is used to set the width of an image?
a. border b. height c. width d. moz-opacity
Q55. Which of the following property is used to set the opacity of an image?
a. border b. height c. width d. moz-opacity
Q56. Which of the following property of a anchor element signifies unvisited
hyperlinks?
a. :link b. :visited c. :hover d. :active
Q57. Which of the following property of a anchor element signifies visited
hyperlinks?
a. :link b. :visited c. :hover d. :active
Q58. Which of the following property of a anchor element signifies an element that
currently has the user's
mouse pointer hovering over it?
a. :link b. :visited c. :hover d. :active
Q59.Which of the following property of a anchor element signifies an element on
which the user is currently
clicking?
a. :link b. :visited c. :hover d. :active
Q60. Which of the following property of a table element specifies whether the
browser should control the
appearance of the adjacent borders that touch each other or whether each cell
should maintain its style?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells
Q61. Which of the following property of a table element specifies the width that
should appear between table
cells?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells
Q62. Which of the following property of a table element controls the placement of
the table caption?
a. :border-collapse b. :border-spacing c. :caption-side d.- :empty-cells
Q63. Which of the following property of a table element specifies whether the
border should be shown if a cell
is empty?
a. :border-collapse b. :border-spacing c. :caption-side d. :empty-cells
Q64. Which of the following property of a table element allows browsers to speed up
layout of a table by
using the first width properties it comes across for the rest of a column rather
than having to load the
whole table before rendering it?
a. :table-layout b. :border-spacing c. :caption-side d. :empty-cells
Q65. Which of the following property specifies the color of a border?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Q66. Which of the following property specifies whether a border should be solid,
dashed line, double line, or
one of the other possible values?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Q67. Which of the following property specifies the width of a border?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Vidyanidhi Info Tech Academy
PG DAC Question Bank
20
Vidyanidhi Info Tech Academy
Q68. Which of the following property changes the color of bottom border?
a. :border-color b. :border-style c. :border-width d. :border-bottom-color
Q69. Which of the following property changes the color of top border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-
bottom-color
Q70. Which of the following property changes the color of left border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-
bottom-color
Q71. Which of the following property changes the color of right border?
a. :border-top-color b. :border-left-color c. :border-right-color d. :border-
bottom-color
Q72. Which of the following property changes the style of bottom border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q73. Which of the following property changes the style of top border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q74. Which of the following property changes the style of left border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q75. Which of the following property changes the style of right border?
a. :border-bottom-style b. :border-top-style c. :border-left-style d. :border-
right-style
Q76. Which of the following property changes the width of bottom border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q77. Which of the following property changes the width of top border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q78. Which of the following property changes the width of left border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q79. Which of the following property changes the width of right border?
a. :border-bottom-width b. :border-top-width c. :border-left-width d. :border-
right-width
Q80. Which of the following property specifies a shorthand property for setting the
margin properties in one
declaration?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q81. Which of the following property specifies the bottom margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q82. Which of the following property specifies the top margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q83. Which of the following property specifies the left margin of an element?
a. :margin b. :margin-bottom c. :margin-top d. :margin-left
Q84. Which of the following property specifies the right margin of an element?
Vidyanidhi Info Tech Academy
PG DAC Question Bank
21
Vidyanidhi Info Tech Academy
a. :margin-right b. :margin-bottom c. :margin-top d. :margin-left
Q85. Which of the following property allows you to control the shape or appearance
of the marker of a list?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q86. Which of the following property specifies whether a long point that wraps to a
second line should align
with the first line or start underneath the start of the marker of a list?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q87. Which of the following property specifies an image for the marker rather than
a bullet point or number?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q88. Which of the following property serves as shorthand for the marker properties?
a. list-style-type b. list-style-position c. list-style-image d. list-style
Q89. Which of the following property specifies the distance between a marker and
the text in the list?
a. marker-offset b. list-style-position c. list-style-image d. list-style
Q90. Which of the following property specifies the bottom padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q91. Which of the following property specifies the top padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q92. Which of the following property specifies the left padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q93. Which of the following property specifies the right padding of an element?
a. padding-bottom b. padding-top c. padding-left d. padding-right
Q94. Which of the following property serves as shorthand for the padding
properties?
a. padding b. padding-top c. padding-left d. padding-right
Q95. Which of the following value of cursor shows it as crosshair or plus sign?
a. crosshair b. default c. pointer d. move
Q96. Which of the following value of cursor shows it as an arrow?
a. crosshair b. default c. pointer d. move
Q97. Which of the following value of cursor shows it as a pointing hand?
a. crosshair b. default c. pointer d. move
Q98. Which of the following value of cursor shows it as the 'I' bar?
a. crosshair b. default c. pointer d. move
Q99. 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
Q100. Where in an HTML document is the correct place to refer to an external style
sheet?
Vidyanidhi Info Tech Academy
PG DAC Question Bank
22
Vidyanidhi Info Tech Academy
In the <body> section
a. At the end of the document b. At the top of the document
c. In the <head> section d. Between head and body
Q101. Which HTML tag is used to define an internal style sheet?
a. css b. text/style c. style d. script
Q102. Which HTML attribute is used to define inline styles?
a. font b. styles c. css d. text e. style
Q103. Which is the correct CSS syntax?
a. body {color: black} b. body:color=black c. {body:color=black(body} d.
{body;color:black}
Q104. 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// b. //this
is a comment
Q105. Which property is used to change the background color?
a. bgcolor: b. background-color: c. color:
Q106. 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}
Q107. How do you change the text color of an element?
a. text-color: b. color: c. text-color= d. font-color:
Q108. Which CSS property controls the text size?
a. font-style b. text-style c. font-size d. text-size
Q109. 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}
Q110. 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}
Q111. 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
Q112. How do you change the font of an element?
a. fon-face: b. font-family: c. f: d. font-style:
Q113. How do you make the text bold?
a. font:b b. style:bold c. font-weight:bold
Q114. 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
Vidyanidhi Info Tech Academy
PG DAC Question Bank
23
Vidyanidhi Info Tech Academy
Q115. How do you change the left margin of an element?
a. padding: b. indent: c. margin: d. text-indent: e. margin-left:
Q116. 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
Q117. 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
Q118. 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">
Q119. 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">
Q120. How do you make each word in a text start with a capital letter?
a. text-transform:capitalize b. text-transform:uppercase c. You can't do that with
CSS
Q121. 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
Q122. Which of the following styles is recommended?
a. In-Line styles b. External styles c. Embedded styles d. Multiple styles
Q113. In what form are style rules presented?
a. selector { property: value } b. selector { property= value }
c. selector ( property: value ) d. selector ( property= value )
Q114. What selector should you use when applying a style to multiple elements?
a. ID b. Class c. Type d. Any of the above
PHP
Q1. What PHP stands for?
a. Hypertext Preprocessor b. Pre Hypertext Processor c. Pre Hyper Processor d. Pre
Hypertext Process
Q2. Which of the following tags is not a valid way to begin and end a PHP code
block?
a. <% %> b. <? ?> c. <?php ?> d. <! !>
Q3. How does the identity operator === compare two values?
a. It converts them to a common compatible data type and then compares the
resulting values
b. It returns True only if they are both of the same type and value
c. If the two values are strings, it performs a lexical comparison
Vidyanidhi Info Tech Academy
PG DAC Question Bank
24
Vidyanidhi Info Tech Academy
d. It bases its comparison on the C strcmp function exclusively
e. It converts both values to strings and compares them
Q4. Variables always start with a ........ in PHP
a. Pond-sign b. Yen-sign c. Dollar-sign d. Euro-sign
Q5. What is the value displayed when the following is executed? Assume that the
code was executed using
the following URL:
testscript.php?c=25
<?php
function process($c, $d = 25)
{
global $e;
$retval = $c + $d - $_GET['c'] - $e;
return $retval;
}
$e = 10;
echo process(5);
?>
a. 25 b. -5 c. 10 d. 5 e. 0
Q6. PHP is an open source software
a. True b. False
Q7.Which of the following is not valid PHP code?
a. $_10 b. ${“MyVar”} c. &$something d. $10_somethings e. $aVaR
Q8.PHP runs on different platforms (Windows, Linux, Unix, etc.)
a. True b. False
Q9. Array values are keyed by ______ values (called indexed arrays) or using ______
values (called
associative arrays). Of course, these key methods can be combined as well.
a. Float, string b. Positive number, negative number
c. Even number, string d. String, Boolean e. Integer, string
Q10. What will the following script output?
<?php
$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);
$sum = 0;
for ($i = 0; $i < 5; $i++) {
$sum += $array[$array[$i]];
}
echo $sum;
?>
a. 78 b. 19 c. NULL d. 5 e. 0
Q11. What elements will the following script output?
<?php
$array = array (true => 'a', 1 => 'b');
Var_dump ($array);
?>
Vidyanidhi Info Tech Academy
PG DAC Question Bank
25
Vidyanidhi Info Tech Academy
a. 1 => 'b' b. True => 'a', 1 => 'b' c. 0 => 'a', 1 => 'b' d. None e. It will
output NULL
Q12.There are three different kind of arrays:
a. Numeric array, String array, Multidimensional array
b. Numeric array, Associative array, Dimensional array
c. Numeric array, Associative array, Multidimensional array
d. Const array, Associative array, Multidimensional array
Q13. Assume you would like to sort an array in ascending order by value while
preserving key associations.
Which of the following PHP sorting functions would you use?
a. ksort() b. asort() c. krsort() d. sort() e. usort()
Q14. What function computes the difference of arrays?
a. array_diff b. diff_array c. arrays_diff d. diff_arrays
Q15. What functions count elements in an array?
a. count b. Sizeof c. Array_Count d. Count_array
Q16. What array will you get if you convert an object to an array?
a. An array with properties of that object as the array's elements.
b. An array with properties of that array as the object's elements.
c. An array with properties of that object as the Key elements.
d. An array with keys of that object as the array's elements.
Q17. How do you write “Hello World” in PHP
a. “Hello World”; b. echo “Hello World”; c. Document.Write d.(“Hello World”);
Q18. What is the correct way to end a PHP statement?
a. New Line b. ; c. . d. </php>
Q19.The PHP syntax is most similar to:
a. VBScript b. JavaScript c. Perl and C
Q20.How do you get information from a form that is submitted using the “get”
method?
a. Request.Form; b. $_GET[]; c. Request.QueryString
Q21. When using the POST method, the variables are displayed in the URL:
a. False b. True
Q22. In PHP you can use both single quotes ( ‘ ‘ ) and double quotes ( “ “ ) for
strings:
a. True b. False
Q23. Include files must have the file extension “.inc”
a. True b. False
Q24. What is the correct way to include the file “time.inc”?
a. <% include file= “time.inc” % > b. <?php jnclude_file(“time.inc”); ?>
c. <?php require(“time.inc”); ?> d. <!- - include file= “time.inc”- - >
Vidyanidhi Info Tech Academy
PG DAC Question Bank
26
Vidyanidhi Info Tech Academy
Q25.What is the correct way to create a function in PHP?
a. create myFunction() b. new_function myFunction( ) c. function myFunction( )
Q26. What is the correct way to open the file “time.txt” as readable?
a. open(“time,txt”, “read”); b. open(“time.txt”); c. fopen(“time.txt”, “r”); d.
fopen(“time.txt”,
“r+”);
Q27. PHP allows you to send emails directly from a script
a. False b. True
Q28. What is the correct way to add 1 to the $count variable?
a. $count+ +; b. + + count c. $count = +1 d. count+ +;
Q30. What is a correct way to add a comment in PHP?
a. <comment>…</comment> b. /*…*/ c. *\..\* d. <!- - …- - >
Q31.PHP can be run on Microsoft Windows IIS (Internet Information Server):
a. True b . False
Q32. Which of the following is correct about PHP?
a. PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
b. PHP is a server side scripting language that is embedded in HTML.
c. It is used to manage dynamic content, databases, session tracking, even build
entire e-commerce sites.
d. All of the above.
Q33. Which of the following is correct about PHP?
a. PHP performs system functions, i.e. from files on a system it can create, open,
read, write, and close them.
b. PHP can handle forms, i.e. gather data from files, save data to a file, thru
email you can send data, return data to
the user.
c. You add, delete, modify elements within your database thru PHP.
d. All of the above.
Q34. Which of the following is correct about PHP?
a. PHP can access cookies variables and set cookies.
b. Using PHP, you can restrict users to access some pages of your website.
c. It can encrypt data.
d. All of the above.
Q35. Using which of the following way can you embed PHP code in an HTML page?
a. <?php PHP code goes here ?> b. <? PHP code goes here ?>
c. <script language="php"> PHP code goes here </script> d. All of the above.
Q36. Which of the following is true about php.ini file?
a. The PHP configuration file, php.ini, is the final and most immediate way to
affect PHP's functionality.
b. The php.ini file is read each time PHP is initialized. c. Both of the above. d.
None of the above.
Q37. Which of the following is true about php.ini file?
a. The PHP configuration file, php.ini, is the final and most immediate way to
affect PHP's functionality.
b. The php.ini file is read each time PHP is initialized. C. Both of the above. d.
None of the above.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
27
Vidyanidhi Info Tech Academy
Q38. Is PHP whitespace sensitive?
a. false b. true
Q39. Is PHP case sensitive?
a. false b. true
Q40. Which of the following is true about php variables?
a. All variables in PHP are denoted with a leading dollar sign ($).
b. The value of a variable is the value of its most recent assignment.
c. Variables are assigned with the = operator, with the variable on the left-hand
side and the expression to be
evaluated on the right.
d. All of the above.
Q41. Which of the following is true about php variables?
a. Variables can, but do not need, to be declared before assignment.
b. Variables in PHP do not have intrinsic types - a variable does not know in
advance whether it will be used
to store a number or a string of characters.
c. Both of the above..
d. All of the above.
Q42. Which of the following type of variables are whole numbers, without a decimal
point, like 4195?
a. Integers b. Doubles c. Booleans d. Strings
Q43. Which of the following type of variables are floating-point numbers, like
3.14159 or 49.1?
a. Integers b. Doubles c. Booleans d. Strings
Q44. Which of the following type of variables have only two possible values either
true or false?
a. Integers b. Doubles c. Booleans d. Strings
Q45. Which of the following type of variables are special type that only has one
value: NULL?
a. Strings b. Doubles c. Booleans d. NULL
Q46. Which of the following type of variables are sequences of characters, like
'PHP supports string operations.'?
a. Strings b. Arrays c. Objects d. Resources
Q47. Which of the following type of variables are named and indexed collections of
other values?
a. Strings b. Arrays c. Objects d. Resources
Q48. Which of the following type of variables are instances of programmer-defined
classes?
a. Strings b. Arrays c. Objects d. Resources
Q49.Which of the following type of variables are special variables that hold
references to resources external to
PHP (such as database connections)?
a. Strings b. Arrays c. Objects d. Resources
Q50. Which of the following is correct about variable naming rules?
a. Variable names must begin with a letter or underscore character.
b. A variable name can consist of numbers, letters, underscores.
c. you cannot use characters like + , - , % , ( , ) . & , etc in a variable name.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
28
Vidyanidhi Info Tech Academy
d. All of the above.
Q51. Which of the following is correct about determine the "truth" of any value not
already of the Boolean type?
a. If the value is a number, it is false if exactly equal to zero and true
otherwise.
b. If the value is a string, it is false if the string is empty (has zero
characters) or is the string "0", and is true
otherwise.
c. Values of type NULL are always false.
d. All of the above.
Q52.Which of the following is correct about determine the "truth" of any value not
already of the Boolean type?
a. If the value is an array, it is false if it contains no other values, and it is
true otherwise. For an object,
containing a value means having a member variable that has been assigned a value.
b. Valid resources are true (although some functions that return resources when
they are successful will return
FALSE when unsuccessful).
c. Don't use double as Booleans.
d. All of the above.
Q53. Which of the following is correct about NULL?
a. NULL is a special type that only has one value: NULL.
b. The special constant NULL is capitalized by convention, but actually it is case
insensitive.
c. Both of the above. d. None of the above.
Q54. Which of the following is correct about NULL?
a. A variable that has been assigned NULL evaluates to FALSE in a Boolean context.
b. A variable that has been assigned NULL returns FALSE when tested with IsSet()
function.
c. Both of the above. d. None of the above.
Q55. Which of the following is correct about constants?
a. To define a constant you have to use define() function.
b. To retrieve the value of a constant, you have to simply specify its name.
c. Both of the above. d. None of the above.
Q56. Which of the following is correct about constants?
a. Unlike with variables, you do not need to have a constant with a $.
b. Only scalar data (boolean, integer, float and string) can be contained in
constants.
c. Both of the above. d. None of the above.
Q57.Which of the following function returns selected parts of an array?
a. array_reverse() b. array_search() c. array_shift() d. array_slice()
Q58. Which of the following function returns the sum of the values in an array?
a. array_sum() b. array_splice() c. array_udiff() d. array_udiff_assoc()
Q59.Which of the following function checks if a specified value exists in an array?
a. extract() b. in_array() c. key() d. krsort()
Q60. Singly quoted strings are treated almost literally, whereas doubly quoted
strings replace variables with their
values as well as specially interpreting certain character sequences.
a. true b. false
Vidyanidhi Info Tech Academy
PG DAC Question Bank
29
Vidyanidhi Info Tech Academy
Q61. Doubly quoted strings are treated almost literally, whereas singly quoted
strings replace variables with their
values as well as specially interpreting certain character sequences.
a. true b. false
Q62. How will you concatenate two strings?
a. Using . operator. b. Using + operator. c. Using add() function d. Using
append() function
Q63. If there is any problem in loading a file then the require() function
generates a warning but the script will
continue execution.
a. true b. false
Q64. If there is any problem in loading a file then the include() function
generates a warning but the script will
continue execution.
a. true b. false
Q65. Which of the following function opens a file?
a. fopen() b. fread() c. filesize() d. file_exist()
Q66. Which of the following function is used to read the content of a file?
a. fopen() b. fread() c. filesize() d. file_exist()
Q67. Which of the following function is used to get the size of a file?
a. fopen() b. fread() c. filesize() d. file_exist()
Q68. Which of the following function is used to check if a file exists or not?
a. fopen() b. fread() c. filesize() d. file_exist()
Q69. Can you assign the default values to a function parameters?
a. true b. false
Q70.Which of the following is used to set cookies?
a. setcookie() function b. $_COOKIE variable c. $HTTP_COOKIE_VARS variable d.
isset() function
Q71. Which of the following is used to get cookies?
a. getcookie() function b. $_COOKIE variable c. isset() function d. None of the
above.
Q72. Which of the following is used to check that a cookie is set or not?
a. getcookie() function b. $_COOKIE variable c. isset() function d. None of the
above.
Q73. Which of the following is used to delete a cookie?
a. setcookie() function b. $_COOKIE variable c. isset() function d. None of the
above.
Q74. Which of the following is used to create a session?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Q75. Which of the following is used to access session variables in PHP?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Q76. Which of the following is used to check if session variable is already set or
not in PHP?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Vidyanidhi Info Tech Academy
PG DAC Question Bank
30
Vidyanidhi Info Tech Academy
Q77. Which of the following is used to destroy the session?
a. session_start() function b. $_SESSION[] c. isset() function d.
session_destroy() function
Q78. Which of the following provides access to the uploaded file in the temporary
directory on the web server?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
Q79. Which of the following provides the actual name of the uploaded file?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
Q80.Which of the following provides the size of the uploaded file in PHP?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
Q81. Which of the following provides content type of the uploaded file in PHP?
a. $_FILES['file']['tmp_name'] b. $_FILES['file']['name'] c. $_FILES['file']
['size'] d. $_FILES['file']['type']
XML
Q1. What does XML stand for?
a. Example Markup Language b. X-Markup Language
c. extensible Markup Language d. eXtra Modern Link
Q2. There is a way of describing XML data, how?
a. XML uses a DTD to describe the data
b. XML uses a description node to describe data
c. XML uses XSL to describe data
Q3. XML’s goal is to replace HTML
a. False b. True
Q4. What is the correct syntax of the declaration which defines the XML version?
a. <xml version= “1.0”/> b. <?xml version= “1.0”/> c. <?xml version = “1.0”?>
Q5. What does DTD stand for?
a. Dynamic Type Definition b. Direct Type Definition
c. Document Type Definition d. Do the Dance
Q6. Is this a “well formed” XML document?
<?xml version= “1.0”?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don’t forget me this weekend!</body>
</note>
a. No b.Yes
Vidyanidhi Info Tech Academy
PG DAC Question Bank
31
Vidyanidhi Info Tech Academy
Q7. Is this a “well formed” XML document?
<?xml version= “1.0”?>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don’t forget me this weekend!</body>
a. No b. Yes
Q8. Which statement is true?
a. All XML documents must have a DTD b. All XML elements must be lower case
c. All XML elements must be properly closed d. All the statements are true
Q9. Which statement is true?
a. XML tags are case sensitiv b. XML documents must have a root tag
c. XML elements must be properly nested d. All the statements are true
Q10. XML preserves white spaces
a. True b. False
Q11. Is this a “well formed” xml document?
<?xml version= “1.0”?>
<note>
<to age= “29”>Tove</to>
<from>Jani</from>
</note>
a. Yes b. No
Q12. Is this a “well formed” xml document?
<?xml version= “1.0”?>
<note>
<to age= 29>Tove</to>
<from>Jani</from>
</note>
a. Yes b. No
Q13. XML elements cannot be empty
a. False b. True
Q14. Which is not a correct name for an XML element?
a. <Note> b. All 3 names are incorrect c. <1 dollar> d. <h1>
Q15. Which is not a correct name for an XML element?
a. <NAME> b. <first name> c. <age> d. All 3 names are incorrect
Q16. Which is not a correct name for an XML document?
a. <xmldocument> b. <phone number> c. All 3 names are incorrect d. <7eleven>
Q17. XML attribute values must always be enclosed in quotes
a. False b. True
Vidyanidhi Info Tech Academy
PG DAC Question Bank
32
Vidyanidhi Info Tech Academy
Q18. What does XSL stand for?
a. eXtra Style Language b. eXtensible Style Listing
c. eXpandable Style Language d. eXtensible Stylesheet Language
Q19. What is a correct way of referring to a stylesheet called “mystyle.xsl”?
a. <stylesheet type= “text/xsl” href= “mystyle.xsl”/>
b. <link type="text/xsl" href="mystyle.xsl" />
c. <?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?>
Q20. For the XML parser to ignore a certain section of your XML document, which
syntax is
correct?
a. <CDATA> Text to be ignored </CDATA> b. <![CDATA[ Text to be ignored ]]>
c. <xml:CDATA[ Text to be ignored ]> d. <PCDATA> Text to be ignored </PCDATA>
Q21. Which statement is true?
a. All the statements are true b. All XML elements must have a closing tag
c. All XML elements must be lower case d. All XML documents must have a DTD
Q22. Is it easier to process XML than HTML?
a. Yes b. No c. Sometimes d. Cant say
Q23. Which of the following programs support XML or XML applications?
a. Internet Explorer 5.5 b. Netscape 4.7 c. RealPlayer. d. both 1 and 2
Q24. Kind of Parsers are
a. well-formed b. well-documented c. non-validating and validating d. none of the
above
Q25. Well formed XML document means
a. it contains a root element
b. it contain an element
c. it contains one or more elements
d. must contain one or more elements and root element must contain all other
elements
Q26. Comment in XML document is given by
a. <?-- --> b. <!-- --!> c. <!-- --> d. </-- -- >
Q27. Which of the following strings are a correct XML name?
a. _myElement b. my Element c. #myElement d. None of the above
Q28. Which of the following XML fragments are well-formed?
a. <?xml?> b. <?xml version="1.0"?>
c. <?xml encoding="JIS"?> d. <?xml encoding="JIS" version="1.0"?>
Q29.Valid XML document means (most appropriate)
a. the document has root element
b. the document contains atleast one or more root element
c. the XML document has DTD associated with it & it complies with that DTD
d. Each element must nest inside any enclosing element property
Vidyanidhi Info Tech Academy
PG DAC Question Bank
33
Vidyanidhi Info Tech Academy
Q30. XML uses the features of
a. HTML b. XHTML c. VML d. SGML
Q31. Which of the following XML documents are well-formed?
a. <firstElement>some text goes here
<secondElement>another text goes here</secondElement>
</firstElement>
b. <firstElement>some text goes here</firstElement>
<secondElement> another text goes here</secondElement>
c. <firstElement>some text goes here
<secondElement> another text goes here</firstElement>
</secondElement>
d. </firstElement>some text goes here
</secondElement>another text goes here<secondElement>
<firstElement>
Q32. To use the external DTD we have the syntax
a. <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
b. <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
c. <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT “order.dtd”?>
d. <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
Q33. The syntax for parameter entity is
a, <! ENTITY % NAME DEFINITION> b. < ENTITY % NAME DEFINITION>
c. <! ENTITY $ NAME DEFINITION> d. < ENTITY % NAME DEFINITION>
Q34. Which of the following XML fragments are well-formed?
a. <myElement myAttribute="someValue"/> b. <myElement myAttribute=someValue/>
c. <myElement myAttribute=’someValue’> d. <myElement myAttribute="someValue’/>
Q35. how to include external dtd in xml file
a. <!DOCTYPE rootnode SYSTEM "name of dtd file"> b. <!DOCTYPE childnode SYSTEM
"name of dtd file">
c. <!DOCTYPE rootnode src="name of dtd file"> d. <!DOCTYPE SYSTEM "name of dtd
file">
JSON
Q1. JSON stands for
a. java source object notes b. javascript object notation c. javascript orientation
d. none
Q2.JSON is
a. language and platform independent b. language dependent and platform independent
c. language independent and platform dependent d. none
Q3. Json is used to
a. Transfer data as key value pair b. Transfer data as image c. Transfer data as
arraylist d. None
Vidyanidhi Info Tech Academy
PG DAC Question Bank
34
Vidyanidhi Info Tech Academy
Q4.To send data as Jason in php we use
a. json_encode(); b. encode_json() c. parsejson d. none
Q5.To read json data received from server javascript use
a. parseJSON(); b. parseHTML(); c. parseOBJECT() d. none
AJAX
Q1. Using AJAX we can make our web page
a. More inactive and faster b. Easy to connect web page with server
c. more dynamic d. none
Q2. XML Http Request object is a part of
a. W3C andard b. DOM Level 3 c. both 1 and 2 d. none
Q3. AJAX is combination of
a. java+css+xml b. java+css+DOM+xml c. avascript+css+DOM+XMLHttpRequest
Q4. What is AJAX?
a. AJAX = Asynchronous JavaScript and XML. b. AJAX = Asynchronous rquest and XML.
c. AJAX = Asynchronous JavaScript and HTML d. None
Q5. Ajax request pass through total how many readystate
a. 5 b. 4 c. 3 d. none
Q6. which Ajax property is used to read data from server
a. responseText b. responsetext c. responsedata d. none
Q7. Which method of Ajax hit server
a. send b. Hit c. Go d. none
Web Security
Q1. What is XSS stands for
a) Cross Site Scripting b) Extended site security c) None
Q2. ____ commonly targets scripts embedded in a page which are executed on the
client-side (in the user’s
web browser) rather than on the server-side
a) XSS b) SQL Injection c) None
Q3. attack by which fraudsters impersonate a legitimate company and attempt to
steal people’s personal
information or login credentials is called
a) Phishing email b) SQL Injection c) None
Q4. When developers fail to protect their users sensitive information such as user
names, passwords, and
session tokens there is a possibility of _________.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
35
Vidyanidhi Info Tech Academy
a) SQL Injection
b) Insecure Direct Object Reference
c) Cross-Site Request Forgery
d) Broken Authentication and Session Management
Q5. A security measure to stop unauthorized access to documents is:
a) Network access control. c) Business continuity/disaster recovery.
b) Physical access restrictions. d) Backup/restore.
Q6. What is an example of vulnerabilities in web-based programs and environments?
A. SQL injection B. Cross-site scripting C. All of the above D. None of the above
Q7. CSRF is stand for
A. Cross-Site Request Forgery B. Cross script format
C. Cascading script format D. Cross site required format
Q8. the placement of malicious code in SQL statements, via web page input. Is
called
a. SQL injection b. Cross-Site Request Forgery c. None
Q9. Phishing is form of___
A.Spamming B.Identity Theft C.Impersonation
Q10. Sniffing is used to perform___
A. Passive stack B. Active stack C. None
Q11. What is the best statement for taking advantage of a weakness in the security
of an IT System
A.Threat B. Attack C. Vulnerability
UI
1) Which of the following is correct about Bootstrap?
a. Bootstrap is a sleek, intuitive, and powerful, mobile first front-end framework
for faster andeasier web
development.
b. It uses HTML, CSS and Javascript.
c. Bootstrap was developed by Mark Otto and Jacob Thornton at Twitter.
d. All of the above.
2) Which of the following is correct about Bootstrap?
a. Bootstrap's responsive CSS adjusts to Desktops,Tablets and Mobiles.
b. Provides a clean and uniform solution for building an interface for developers.
c. It contains beautiful and functional built-in components which are easy to
customize.
d. All of the above.
3) Which of the following is a part of Mobile First Strategy of Bootstrap?
a. Content: Determine what is most important.
b. Layout: Design to smaller widths first. Base CSS address mobile device first;
media queriesaddress for tablet,
desktops.
c. Progressive Enhancement: Add elements as screen size increases.
d. All of the above.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
36
Vidyanidhi Info Tech Academy
4) Which of the following is correct about Bootstrap Grid System?
a. Rows must be placed within a .container class for proper alignment and padding.
b. Use rows to create horizontal groups of columns.
c. Content should be placed within the columns, and only columns may be the
immediate childrenof rows.
d. All of the above.
5) Which of the following is correct about Bootstrap Grid System?
a. Predefined grid classes like .row and .col-xs-4 are available for quickly making
grid layouts. LESSmixins can
also be used for more semantic layouts.
b. Columns create gutters (gaps between column content) via padding. That padding
is offset inrows for the
first and the last column via negative margin on .rows.
c. Grid columns are created by specifying the number of twelve available columns
you wish tospan. For
example, three equal columns would use three .col-xs-4.
d. All of the above.
6) Which of the following is correct about Bootstrap Media Query?
a. It simply applies some CSS, based on certain conditions set forth. If those
conditions are met,the style is
applied.
b. Both of the above.
c. None of the above.
7) Which of the following is correct about Bootstrap Media Query?
a. Media queries have two parts, a device specification and then a size rule.
b. Media Queries in Bootstrap allow you to move, show and hide content based on the
viewportsize.
c. Both of the above.
d. None of the above.
8) Which of the following is correct about Bootstrap Mobile First Strategy?
a. You need to add the viewport meta tag to the element, to ensure proper rendering
and touch zooming on
mobile devices.
b. width property controls the width of the device. Setting it to device-width will
make sure thatit is rendered
across various devices (mobiles,desktops,tablets...) properly.
c. initial-scale=1.0 ensures that when loaded, your web page will be rendered at a
1:1 scale, andno zooming
will be applied out of the box.
d. All of the above.
9) Which of the following is correct about Bootstrap Responsive Images?
a. Bootstrap 3 allows you to make the images responsive by adding a class ..img-
responsive tothe <.img> tag.
b. ..img-responsive class applies max-width: 100%; and height: auto; to the image
so that itscales nicely to the
parent element.
c. Both of the above.
d. None of the above.
10) Which of the following is correct about Bootstrap cross browser consistency?
a. Bootstrap uses Normalize to establish cross browser consistency.
b. Normalize.css is a modern, HTML5-ready alternative to CSS resets.
c. Normalize.css is a small CSS file that provides better cross-browser consistency
in the defaultstyling of HTML
elements.
d. All of the above.
Vidyanidhi Info Tech Academy
PG DAC Question Bank
37
Vidyanidhi Info Tech Academy
11) Which of the following class styles a table as a nice basic table with just
some light padding and horizontal
dividers?
A. table B. table-striped C. table-bordered D. table-hover
12) Which of the following class styles a table as a nice basic table with stripes
on rows?
A. table B. table-striped C. table-bordered D. table-hover
13) Which of the following class styles a table with borders surrounding every
element and rounded corners
around the entire table?
A. table B. table-striped C. table-bordered D. table-hover
14) Which of the following class styles a table with a light gray background to
rows while the cursor hovers over
them?
A. table B. table-striped C. table-bordered D. table-hover
15) Which of the following class applies the hover color to a particular row or
cell of a table?
A. active B. success C. warning D. danger
16) Which of the following class indicates a successful or positive action?
A. active B. success C. warning D. danger
17) Which of the following class indicates a warning that might need attention?
A. active B. success C. warning D. danger
18) Which of the following class indicates a dangerous or potentially negative
action?
A. active B. success C. warning D. danger
19) Which of the following class can be used to create a responsive table?
A. table-responsive B. responsive C. active D. table
20) Which of the following is the default layout of a bootstrap form?
A. vertical B. inline C. horizontal D. None of the above.
21) Which of the following class is required to be added to form tag to make it
inline?
A. inline B. form-inline C. horizontal D. None of the above.
22) Which of the following class is required to be added to form tag to make it
horizontal?
A. horizontal B. form-horizontal C. horizontal D. None of the above.
23) Which of the following is true about bootstrap help text?
a. Bootstrap form controls can have a block level help text that flows with the
inputs.
b. To add a full width block of content, use the .help-block after the <input>.
c. Both of the above.
d. None of the above.
24) Which of the following bootstrap style of button creates a default/ standard
button?
A.btn B. btn-primary C. btn-success D. btn-info
25) Which of the following bootstrap style of button provides extra visual weight
and identifies the primary
action in a set of buttons?
Vidyanidhi Info Tech Academy
PG DAC Question Bank
38
Vidyanidhi Info Tech Academy
A.btn B. btn-primary C. btn-success D. btn-info
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 1 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 1
Question:
Choose the correct HTML tag for the largest heading
Answer Choices
A: <h6> B: <heading> C: <head> D: <h1>
Q. No. 2
Question:
What is the correct HTML tag for inserting a line break?
Answer Choices
A: <br /> B: <break /> C: <lb /> D: </ br>
Q. No. 3
Question:
Which of the following tags below are used for a multi-line text input control?
Answer Choices
A: Textml tag B: Test tag
C: Textarea tag D: Both b and c
Q. No. 4
Question:
What is the correct HTML for creating a hyperlink?
Answer Choices
A: <a name=””>A</a>
B: <a>B</a>
C: <a href=”http://www.example.com”>example</a>
D: <a url=”http://www.example.com”>example</a>
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 2 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 5
Question:
<script language="javascript">
Var qpt="ADVANCED COMPUTING";
alert (qpt.charAt(qpt.length-1));
</script>
Answer Choices
A: P B: G C: E D: Error
Q. No. 6
Question:
Scripting language are
Answer Choices
A: High Level Programming language
B: Assembly Level Programming language
C: Machine Level Programming language
D: None of above
Q. No. 7
Question:
<script type="text/javascript" language="javascript">
var qpt = "Diploma in Advanced Computing";
var result = qpt.split(“ “);
document.write (result);
</script>
Answer Choices
A: Diploma
B: D,i,p,l,o,m,a,i,n,A,d,v,a,n,c,e,d,C,o,m,p,u,t,i,n,g
C: Diploma,in,Advanced,Computing
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 3 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
D: DiplomainAdvancedComputing
Q. No. 8
Question:
<script language="javascript">
function x()
{
var s= "Good 100%";
var pattern = /\D/g;
var output= s.match(pattern);
document.write(output);
}
</script>
Answer Choices
A: Good % B: 1,0,0 C: G,o,o,d,% D: Error
Q. No. 9
Question:
In JavaScript, What does isNaN function do ?
Answer Choices
A: Return true if the argument is not a number.
B: Return false if the argument is not a number.
C: Return true if the argument is a number.
D: None of the above
Q. No. 10
Question:
How to assign a function to a variable with the JavaScript Function constructor?
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 4 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Answer Choices
A: var f=Function("x","y","return x+y");
B: var f=Function(x,y){ return x+y;}
C: var f= new Function("x", "y", "return x + y");
D: None of above
Q. No. 11
Question:
Which sign does jquery use as a shortcut for jquery?
Answer Choices
A: * sign B: % sign C: ? sign D: $ sign
Q. No. 12
Question:
$(“span”). What does it select
Answer Choices
A: The first span element B: All span elements
C: All of the above D: None of above
Q. No. 13
Question:
Jquery code to set the background color of all span elements to blue?
Answer Choices
A: $(“span”).style(“background-color”,”blue”);
B: $(“span”).manipulate(“background-color”,”blue”);
C: $(“span”).CSS(“background-color”,”blue”);
D: $(“span”).layout(“background-color”,”blue”);
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 5 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 14
Question:
Which jQuery function is used to prevent code from running,before the document is
finished loading?
Answer Choices
A: $(document).load() B: $(body).onload()
C: $(document).onload() D: $(document).ready()
Q. No. 15
Question:
Which jQuery method is used to switch between adding/removing one or more
classes(for CSS) from selected elements?
Answer Choices
A: switchClass() B: toggleClass() C: altClass() D: switch()
Q. No. 16
Question:
Which jQuery statement is true?
Answer Choices
A: To use jQuery,you must buy the jQuery library at www.jQuery .com
B: To use jQuery,you do not have to do anything. Most browsers have the jQuery
library
built in the browser.
C: To use jQuery,you can refer to a hosted jQuery library at Google
D: All of the above
Q. No. 17
Question:
Consider the following Class
Class Insurance
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 6 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
{
function clsName()
{
Echo get_class($this);
}
}
8. $cl=new Insurance();
9. $cl->clsName();
10. Insurance::clsName();
Which of the following lines should be commented to print the class name without
errors?
Answer Choices
A: Line 8 and 9
B: Line 10
C: Line 9 and 10
D: All the three lines 8,9 and 10 should be left as it is.
Q. No. 18
Question:
The inbuilt function to get the number of parameters passed is:
Answer Choices
A: func_num_args() B: func_args_count()
C: arg_num() D: None of the above
Q. No. 19
Question:
How would you start a session?
Answer Choices
A: Session(start()); B: Session();
C: Session_start(); D: Begin_session();
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 7 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 20
Question:
microtime() returns _______.
Answer Choices
A: Current Unix timestamp with seconds.
B: Current Unix timestamp with nanoseconds.
C: Current Unix timestamp with microseconds
D: None of above
Q. No. 21
Question:
The updated MySQL extension released with PHP 5 is typically referred to as
Answer Choices
A: MySQL B: Mysqli C: Mysql D: Mysqly
Q. No. 22
Question:
Which one of the following methods can be used to diagnose and display information
about a MySQL connection error?
Answer Choices
A: connect_errno() B: connect_error()
C: mysqli_connect_error() D: mysqli_connect_errno()
Q. No. 23
Question:
Assume that your php file 'index.php' in location
c:/apache/htdocs/phptutor/index.php. If
you used basename($_SERVER['PHP_SELF']) function in your page, then what is the
return value of this function ?
Answer Choices
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 8 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
A: index.php B: /index.php
C: phptutor D: phptutor/index.php
Q. No. 24
Question:
<? php
$x=array("aaa","","ccc","ddd","");
$y=array_unique($x);
echo count($x) . "," . Count ($y);
?>
Answer Choices
A: 3,1 B: 3,3 C: 5,5 D: 5,4
Q. No. 25
Question:
Well formed XML document means
Answer Choices
A: It contains a root element
B: It contain an element
C: It contains one or more elements
D: Must contain one or more elements and root element must contain all other
element
Q. No. 26
Question:
Which of the following XML fragments are well-formed?
Answer Choices
A: <? xml?>
B: <? xml version=”A.0”?>
C: <? xml encoding=”JIS”?>
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 9 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
D: <? xml encoding=”JIS” version =”A.0” ?>
Q. No. 27
Question:
What does DTD stand for?
Answer Choices
A: Document Type Definition B: Direct Type Definition
C: Do The Dance D: Dynamic Type Definition
Q. No. 28
Question:
DTD includes the specifications about the markup that can be used within the
document, the specifications consists of all EXCEPT
Answer Choices
A: Entity declarations B: The size of element name
C: The browser name D: Element declarations
Q. No. 29
Question:
The XML DOM object is
Answer Choices
A: Entity B: Entity Reference
C: Comment Reference D: Comment Data
Q. No. 30
Question:
To bind the HTML element <INPUT> Type in text with the data source ”dsoCustomer”
we use
Answer Choices
A: <INPUT TYPE=”TEXT” DATAFIELD=”#dsoCustomer”>
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 10 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
B: <INPUT TYPE=”TEXT” DATASRC=” dsoCustomer”>
C: <INPUT TYPE=”TEXT” DATAFSRC=”#dsoCustomer”>
D: <INPUT TYPE=”TEXT” DATAFLD=”#dsoCustomer”>
Q. No. 31
Question:
What is oDATA?
Answer Choices
A: Web protocol Use or insertion
B: Web protocol for querying and updating data
C: It is a OSI model protocol
D: None of above
Q. No. 32
Question:
What is NCName
Answer Choices
A: A Non-Common Name B: A Non-Conforming Name
C: A Non-Colonized Name D: None of the above
Q. No. 33
Question:
Ajax stands for
Answer Choices
A: Asynchronous JavaScript and XML
B: Abstract JSON and XML
C: Another Java Abstraction for X-Windows
D: Another Java and XML Library
Q. No. 34
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 11 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Question:
What does the XMLHttpRequest object accomplish in Ajax?
Answer Choices
A: It’s a programming language used to develop Ajax application
B: It provides a means of exchanging structured data between the Web server and
client
C: It provides the ability to mark up and style the display of Web-page text.
D: It provides the ability to asynchronously exchange data between Web
browsers and a web server
Q. No. 35
Question:
Which one of the technologies is NOT used in AJAX?
Answer Choices
A: Flash B: CSS C: DOM D: DHTML
Q. No. 36
Question:
AJAX made popular by
Answer Choices
A: Microsoft B: IBM C: Sun Microsystems D: Google
Q. No. 37
Question:
Which one of these legendary Greek mythical figures or places is the code name for
Microsoft’s version of AJAX?
Answer Choices
A: Oracle B: Hercules C: Atlas D: Delphi
Q. No. 38
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 12 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Question: The tag used to define navigation links id
Answer Choices
A:<dialog> B:<header> C:<meter> D:<nav>
Correct Answer : D
Q. No. 39
Question: The tag to specify illustration, diagram, photo is
A:<mark> B:<figure> C:<aside> D:<details>
Correct Answer : B
Q. No. 40
Question: The <!DOCTYPE> declaration in HTML5 is
A:<!DOCTYPE html!> B:<!DOCTYPE html;>
C:<!DOCTYPE html D:<!DOCTYPE html:>
Correct Answer :C
Q. No. 41
Question: The selector in css is
A:javascript tag B:HTML element
C:css tag D:css element
Correct Answer : B
Q. No. 42
Question: The declaration in css consists
A:Property B:Value C:Attribute D:a and b
Correct Answer : D
Q. No. 43
Question: The Statement is call as __________ Statement.
A:Globalization B:Instantization
C:Declaration D:Intialization
Correct Answer :C
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 13 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 44
Question: Integer Variable is declared using following syntax in javascript
A:Interger num; B: var Num;
C:integer num; D:int num;
Correct Answer : B
Q. No. 45
Question: What is an ISP?
A: Internet System Protocol B: Internal System Program
C: Internet Service Provider D: None of the above
Correct Answer :C
Q. No. 46
Question: <SCRIPT> … </SCRIPT> tag can be placed within ________
A: Header B:Body C: both A and B D: none of the above
Correct Answer :A
Q. No. 47
Question: Which tag is used to display the large font size?
A: <LARGE></LARGE> B: <BIG></BIG> C: < SIZE ></SIZE> D:
<FONT></FONT>
Correct Answer :B
Q. No. 48
Question: Which attribute is used to name an element uniquely?
A: class B: d C: dot D: all of above
Correct Answer :B
Q. No. 49
Question: Which of the following is not a valid alignment attribute?
A: Left B: Right C: Top D: All of above
Correct Answer :D
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 14 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 50
Question: Which of the following are the background properties in CSS?
i) background-color
ii) background-image
iii) background-repeat
iv) background-position
v) background
A: i, ii, iii and iv only
B: i, ii, iii and v only
C: i, ii, iv and v only
D: All i, ii, iii, iv and v
Correct Answer :D
Q. No. 51
Question: Internet Explorer uses __________ property to create transparent images.
A: -moz-opacity:x B: filter: alpha(opacity=x)
C: Both of the above D: None of the above
Correct Answer :B
Q. No. 52
Question: The ______________ property indicates whether a cell without any content
should have a border displayed.
A: blank-cells B: empty-cells c nocontent-cells D: noborder-cells
Correct Answer :B
Q. No. 53
Question: Why so JavaScript and Java have similar name?
A: JavaScript is a stripped-down version of Java
B: JavaScript's syntax is loosely based on Java's
C: They both originated on the island of Java
D: None of the above
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 15 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer :B
Q. No. 54
Question: Which of the following attribute can hold the JavaScript version?
A: LANGUAGE B: SCRIPT C: VERSION D: None of the above
Correct Answer :A
Q. No. 55
Question: JavaScript is ______ Side Scripting Language.
A:server B:ISP C:browser D:none of these
Correct Answer :C
Q. No. 56
Question: Which of the following is used to capture all click events in a window?
A:window.captureEvents(Event.CLICK);
B:window.routeEvents(Event.CLICK);
C:window.handleEvents(Event.CLICK);
D:window.raiseEvents(Event.CLICK);
Correct Answer :A
Q. No. 57
Question: Which of the following method is used to evaluate a string of JavaScript
in
the context of specified object?
A: Eval B:ParseDoule C:ParseObject D:Efloat
Correct Answer :A
Q. No. 58
Question: Which attribute need to be changed to make elements invisible?
A:visible B:visibilty C:invisibility D:invisible
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 16 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer :B
Q. No. 59
Question: If para1 is the DOM object for a paragraph, what is the correct syntax to
change the text within the paragraph?
A: "New Text"?
B: para1.value="New Text";
C: para1.firstChilD:nodeValue= "New Text";
D: para1.nodeValue="New Text";
Correct Answer :B
Q. No. 60
Question: Which of the following is not the scope variable in php?
A:local B:global C:static D:extern
Correct Answer :D
Q. No. 61
Question: Where setcokie() function must appear in php?
A:before tag B:After tag C:In tag D:anywhere
Correct Answer :B
Q. No. 62
Question: Data for a cookie stored in _______ in php?
A: in ISP computer B: In users computer
C:In server computer D:in depends on php coding
Correct Answer :B
Q. No. 63
Question: In PHP language PEAR stands for
A: PHP Enhancement and Application reduce
B: PHP Event and Application Repository
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 17 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
C: PHP Extension and Application Repository
D: None of these above
Correct Answer :C
Q. No. 64
Question: PHP configuration settings are maintained in
A: pws-php5cgi.reg B: php.ini
C: httpD:conf D:httpd-info.conf
Correct Answer :B
Q. No. 65
Question: Which class name is reserved in PHP ?
A: stdClass B: nameClass C: newClass D: None of these
Correct Answer :A
Q. No. 66
Question: Which one of the following functions is used to determine object type?
A:obj_type() B:type() C:is_a() D:is_obj()
Correct Answer : C
Q. No. 67
Question: What is the correct syntax of the declaration which defines the XML
version?
A: <xml version="A:0" /> B: <?xml version="A:0"?>
C: <?xml version="A:0" /> D:None of the above
Correct Answer :B
Q. No. 68
Question: Kind of Parsers are
A: well-formed B: well-documented
C: non-validating and validating D: none of the above
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 18 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer : C
Q. No. 69
Question: In XML
A: the internal DTD subset is read before the external DTD
B: the external DTD subset is read before the internal DTD
C: there is no external type of DTD
D: there is no internal type of DTD
Correct Answer :A
Q. No. 70
Question: XML is case sensitive?
A: Yes B:No
Correct Answer : A
Q. No. 71
Question: Attribute of the document interface in DOM is/are
i) doctype
ii) implementation
iii) documentElement
Which are read only attributes?
A: (i) only
B: (ii) only
C: (ii),(iii) only
D: all
Correct Answer : D
Q. No. 72
Question: What is the function of the XML parser?
A: Converts XML document to XML DOM object
B: Converts XML DOM object to XML document
C: Converts XML DOM object to a comment
D: None of the mentioned
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 19 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer :A
Q. No. 73
Question: What is the purpose of the method ActiveXObject()?
A: Used to call automation object
B: Used to reference automation object
C: Used to instantiate automation object
D: All of the mention
Correct Answer :C
Q. No. 74
Question: What makes Ajax unique?
A: it works as a stand-alone web development tool.
B:it work the same with all web browser
C:it uses c++ as its programming language
D:id makes data requested asynchronously
Correct Answer :D
Q. No. 75
Question: What does the XMLHttpRequest object accomplish in ajax?
A:its the programming language used to develop ajax application
B:it provide a means of exchanging structured data between the web server or client
C:it provide the ability to asynchronously exchange data between web server and web
browser.
D:it provide the ability to mark up and style the display of web-page text
Correct Answer :C
Q. No. 76
Question: ActiveX can be disabled via browser settings.
A:true
B:false
Correct Answer : B
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 20 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 77
Question: ajax based on
A:javascript and XML
B:javascript and java
C:vbscript and XML
D:javascript and HTTP requests
Correct Answer :A
Q. No. 78
Question: Which of the following is used for parsing JSON text?
A: jQuery.each() B: jQuery.parseJSON()
C: jQuery.noConflict() D: None of the mentioned
Correct Answer :B
Q. No. 79
Question: Which selector use for selects all elements in the document.
A:$("p > *") B:$("p > *") C:$('*') D:$("p A:specialClass")
Correct Answer :C
Q. No. 80
Question: Is jquery a W3C standard?
A:Yes B:No
Correct Answer : B
Q. No. 81
Question: $(‘#temp’).action()
What type of selector is used in the above jQuery syntax?
A: id selector
B: class selector
C: name selector
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 21 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
D: value selector
Correct Answer :A
Q. No. 82
Question: What is the purpose of the url json?
A: Belongs to JSON object
B: Reference JSON formatted data
C: Both a and b
D: None of the mentioned
Correct Answer :B
Q. No. 83
Question: The basic Web Services platform is combination of _____ and _______.
A:CSS + JAVA B:XML + HTTP
C: XML + HTML D:CSS + HTTP
Correct Answer : B
Q. No. 84
Question: What will the function session_id() return is no parameter is passed?
A: Current Session Identification Number
B: Previous Session Identification Number
C: Last Session Identification Number
D: Error
Correct Answer : A
Q. No. 85
Question: What will be the output of the following PHP code? Say your previous
session username was nachi
1. Unset($_SESSION[‘username’]);
2. Printf(“username now set to:%s”,$_SESSION[‘username’]);
A: Username now set to: System
B: Username now set to: nachi
C: Username now set to:
D: Error
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 22 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer :C
Q. No. 86
Question: How php files can be accessed?
A:Through web browser
B:Through HTML files
C:Through web server
D:All of above
Correct Answer :C
Q. No. 87
Question: Which of the functions is used to sort an array in descending order?
A: sort()
B: asort()
C: rsort()
D: dsort()
Correct Answer : C
Q. No. 88
Question: What will be the output of the following PHP code ?
<?php
Function colour()
{$colors=array(“red”, ”green”, ”blue”, ”yellow”;
Foreach($colors as $value)
{
Echo “$value<br>”;
}
}
Colour();?>
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 23 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
A:red
green
blue
yellow
B:green
blue
yellow
red
C:red
blue
yellow
green
D:red
green
yellow
blue
Correct Answer :A
Q. No. 89
Question: Which statement is true?
A: An XML document can have one root element
B: An XML document can have one child element
C: XML elements have to be in lower case
D: All of above
Correct Answer :A
Q. No. 90
Question: Choose the correct HTML code to create an email link?
A: <a href=”[email protected]”></a>
B: <a href=”mailto:[email protected]”></a>
C: <mail> [email protected] </mail>
D: <a mailhref=”[email protected]”></a>
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 24 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer :B
Q. No. 91
Question: FTP is an acronym for
A: File Transaction Protocol
B: File Transfer Protocol
C: File Translation Protocol
D: File Transmission Protocol
Correct Answer :B
Q. No. 92
Question: What does the .com domain represents?
A: Education domain B: Commercial domain
C: Network D: None of the above
Correct Answer : B
Q. No. 93
Question: What does the XMLHttpRequest object accomplish in Ajax?
A:its the programming language used to develop Ajax application
B:it provide a means of echanging structured data between the web server or client
C:it provide the ability to asychronously exchange data between web server and web
broser.
D:it provide the ability to mark up and style the display of web-page text
Correct Answer : A
Q. No. 94
Question: Ajax comes in
A:2003 B:2005 C:2004 D:2006
Correct Answer :B
Q. No. 95
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 25 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Question: Which of the following is the most commonly used HTTP methods?
A PRE and POST B GET and SET
C:ASK and REPLY D:GET and POST
Correct Answer : D
Q. No. 96
Question: What is empty element in HTML?
A:An element with no tag
B:An element with no type
C: An element with no content
D:An element with no comment
Correct Answer : C
Q. No. 97
Question: A______________ is a symbolic name a network administrator assigns to a
machine.
A: URL B: DNS C: IP address D: Host name
Correct Answer : C
Q. No. 98
Question:
The list of predefine option for input control can be given by using __________
tag?
Answer Choices
A:<embed>
B:<datalist>
C:<dataSet>
D:<anchor>
Difficulty Level: Easy
Correct Answer: B
Q. No. 99
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 26 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Question:
Which of the following tags will be included in <head> section?
Answer Choices
A:<meta>
B:<link>
C:<style>
D:All of the above.
Difficulty Level: Easy
Correct Answer: D
Q. No. 100
Question:
You can apply a style to many selectors if you like. Just separate the selectors
with a
________?
Answer Choices
A: Comma
B:Hash
C:Colon
D:Question mark
Difficulty Level: Easy
Correct Answer: A
Q. No. 101
Question:
If we want to select all HTML tags on which a common CSS is to be apply, then which
of the following selectors will be used?
Answer Choices
A: *
B: :all
C:element
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 27 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
D::each
Difficulty Level: Intermediate
Correct Answer: A
Q. No. 102
Question:
If the following javascript code is executed then what will be the output?
<script type="text/javascript">
var x;
x = 1000/0;
alert(x);
</script>
Answer Choices
A:zero divide error
B:undefined
C:Infinity
D:NaN
Difficulty Level: Intermediate
Correct Answer: C
Q. No. 103
Question:
Which of the following method of an Array object adds and/or removes elements from
an array?
Answer Choices
A:Reverse
B:Shift
C:Slice
D:Splice
Difficulty Level: Difficult
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 28 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer: D
Q. No. 104
Question:
In JavaScript, we declare a variable by using the keyword var and until a value is
assignedto it, the value of the variable will be implicitly set to
_________________?
Answer Choices
A:NULL
B:NaN
C:undefined
D:notdefined
Difficulty Level: Intermediate
Correct Answer: C
Q. No. 105
Question:
If the following javascript code is executed, what will be the output?
<script type="text/javascript">
var F1 = function() {
return ("Hello World!");
}
alert(F1);
</script>
Answer Choices
A:Hello World!
B: F1
C: var F1 = function() {
return ("Hello World!");
}
D:compilation error
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 29 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Difficulty Level: Difficult
Correct Answer: C
Q. No. 106
Question:
____________ method of JavaScript you will use to redirect to another web page.
Answer Choices
A:window.reload
B:window.location
C:window.page
D:page.location
Difficulty Level: Intermediate
Correct Answer: B
Q. No. 107
Question:
var x="1";
alert(Number ("1")===x);
What will be the result?
Answer Choices
A:true
B:false
C:typeError
D:None of the above
Difficulty Level: Intermediate
Correct Answer: B
Q. No. 108
Question:
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 30 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
varaList = ["Apple", "Banana", "Grapes"];
aList.length=0;
aList.push("Orange");
alert (aList);
What will be the result?
Answer Choices
A:Orange, Apple, Banana, Grapes
B:Orange, Apple
C: Orange
D: ERROR
Difficulty Level: Intermediate
Correct Answer: C
Q. No. 109
Question:
Which of the following syntax is used to apply in-line style sheet in AngularJS?
Answer Choices
A:ng-style="(background-color: blue)"
B:ng-style="{'background-color':'blue'}"
C:ng-style="[background-color: blue]"
D:None of the above.
Difficulty Level: Easy
Correct Answer: B
Q. No. 110
Question:
Which of the following syntax will be used to set background image for a command
button in AngularJS?
Answer Choices
A:ng-style="{'background' : 'url(images.jpg)'}"
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 31 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
B:ng-style="{'background-image' : 'url(images.jpg)'}"
C:ng-style="{'background-image' = 'images.jpg'}"
D:Both A and B
Difficulty Level:
Correct Answer: D
Q. No. 111
Question:
________ act as glue between controller and view.
Answer Choices
A:&scope
B:$scope
C: _scope
D: %scope
Difficulty Level: Easy
Correct Answer: B
Q. No. 112
Question:
The ____________ attribute tells Angular to replace the text content of the
specified
HTML element with the value of a given expression, and to update the text content
when the value of that expression changes.
Answer Choices
A:ngBind
B:ngConnect
C:ngBinding
D:Both A and C
Difficulty Level: Intermediate
Correct Answer: A
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 32 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 113
Question:
Consider the following AngularJS script.
varmyApp = angular.module ("myApp", []);
myApp.controller ("controller3", function ($scope) {
$scope.cnt = 0;
$scope.fruits = ['Orange', 'Apple', 'Mango', 'Grapes', 'Banana', 'Cherry'];
$scope.F1 = function () {
/* Place code here. */
};
});
Which of the following code is place in function F1 to print the values of fruits
array?
Answer Choices
A:for (var i in $scope.fruits){
alert ($scope.fruits[i]);}
B:for (var i = 0; i <fruits.length; i++) {
alert($scope.fruits[i]);}
C:while (cnt< $scope.fruits.length) {
alert($scope.fruits[cnt]);
cnt += 1;}
D:for (var i = 0; i <fruits.length; i++) {
alert (fruits[i]);}
Difficulty Level: Difficult
Correct Answer: A
Q. No. 114
Question:
What is the correct jQuery code to set the background color of all div elements to
red?
Answer Choices
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 33 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
A:$("div").layout ("background-color","red");
B:$("div").manipulate ("background-color","red");
C:$("div").css ("background-color","red");
D:$("div").style ("background-color","red");
Difficulty Level: Easy
Correct Answer: C
Q. No. 115
Question:
With jQuery, look at the following selector: $("div.firstClass"). What does it
select?
Answer Choices
A:The first div element with class="firstClass"
B:The first div element with id="firstClass"
C:All div elements with class="firstClass"
D:All div elements with id="firstClass"
Difficulty Level: Easy
Correct Answer: C
Q. No. 116
Question:
Which jQuery method is used to hide selected elements?
Answer Choices
A:hidden()
B:hide()
C:visible(false)
D:display(none)
Difficulty Level: Easy
Correct Answer: B
Q. No. 117
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 34 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Question:
What are the :odd and :even filters?
Answer Choices
A:They allow you to determine if a number is odd or even.
B:They allow you to determine if a specific element is in an odd or even position.
C::odd and :event are invalid filter.
D:None of the above.
Difficulty Level: Intermediate
Correct Answer: B
Q. No. 118
Question:
What are the various speed options?
Answer Choices
A:The words "slow" and "fast" as well as integers for the milliseconds
B:Only the words "slow", "fast", and "medium"
C:All of the above
D:None of the above
Difficulty Level: Intermediate
Correct Answer: A
Q. No. 119
Question:
The speed options can be applied to which jQuery functions?
Answer Choices
A:css and Ajax
B:show and fadeIn
C:toggleCss
D:All of the above
Difficulty Level: Easy
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 35 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Correct Answer: B
Q. No. 120
Question:
There are three different kinds of arrays:
Answer Choices
A:Numeric array, String array, Multidimensional array
B: Date array, Numeric array, Multidimensional array
C:Numeric array, Associative array, Multidimensional array
D:Const array, Associative array, Multidimensional array
Difficulty Level: Easy
Correct Answer: C
Q. No. 121
Question:
Which of the following will be used to access cookies in PHP?
Answer Choices
A: $COOKIE
B:$_COOKIE
C:$HTTP_COOKIE_VARS
D:Both B and C
Difficulty Level: Intermediate
Correct Answer: D
Q. No. 122
Question:
The ___________ function checks if the "end-of-file" (EOF) has been reached.
Answer Choices
A:feof()
B:fileEnd()
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 36 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
C:file_eof()
D:_EOF()
Difficulty Level: Easy
Correct Answer: A
Q. No. 123
Question:
What will be the output of the following PHP code?
<?php
$Fruits = array ("Orange", "Apple", "Mango");
echo "My favorite fruit is : {$Fruits[0]}";
?>
Answer Choices
A:My favorite fruit is : {$Fruits[0]}
B:My favorite fruit is : {Orange}
C:My favorite fruit is : Orange
D:The code has an error.
Difficulty Level: Intermediate
Correct Answer: C
Q. No. 124
Question:
Which types restriction can be used with String data types in XML schema
(xs:string)?
Answer Choices
A:pattern
B:maxValue
C:strLength
D:All of the above.
Difficulty Level: Intermediate
Correct Answer: A
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 37 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 125
Question:
Which of the following statement will be used to fixed value is "red" in xml
schema:
Answer Choices
A:<xs:element name="color" type="xs:string" fixed="red"/>
B:<xs:element name="color" type="xs:string" fix="red"/>
C:<xs:element name="color" type="xs:string" static="red"/>
D:<xs:element name="color" type="xs:string" const="red"/>
Difficulty Level: Intermediate
Correct Answer: A
Q. No. 126
Question:
Which of the following is XML Schema built-in data type?
Answer Choices
A:xs:int
B:xs:decimal
C:xs:integer
D:All of the above
Difficulty Level: Easy
Correct Answer: D
Q. No. 127
Question:
Which of the following restrictions can be given on XML elements?
Answer Choices
A:totalDigits
B:minExclusive
C:length
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 38 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
D:All of the above.
Difficulty Level: Intermediate
Correct Answer: D
Q. No. 128
Question:
Which object is the top of the hierarchy?
Answer Choices
A:Window Object
B:Document Object
C:Form Object
D:Form Control Elements
Difficulty Level: Intermediate
Correct Answer: A
Q. No. 129
Question:
What is the output of following code?
window.onload = function () {
for (var i = 0; i < document.getElementsByTagName("*").length; i++) {
alert(document.getElementsByTagName("*").item(i).tagName);
}
}
Answer Choices
A:The code will display all the TAG names.
B:Error because function name is missing.
C:Error because TagName is missing.
D:Error because invalid event.
Difficulty Level: Difficult
Correct Answer: A
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 39 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 130
Question:
What is the purpose of the Attr object in the HTML DOM?
Answer Choices
A:Redirect to another HTML page
B:HTML Attribute
C:Used to arrange elements
D:None of the mentioned
Difficulty Level:Intermediate
Correct Answer: B
Q. No. 131
Question:
Examine the following code snippet.
<script type="text/javascript">
var squareOfNumber = (function (out) { return out*out; }(7));
alert(squareOfNumber);
</script>
The output for the above statement would be.
Answer Choices
A:0
B:49
C:NULL
D:Compilation error
Difficulty Level: Difficult
Correct Answer: B
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 40 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 132
Question:
In the following list, which states are valid? XMLHttpRequest.readyState.
Answer Choices
A:2: request received
B:3: processing request
C:4: request finished and response is ready
D:All of the above.
Difficulty Level: Intermediate
Correct Answer: D
Q. No. 133
Question:
What is the correct way to have the function checkState called after 10 seconds?
Answer Choices
A:window.setTimeout(checkState, 10);
B:window.setTimeout(checkState, 10000);
C:window.setTimeout(checkState(), 10);
D:None of the above
Difficulty Level: Intermediate
Correct Answer: B
Q. No. 134
Question:
Which type of server technology is used by Joomla?
Answer Choices
A:Joomla
B:Apache
C:PHP
D:All of the above
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 41 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Difficulty Level: Easy
Correct Answer: B
Q. No. 135
Question:
Given below is a list of toolbars. Which are toolbars available in Joomla
Answer Choices
A:Article Manager Toolbar
B:Menu Manager Toolbar
C:Module Manager Toolbar
D:All of the above.
Difficulty Level: Easy
Correct Answer: D
Q. No. 136
Question:
Examine the following code snippet.
<script type="text/javascript">
var x = parseInt("1001ABC");
alert(x);
</script>
The output for the above statement would be.
Answer Choices
A:undefined
B:NaN
C:1001
D:Error
Difficulty Level: Intermediate
Correct Answer: C
Question Bank – Advanced Web Programming
Infoway Technologies Pvt. Ltd., Pune Page 42 of 42
Contact No.: 020-41312111/12
Website: www.infowayltd.com
Q. No. 137
Question:
Which Joomla file provides the central logic of the template including any module
and
component display?
Answer Choices
A:index.php
B:template.css
C:TemplateDetails.xml
D: banner.dtd
Difficulty Level: Easy
Correct Answer: A
12/16/2018 AWP1
https://docs.google.com/forms/d/e/1FAIpQLSeI0lo2XxROOYt-DEvO21KOwtY-
uvqMQa1ljSYYF4CU3l6isg/viewscore?
viewscore=AE0zAgCNxZyOezK8ZUdLhqbE4ueXxZP11H4bo2rj6lWzIT1eLvHH4xw… 1/11
AWP1 Total points 13/20
[email protected]
Section score 13/20
1/1
<LL>
<DD>
<DL>
<DS>
Email address *
From which tag descriptive list starts ?
12/16/2018 AWP1
https://docs.google.com/forms/d/e/1FAIpQLSeI0lo2XxROOYt-DEvO21KOwtY-
uvqMQa1ljSYYF4CU3l6isg/viewscore?
viewscore=AE0zAgCNxZyOezK8ZUdLhqbE4ueXxZP11H4bo2rj6lWzIT1eLvHH4xw… 2/11
1/1
<head>
<h6>
<heading>
<h1>
1/1
Static Documents
Stateless Document
Active Documents
Dynamic Documents
1/1
Links
Webpages
Metadata
Pictures
Correct HTML tag for the largest heading is
Documents that are created and stored in a server as a Fixed
Content are called
The <head> element is a container for
12/16/2018 AWP1
https://docs.google.com/forms/d/e/1FAIpQLSeI0lo2XxROOYt-DEvO21KOwtY-
uvqMQa1ljSYYF4CU3l6isg/viewscore?
viewscore=AE0zAgCNxZyOezK8ZUdLhqbE4ueXxZP11H4bo2rj6lWzIT1eLvHH4xw… 3/11
0/1
A
B
C
D
Correct answer
A
12/16/2018 AWP1
https://docs.google.com/forms/d/e/1FAIpQLSeI0lo2XxROOYt-DEvO21KOwtY-
uvqMQa1ljSYYF4CU3l6isg/viewscore?
viewscore=AE0zAgCNxZyOezK8ZUdLhqbE4ueXxZP11H4bo2rj6lWzIT1eLvHH4xw… 4/11
0/1
Proxy Domain
Proxy Documents
Proxy Server
Proxy IP
Correct answer
Proxy Server
0/1
Local-server
Client-server
3-tier
None of these
Correct answer
Client-server
Hyper Text Transfer Protocol (HTTP) support
www is based on which model?
12/16/2018 AWP1
https://docs.google.com/forms/d/e/1FAIpQLSeI0lo2XxROOYt-DEvO21KOwtY-
uvqMQa1ljSYYF4CU3l6isg/viewscore?
viewscore=AE0zAgCNxZyOezK8ZUdLhqbE4ueXxZP11H4bo2rj6lWzIT1eLvHH4xw… 5/11
1/1
Server
Domain
WebServer
Memory
1/1
Hypertext Markup Locator
Hypertext Markup Language
Hypertext Mixed Language
Hypertext Markup Lines
In Architecture, to improve e
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 1 of 23
e-DAC
Q.1 Fill in the Blanks: (1 Mark each)
1. With XML, you can createyour own elements , also called tags.
2. The beginning or first element in XML is called the root (document) element.
3. Jon Bosak is known as the father of XML.
4. HTML is anapplication of SGML _.
5. The XML linking language is called XLink .
6. The CSS property font-weight allows you to control text boldness.
7. A child element has a direct relationship to a parent element.
8. A [prefix with] colon in an element or attribute name must be associated with a
namespace
identifier.
9. An attribute modifies an element by associating information with it.
10. Element names are case sensitive.
11. External DTDs can reference both SYSTEM and PUBLIC identifiers.
12. A valid XML documenthas a DTD associated with it.
13. An XML document can have both an internal and external subset.
14. <!ATTLIST ...> declares one or more attributes .
15. A content model defines what elements may be contained within another element.
16. Element names must begin with a letter or an underscore .
17.An empty element contains no content.
18. A ? repetition operator mean zero or one instance of the element.
19. Content models are defined with either a sequence list or a choice list.
20. In the functional notation rgb( ), you can use numbers or percentages
21. Attribute names must begin with a letter or underscore.
22. The keyword for an optional attribute is #IMPLIED .
23. The ID attribute type defines an attribute value as a unique identifier.
24. The xml:lang attribute is a built-in XML attribute for specifying languages.
25. A NOTATION declaration is needed for this type of enumerated attribute..
26. An internal entity is declared locally in a DTD while an external entity is
declared in a
separate document.
27. A parameter entity is legal only in a DTD.
28. A general entity referencebegins with an ampersand (&) and ends with a
semicolon.
29. Any parsed entity consists of legal XML text.
30. One tool you can use to test a DTD is with a conditional section.
31. A namespace definition without a prefix is known as a default namespace.
32. Namespaces are declaredwith an xmlns declaration in an element start-tag.
33. The namespace myth refers to a belief that namespaces are associated with, or
validated by,
schemas.
34. You can declare multiple namespaces with multiple instances of the xmlns
declaration within a start-tag.
35. Namespaces are often declared within the start-tag of a root element.
36. Unnamed definitions of simple or complex types are known as anonymous .
37. With <complexType>, you can define content of both complex and mixed type.
38. minOccursspecifiesthe minimum times an element may occur while maxOccurs
determines the maximum times it may occur
39.. The ref attribute can reference other element and attribute definitions in a
schema.
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 2 of 23
e-DAC
40. The <attribute> element must be declared with either a named or anonymous
complexType
41. The original XML document or byte stream is referred to as a source tree and
the output is called
the result tree.
42. Location paths can be either abbreviated or unabbreviated .
43. A synonym for<xsl:stylesheet> is <xsl:transform> .
44. The instruction <xsl:element> is an example of an XSLT element.
45. Both <xsl:if> and <xsl:choose> help perform conditional processing.
46. The root element for XHTML is html .
47. The root element must contain a namespace declaration.
48. In XHTML, always use a CDATA section inside the <script> element.
49. The forthcoming recommendation for small devices is called XHTML Basic .
50. Document profiles defines the elements, etc. that are appropriate for a certain
class of
document, without a formal recommendation.
Q.2 Select True or False: (1 Mark each)
1. XML will replace HTML as the leading language for the Web.(False)
2. To use XML you must pay a small license fee to Sun Microsystems.(False)
3. A URL is a subset of the URI naming scheme. (True)
4. Namespaces in XML cause regrettable naming collisions. (False)
5. Every XML document should have a prolog or XML declaration. (False)
6. XML forms comments differently than SGML and HTML. (False)
7. HTML elements must always properly nest. (False)
8. Valid XML must also be well formed. (True)
9. It is permissible, but not mandatory, to quote XML attribute values. (False)
10. An internal subset requires a SYSTEM identifier. (False)
11. An external subset requires a URI. (True)
12. A validity error is always fatal. (False)
13. XML does not necessarily have to be well-formed, but it must bevalid. (False)
14. An element name can begin with any character that is legal in an element.
(False)
15. Child element and mixed content models must be enclosed in quotes. (False)
16. A semicolon delimits element names in a sequence list. (False)
17. A hexadecimal value representing an RGB triplet can be expressed in three or
six digits. (True)
18. You can skip quotation marks around an attribute value. (False)
19. If you reuse a unique ID, it should generate a validity error. (True)
20. An unparsed entity is a non-XML data type. (True)
21. Certain attributes are permissible in end-tags. (False)
22. CSS/2’s attribute selector is fully implemented in the Netscape and Microsoft
browsers. (False)
23. An unparsed entity may require a helper application to render it. (True)
24. Predefined entities represent special markup characters. (True)
25. Parameter entity references begin with an ampersand. (False)
26. Unicode characters can be represented by hexadecimal numbers. (True)
27. Conditional sections are legal in XML documents as well as DTDs. (False)
28. Namespaces can be associated with schemas by a URI. (True)
29. A URI can be either a URL or a URN. (True)
30. Default namespaces apply to attributes. (False)
31.XML. namespaces are not associated with objects. (True)
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 3 of 23
e-DAC
32. <choice> is used for grouping elements. (True)
33. <string> is a built-in simple datatype. (True)
34. A valid value for maxOccurs is unbounded. (True)
35. A DTD has richer datatypes than XML Schema. (False)
36. XML Schema unfortunately did not inherit the attribute types from XML 1.0.
(False)
37. Location paths come from the XPath standard. (True)
38. You cannot embed an XSL stylesheet as you can CSS in HTML. (False)
39. XSLFO does not completely replace CSS. (True)
40. The <xsl:output> instruction is required in every XSL stylesheet. (False)
41. XSLT is a W3C recommendation while XSLFO is not (yet). (True)
42. Attribute values must be surrounded by double quotes. (False)
43. XHTML is moving towards modularization. (True)
44. It is good practice to nest <a> elements within <a> elements. (False)
45. Do not include the XHTML namespace when including XHTML in an XML document.
(False)
46. The content or MIME type for XHTML is text/xhtml. (False)
Q.3 Select the correct answer: (1 Mark each)
1. What does XML stand for?
1. eXtra Modern Link
2. eXtensible Markup Language
3. Example Markup Language
4. X-Markup Language
Level: Easy
2. What is the correct syntax of the declaration which defines the XML version?:
1. <xml version="1.0" />
2. <?xml version="1.0"?>
3. <?xml version="1.0" />
4. None of the above
Level: Easy
3. Which statement is true?
1. All the statements are true
2. All XML elements must have a closing tag
3. All XML elements must be lower case
4. All XML documents must have a DTD
Level: Easy
4. Is it easier to process XML than HTML?
1. Yes
2. No
3. Somtimes
4. Cant say
Level: Easy
5. Which of the following programs support XML or XML applications?:
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 4 of 23
e-DAC
1. Internet Explorer 5.5
2. Netscape 4.7
3. RealPlayer.
4. both 1 and 2
Level: Easy
6. Kind of Parsers are
1. well-formed
2. well-documented
3. non-validating and validating
4. none of the above
Level: Easy
7. Well formed XML document means
1. it contains a root element
2. it contain an element
3. it contains one or more elements
4. must contain one or more elements and root element must contain all
other elements
Level: Easy
8. Comment in XML document is given by
1. <? --------- >
2. <!-- --!>
3. <!-- -->
4. </-- -- >
Level: Easy
9. When processing an output XML, "new line" symbols
1. are copied into output "as is", i.e. "CR+LF" for Windows, CR for Macintosh, LF
for Unix.
2. are converted to single LF symbol
3. are converted to single CR symbol
4. are discarded
Level: Easy
10. Which of the following strings are a correct XML name?
1. _myElement
2. my Element
3. #myElement
4. None of the above
Level: Easy
ss
11. Which of the following strings are a correct XML name?
1. xmlExtension
2. xslNewElement
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 5 of 23
e-DAC
3. XMLElement#123
4. All
Level: Easy
12. Which of the following XML fragments are well-formed?
1. <?xml?>
2. <?xml version="1.0"?>
3. <?xml encoding="JIS"?>
4. <?xml encoding="JIS" version="1.0"?>
Level: Easy
13. What are the predefined attributes
1. xml:lang
2. xml:space
3. both
4. none.
Level: Easy
14. Kind of Parsers are
1. well-formed
2. validating
3. non-validating
4. Both 2 & 3
Level: Easy
15. Valid XML document means (most appropriate)
(1) the document has root element
(2) the document contains atleast one or more root element
(3) the XML document has DTD associated with it & it complies with thatDTD
(4) Each element must nest inside any enclosing element property
16. XML uses the features of
(1) HTML
(2) XHTML
(3) VML
(4) SGML
Level:Easy
17. XML document can be viewed in
(1) IE 3.0
(2) IE 2.0
(3) IE 6.0
(4) IE X.0
Level: Medium
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 6 of 23
e-DAC
Topic: DTD
18. There is a way of describing XML data, how?
1. XML uses a DTD to describe the data
2. XML uses XSL to describe data
3. XML uses a description node to describe data
4. Both 1and 3
Level: Medium
19. What does DTD stand for?
1. Direct Type Definition
2. Document Type Definition
3. Do The Dance
4. Dynamic Type Definition
Level: Medium
20. DTD includes the specifications about the markup that can be used within the
document, the
specifications consists of all EXCEPT
1. the browser name
2. the size of element name
3. entity declarations
4. element declarations
Level: Medium
21. Which of the following XML documents are well-formed?
1. <firstElement>some text goes here
<secondElement>another text goes here</secondElement>
</firstElement>
2. <firstElement>some text goes here</firstElement>
<secondElement> another text goes here</secondElement>
3. <firstElement>some text goes here
<secondElement> another text goes here</firstElement>
</secondElement>
4. </firstElement>some text goes here
</secondElement>another text goes here<secondElement>
<firstElement>
Level: Medium
22. Which of the following XML fragments are well-formed?
1. <myElement myAttribute="someValue"/>
2. <myElement myAttribute=someValue/>
3. <myElement myAttribute=’someValue’>
4. <myElement myAttribute="someValue’/>
Level: Medium
23. How can we make attributes have multiple values:
1. <myElement myAttribute="value1 value2"/>
2. <myElement myAttribute="value1" myAttribute="value2"/>
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 7 of 23
e-DAC
3. <myElement myAttribute="value1, value2"/>
4. attributes cannot have multiple values
Level: Medium
24. Which of the following XML fragments are well-formed?
1. <myElement myAttribute="value1 <= value2"/>
2. <myElement myAttribute="value1 & value2"/>
3. <myElement myAttribute="value1 > value2"/>
4. None of the above
Level: Medium
25. The use of a DTD in XML development is:
1. required when validating XML documents
2. no longer necessary after the XML editor has been customized
3. used to direct conversion using an XSLT processor
4. a good guide to populating a templates to be filled in when generating an XML
document automatically
Level: Medium
26. Parameter entities can appear in
1. xml file
2. dtd file
3. xsl file
4. Both 1 and 2
Level: Medium
27. Attribute standalone="no" should be included in XML declaration if a document:
1. is linked to an external XSL stylesheet
2. has external general references
3. has processing instructions
4. has an external DTD
Level: Medium
28. In XML
(1) the internal DTD subset is read before the external DTD
(2) the external DTD subset is read before the internal DTD
(3) there is no external type of DTD
(4) there is no internal type of DTD
Level Easy
29. Disadvantages of DTD are
(i)DTDs are not extensible
(ii) DTDs are not in to support for namespaces
(iii) there is no provision for inheritance from one DTDs to another
(1) (i) is correct
(2) (i),(ii) are correct
(3) (ii),(iii) are correct
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 8 of 23
e-DAC
(4) (i),(ii),(iii) are correct
Level: Medium
30. To use the external DTD we have the syntax
(1) <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
(2) <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
(3 )<?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT “order.dtd”?>
(4) <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
Level: Medium
31. To add the attribute named Type to the <customer> tag the syntax will be
(1) <customer attribute Type=”exelent”>
(2) <customer Type attribute =”exelent”>
(3) <customer Type attribute_type=”exelent”>
(4) <customer Type=”exelent”>
Level: Medium
32. The syntax for parameter entity is
(1) <! ENTITY % NAME DEFINITION>
(2) < ENTITY % NAMEDEFINITION>
(3) <! ENTITY $ NAMEDEFINITION>
(4) < ENTITY % NAMEDEFINITION>
Level: Medium
Topic: Schema
33. You can name the schema using the name attribute like
1. <schema attribute=”schema1”>
2. <schema nameattribute=”schema1”>
3. <schema nameattri=”schema1”>
4. <schema name=”schema1”>
Level: Medium
34. The default model for complex type, in XML schemas for element is
1. textOnly
2. elementOnly
3. no default type
4. both 1 & 2
Level: Medium
35. Microsoft XML Schema Data types for Hexadecimal digits representating octates
1. UID
2. UXID
3. UUID
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 9 of 23
e-DAC
4. XXID
Level: Medium
36. A schema describes
(i) grammer
(ii) vocabulary
(iii) structure
(iv) datatype of XML document
(1) (i) & (ii) are correct
(2) (i),(iii) ,(iv) are correct
(3) (i),(ii),(iv) are correct
(4) (i),(ii),(iii),(iv) are correct
Level: Medium
37. Microsoft XML Schema Data Type “boolean” has values
(1) True ,False
(2) True ,False or 1,0
(3) 1,0
(4) any number other then zero and zero
Level: Difficult
38. Simple type Built into Schema “data’ represent a data in
(1) MM-DD-YY
(2) Dd-MM-YY
(3) YY-MM-DD
(4) YYYY-MM-DD
Level: Medium
39. In simple Type Built into XML schema Boolean type holds
(1) True, False
(2) 1,0
(3) both (1) & (2)
(4) True/False and any number except 0
Level: Medium
40. In simple type built into XML schema type flat has single precision of
floating point
(1) 16 bit
(2) 32 bit
(3) 8 bit
(4) 4 bit
Level: Medium
Topic: Misc.
41. The XML DOM object is
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 10 of 23
e-DAC
1. Entity
2. Entity Reference
3. Comment Reference
4. Comment Data
Level: Medium
42.Attribute of the document interface in DOM is/are
(i)doctype
(ii)implementation
(iii)documentElement
which are read only attributes
(1) (i) only
(2) (ii) only
(3) (ii),(iii) only
(4) all
Level: Medium
43. The default model for complex type, in XML schemas for element is
(1) textOnly
(2) elementOnly
(3) no default type
(4) both a & b
Level: Easy
44. To create a choise in XML schemas, we use the
(1) <xsd:select> element
(2) <xsd:multi> element
(3) <xsd:choise> element
(4) <xsd:single> element
Level: Medium
45. The XML DOM object is
(1) Entity
(2) Entity Reference
(3) Comment Reference
(4) Comment Data
Level: Medium
46. To create a data island we use the HTML element
(1) <XML>
(2) <dataisland>
(3) <Island>
(4) <XMLIsland>
Level: Medium
47. To Bind the HTML elements with DSO we use attribute
(1) DATASOURCE
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 11 of 23
e-DAC
(2) DATAFIELD
(3) DATASRC
(4) DATAFLD
Level: Medium
48. To bind the HTML element <INPUT> Type in text with the datasource “dsoCustomer”
we
use
(1) <INPUT TYPE=”TEXT” DATAFIELD=”#dsoCustomer”>
(2) <INPUT TYPE=”TEXT” DATASRC=”dsoCustomer”>
(3) <INPUT TYPE=”TEXT” DATASRC=”#dsoCustomer”>
(4) <INPUT TYPE=”TEXT” DATAFLD=”#dsoCustomer”>
Level: Medium
49. XML DSOs has the property for the number of pages of data the recordset
contains
(1) count
(2) number
(3) pageCount
(4) pageNumber
Level: Medium
50. Whats so great about XML?
(1) Easy data exchange
(2) High speed on network
(3) Only (2)iscorrect
(4) Both (1) & (2)
Level: Medium
51. For XML document to be valid
(1) document need to be well formed also
(2) document need not to be well formed
(3) document need to be well formed & valid
(4) document validity has no relationship with well formedness
Level: Medium
52. A textual object is a well formed XML document if
(i) Taken as a whole it matches the production labeled document.
(ii) Each of the parsed entity which is referenced directly or indirectly within
the
document can be well formed
(1) (i) is correct
(2) (ii)iscorrect
(3) both arecorrect
Level: Medium
53. <?xml version=”1.0” standalone=”yes” encoding=”UTF-8”?>
(1) it shows that the version is 1.0
(2) shows thatit is standalone
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 12 of 23
e-DAC
(3) the standalone is wrong
(4) version attribute is not in XML
Level: Medium
54. The attribute used to define a new namespace is
(1) XMLNS
(2) XmlNameSpace
(3) Xmlns
(4) XmlNs
Level: Medium
Topic: Templates
55. To match the root node in XMLT transform the syntax will be
1. <xsl:template match=”Document”>
2. <xsl:template match=”Root”>
3. <xsl:template match=”RootNode”>
4. <xsl:template match=”/”>
Level: Medium
56. To match the specific XML elements child like <NAME> of parent element is
<PLANET> the syntax will
be
1. <xsl:template match=”PLANET_NAME”>
2. <xsl:template match=”PLANET/NAME”>
3. <xsl:template match=”/NAME”>
4. <xsl:template match=”//”>
Level: Medium
57. PI in XML specification stands for
1. 3.14
2. priceless instruction
3. processing instruction
4. polymorphic inheritance
Level: Medium
58. A validating XML application should be used when:
1. the design demands that all elements use both start and end tags
2. missing or out-of-place elements could cause application errors
3. attribute values cannot refer to external entity references
4. High performance is an important architectural constraint
Level: Medium
59. A DSO operates like
(a) data simulation object atserverside
(b) dynamic source object at client side
(c) data source object at client side
(d) data simulation object at client side
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 13 of 23
e-DAC
Ans: ( c)
Topic: XSL
60. The XSL formating object use to format a list is
1. list-block
2. list-item
3. list-item-body
4. list-item-label
Level: Difficult
61. The attribute used to define a new namespace is
1. XMLNS
2. XmlNameSpace
3. Xmlns
4. XmlNs
Level: Difficult
62. Identify the most accurate statement about the application of XML:
1. XML must be used to produce XML and HTML output.
2. XML cannot specify or contain presentation information.
3. XML is used to describe hierarchically organized information.
4. XML performs the conversion of information between different e-business
applications.
Level: Difficult
63. The XSl formatting object which formats the data and caption of a table is
(1) table
(2) table-content
(3) table-text
(4) none of theabove
Level: Difficult
64. The XSL formating object which holds the content of the table body
(1) table
(2) table-body
(3) table-content
(4) table-footer
Level: Difficult
65. The XSL formatting object which formats the data in a table
(1) table
(2) table-body
(3) title
(4) table-content
Level: Difficult
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 14 of 23
e-DAC
66. The XSL formating object use to hold the content of the label of a list item is
(1) list-block
(2) list item
(3) list-item-body
(4) list-item-label
Level: Difficult
67. The XSL formating object use to hold the contents of the body of a list item is
(1) list-block
(2) list item
(3) list-item-body
(4) list-item-label
Level: Difficult
68. XSL has formatting object “block”
(1) is not supported in XSL
(2) generates a block level reference area
(3) create a display block
(4) groups global declarations for a style sheet
Level: Difficult
69. XSL has “block container” for formating the document
(1) to create a display block to format the titles
(2) to create a display block to format the paragraphes
(3) to create a display block to format the headlines & figures
(4) to create a block level reference area
Level: Difficult
70. The syntax for writing the minimum occurrence for an element is
(1) <xsd:element ref=”note” min=”0”/>
(2) <xsd:elements ref=”note” min=”0”/>
(3) <xsd:elements ref=”note” minOccur=”0”/>
(4) <xsd:elements ref=”note”minOccurs=”0”/>
Level: Medium
71. The syntax for writing default values for element is
(1) <xsd:element name=”max” type=”xsd:integer” value=”100”/>
(2) <xsd:element name=”max” type=”xsd:integer” fixValue=”100”/>
(3) <xsd:element name=”max” type=”xsd:integer” default=”100”/>
(4) <xsd:element name=”max” type=”xsd:integer” defaultval=”100”/>
Topic: XSLT , X-Pointers, XML
72. To use XSLT in an XML system:
1. the input and output of the XSLT processor must be unparsed XML documents
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 15 of 23
e-DAC
2. the input and output of the XSLT processor must be a hierarchical tree
representing an XML document
3. the XSLT processor must be called from a web agent
4. the XSLT processor must be given the DTD as well as the XML document
instance
Level: Difficult
73. What is the role of the XPath language in XSL processing?
1. XPath identifies the order or path of processing to be followed as the XSL
language is processed
2. XPath identifies locations in XML data to be transformed in the source tree
and the locations to be generated in output tree specified in XSL
translation prescriptions
3. XPath identifies the path to be followed in the execution of XSL translation
prescriptions
4. XPath specifies which XSL transform files are to be used in the translation of
XML
Level: Difficult
74. Which statement correctly describes the capabilities of the XSLT language?
1. XSLT uses the DTD to determine how XML documents will be translated
2. XSLT specifies how a hierarchical trees, representable by an XML document
may be translated into non-hierarchical formats
3. XSLT specifies how a hierarchical tree, representable by an XML
document, may be translated into another hierarchical tree, also
representable by an XML document
4. XSLT specifies the formatting style to be used to render an XML document
Level: Difficult
75. XSLT processors accept as input:
1. an XML conforming document file and an XSLT specification file
2. only an XML document
3. only an XSLT specification
4. either an XML document or an XSLT specification
Level: Difficult
76. The transformation of XML document in to another type of document by XSLT can
be done
by
(i)In the server
(ii)In the client
(iii) With a separate program
(1) only(i) & (ii)
(2) only (ii) &(iii)
(3) all arecorrect
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 16 of 23
e-DAC
(4) only (i) & (iii)
Level: Difficult
77: To match the root node in XMLT transform the syntax will be
(1) <xsl:template match=”Document”>
(2) <xsl:template match=”Root”>
(3) <xsl:template match=”RootNode”>
(4) <xsl:template match=”/”>
Level: Difficult
78: To match the specific XML elements in XMLT the syntax for given name “rootnode”
is
(1) <xsl:template match=”root”>
(2) <xsl:template match=”/”>
(3) <xsl:template match=”rootnode”>
(4) <xsl:template match=”//”>
Level: Difficult
79 To match the specific XML elements child like <NAME> of parent element is
<PLANET>
the syntax will be
(1) <xsl:template match=”PLANET_NAME”>
(2) <xsl:template match=”PLANET/NAME”>
(3) <xsl:template match=”/NAME”>
(4) <xsl:template match=”//”>
Level: Difficult
80. InXSLT style sheet we have syntax to match elements with id as (if id is
“change”)
(1) <xsl:template match=”id(‘change’)”>
(2) <xsl:template match=”(change)”>
(3) <xsl:template match=”change”>
(4) <xsl:template match-id=”Change”>
Level: Difficult
81. To match the text node (in XSLT) the syntax will be
(1) <xsl:template match=”text”>
(2) <xsl:template match-text=”text”>
(3) <xsl:template match=text( )>
(4) <xsl:template match=”text( )”>
Level: Difficult
82. An element declaration specifies
1. a single markup element
2. zmarkup elements
3. markup data
4. the document data
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 17 of 23
e-DAC
Level: Easy
83. Well formed XML document means(most appropriate)
1. it contains a root element
2. it contain an element
3. it contains one or more elements
4. must contain one or more elements and root element must contain all other
elements
Level: Easy
84: Which of the following specify that the order and content of "membership" is
not important
1. <!ELEMENT membership NORULE>
2. <!ELEMENT membership EMPTY>
3. <!ELEMENT membership ALL>
4. <!ELEMENT membershipANY>
Level: Easy
85: Which of the following is used to specify the attribute list of an element
1. ATTLIST
2. ?ATTLIST
3. !ATTLIST
4. #ATTLIST
Level: Medium
86: Which of the following instruct the browser which stylesheet to use
1. <xml-stylesheet type="text/xsl" href="cd.xsl">
2. <xml-stylesheet type="text/xsl" xsl="cd.xsl">
3. <?xml-stylesheet type="text/xsl" href="cd.xsl"?>
4. <?xml-stylesheet type="text/xsl" xsl="cd.xsl"?>
Level: Difficult
88: Which of the following XSLT Patterns is used to match any descendant nodes
1) /
2) //
3) .
4) ..
Level: Medium
89: Which of the following XSLT Patterns is used to match the parent node
1) /
2) //
3) .
4) ..
Level: Medium
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 18 of 23
e-DAC
90: Which of the following is a valid XSLT iteration command
1) for
2) for-all
3) for-each
4) in-turn
Level: Medium
91. What is an advantage of XML compared to HTML?
1) XML works on more platforms.
2) XML is suited to using Web pages as front ends to databases.
3) XML was designed for portable phones.
4) XML is simpler to learn than HTML.
Level: Difficult
92. The following best describes the development of XML.
1. XML developed from HTML because WEB browsers became more powerful.
2. XML is designed as a replacement because SGML can not be used for document
development.
3. XML builds on HTMLs ability to provide content to virtually any audience by
adding the power
of intelligent content.
4. XML is the modern replacement for HTML and SGML, taking the good pointsfrom
each,
making both of those languages obsolete.
Level: Medium
93) The correct priority for implementing XML based IETMs is :
1. Develop DTD, conduct a pilot project, create a modular library, train staff.
2. Train staff, convert legacy documents, develop DTD, create modular library.
3. Conduct pilot program, train staff, create modular library, develop DTD
4. Conduct pilot program, train staff, develop DTD, convert documents, purchace XML
tools.
Level: Difficult
94. Which of the following statements is true:
1. XML is a direct subset ofSGML
2. SGML is an application of HTML
3. XML is a kind of dynamic HTML
4. XHTML is XML rewritten in HTML
5. SGML and XML are the same thing
Level: Difficult
95. What is a qualified name?
1. Any name conforming to the XML Names specification
2. A name having prefix and local name separated by a colon
3. A name applying only to qualified elements and attributes
4. None of the above
Level: Dfficult
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 19 of 23
e-DAC
96. What is a NCName
1. A Non-Common Name
2. A Non-Conforming Name
3. A Non-Colonized Name
4. None of the above
Level:Difficult
97. If a namespace is attached to an element by prefix, what is the effect on non-
prefixed child
elements
1. Nothing
2. The namespace affects the immediate nonprefixed child elements, but no others
3. The namespace affects all child elements of the element to which the namespace
is
attached no matter what level.
4. None of the above
Level:Difficult
98. What is the default namespace
1. The namespace used by default when no namespace is declared
2. The namespace used when two or more namespaces are referenced
3. A namespace that is referenced with the xmlns attribute, but without aprefix
4. None of the above
Level:Difficult
99.What is an XML namespace?
1. A set of names applied to specific spaces within an XML document, such as the
head
and body
2. A set of names representing a specific XML vocabulary
3. A set of names for XML documents pertaining to a particular vocabulary
4. None of the above.
Level:Difficult
100. From what set of names do NCNames derive?
1. Any combination of characters allowable in XML
2. Any names conforming to XML Names, minus the colon
3. Any names for elements and attributes within the DTD to which the namespace
refers
4. None of the above.
Level:Difficult
Q.4. Match the following
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 20 of 23
e-DAC
1.
c
1. Inventor of the Web and HTML
d
2. Marries HTML and XML
e
3. First line in an XML document
a
4. Came up with the name XML
b
5. GML and SGML author
2.
a. James Clark
b. Goldfarb
c. Berners-Lee
d. XHTML
e. XML declaration
d 1. Generated if XML is not well formed a. selector
e 2. Value for display property b. points
f 3. Element that contains no content c. DTD
b 4. 72 in an inch d. fatal error
a 5. Indicates element to apply style to e. inline
c 6. Document Type Definition f. empty
element
3.
d 1. Document type declaration a. PCDATA
e 2. Children of a parent element b. CDATA section
f 3. Element declaration c. <
c 4. Built-in XML entity d. <!DOCTYPE…
a 5. Parsed character data e. siblings
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 21 of 23
e-DAC
6. Hides markup from an XML
b
processor a. <!ELEMENT…
4.
C 1. CSS visibility property a. base16
d 2. generic font name b. rgb(0,0,0)
f 3. zero or more instance repetition operator c. hidden
b 4. functional notation d. sans-serif
a 5. Hexadecimal e. or
e 6. Vertical bar (|) f. asterisk (*)
5.
d 1. attribute declaration a. CDATA
e 2. a tokenized attribute type b. NOTATION
a 3. string attribute type c. #FIXED
4. attribute and default value must always
c
be provided d. <!ATTLIST>
b 5. an enumerated attribute type e. IDREF
6.
d
e
b
a
1. unparsed entity
2. conditional section
3. built-in or predefined entity
4. character reference
a. A
b. <
c. %name;
d. Word file
C 5. parameter entity e. <![IGNORE[
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
7.
Page 22 of 23
e-DAC
e 1. urn:wyeast-comm:db a. #FIXED
2. Can share the same name if in different
d
b. prefix
9.
1. instructions for transforming an XML
document a. @*
e 2. formats XML documents b. XSLT
b 3.
a 4.
c 5.
transforms XML documents
location path for all attribute nodes
XSLT element
c. <xsl:text>
d. template
e. XSLFO
D
f
elements
3. For declaring a namespace c. URL
c 4. http://wyeast.net/tack d. attribute
b 5. db: e. URN
a 6. Used to declare a default in a DTD f. xmlns
8.
d 1. XML Schema predecessor a. simple type
c 2. part of an annotation b. decimal
e 3. immediate child of <schema> c. <appinfo>
b 4. a built-in datatype d. DTD
a 5. no attributes, other elements as content e. global
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
10.
Page 23 of 23
e-DAC
c 1. Marriage of XML and HTML a. whitespace
e 2. Contains deprecated elements and attributes b. XHTML
namespace
3. All XHTML elements and attributes must be
d
in this form c. XHTML
a 4. Avoid in attribute values d. lowercase
b 5. http://www.w3.org/1999/xhtml e. transitional
DTD
Q.4. Answers the following questions: (3 Mark each)
1) Describe the role that XSL can play when dynamically generating HTML pages from
a relational database.
2) Give a few examples of types of applications that can benefit from using XML.
3) What is DOM and how does it relate to XML?
4) What is SOAP and how does it relate to XML?
5) Can you walk us through the steps necessary to parse XML documents?
6) Give some examples of XML DTDs or schemas that you have worked with.
7) Using XSLT, how would you extract a specific attribute from an element in an XML
document?
8) When constructing an XML DTD, how do you create an external entity reference in
an attribute value?
9) How would you build a search engine for large volumes of XML data?
10) Describe the differences between XML and HTML.
ACTS, Pune
HTML & Java Script Page 1
HTML Question Bank
1. Is .htm and .html the same?
1. No
2. Yes
2. What is the difference between XML and HTML?
1. HTML is used for exchanging data, XML is not.
2. XML is used for exchanging data, HTML is not.
3. HTML can have user defined tags, XML cannot
4. Both b and c above
3. Which tags are most commonly used by search engines?
1. Heading
2. Title
3. Paragrah
4. All of above
4. What is the <br> tag for?
1. Space
2. Paragraph break
3. Line break
4. Word break
5. What is the attribute for <image> tag?
1. pt
2. url
3. path
4. src
6. Can a data cell contain images?
1. Yes
2. No
7. Each list item in an ordered or unordered list has which tag?
1. list tag
2. ls tag
3. li tag
4. ol tag
ACTS, Pune
HTML & Java Script Page 2
8. Which of the following tags below are used for a multi-line text input control?
1. textml tag
2. text tag
3. textarea tag
4. Both b and c above
9. <meta> tag cannot be defined in the <head> tag.
1. False
2. True
10. Which of the following attributes below are used for a font name?
1. fontname
2. fn
3. font
4. face
11. Is width=”100” and width=”100%” the same?
1. No
2. Yes
12. What are <div> tags used for?
1. To replace paragraphs. i.e. p tags
2. To logically divide the paragraphs
3. To logically divide the document
4. To provide space between tables
13. What is cell padding?
1. Used to separate cell walls from their contents.
2. Used to set space between cells
3. Both a and b above
4. Used to provide width to a cell
14. Can I play audios in HTML?
1. No
2. Yes
15. What attribute is used to specify number of rows?
1. Rownum
2. Rownumb
3. rn
4. Rowspan
ACTS, Pune
HTML & Java Script Page 3
16. What are meta tags used for?
1. To store information usually relevant to browsers and search engines.
2. To only store information usually relevant to browsers
3. To only store information about search engines.
4. To store information about external links
17. How can we resize the image?
1. Using resize attribute
2. Using height and width
3. Using size attribute
4. Using rs attribute
18. For Frames in HTML, how do you specify the rest of the screen?
1. Using &
2. Using $
3. Using *
4. Using #
19. bgcolor is an attribute of body tag
1. True
2. False
ACTS, Pune
HTML & Java Script Page 4
Java Script Question Bank
1. What language defines the behavior of a web page?
1. HTML
2. CSS
3. XML
4. Java Script
2. Which of the following is the tainted property of a window object in Java
Script?
1. Pathname
2. Protocol
3. Defaultstatus
4. Host
3. How to append a value to an array of Java Script?
1. arr[arr.length] = value
2. arr[arr.length+1] = new Arrays()
3. arr[arr.length-1] = value
4. arr[arr.length*1] = value
4. Why so Java and Java Script have similar name?
5. Java Script is a stripped-down version of Java
6. The syntax of Java is loosely based on Java syntax
7. They both support Object Oriented Programming
8. None of the above
5. Which machine actually executes the Java Script?
1. The web server
2. The machine which is running a web browser
3. Java Script engine
4. Both A and C
6. Is it possible to declare a variable in Java Script along its type?
1. Yes
2. No
7. Which of the following are capable of Java Script functions?
1. Returning multiple values
2. Accepting parameters and returning values
3. Accepting parameters
4. all of the above
ACTS, Pune
HTML & Java Script Page 5
8. How does Java Script store dates in objects of Date type?
1. The number of days since January 1st, 1900
2. The number of seconds since January 1st, 1970
3. The number of milliseconds since January 1st, 1970
4. The number of picoseconds since January 1st, 1970
9. Which attribute is used to hold the Java Script version?
1. SCRIPT
2. VERSION
3. LANGUAGE
4. VER
10. Which of the following is correct to write “Hello World” on the web page?
1. System.out.println(“Hello World”)
2. print(“Hello World”)
3. document.write(“Hello World”)
4. response.write(“Hello World”)
11. Which of the following syntax is correct to refer an external script called
“formValidation.js”?
1. < script href = “formValidation.js”>
2. < script source = “formValidation.js”>
3. < script name = “formValidation.js”>
4. < script src = “formValidation.js”>
12. What type of image maps could be used with Java Script?
1. Client-side image maps
2. Server-side image maps
3. Both A and B
4. Localhost image maps
13. Which of the following is the correct way for writing Java Script array?
1. var salaries = new Array( 1:39438, 2:39839 3:83729)
2. var salaries = new (Array:1=39438, Array:2=39839, Array:3=83729)
3. var salaries = new Array(39438,39839,83729)
4. var salaries = new Array() values=39438,39839,83729
14. What is the purpose of <noscript> tag in Java Script?
1. Prevents scripts on the page from executing.
2. Enclose text to be displayed by non-JavaScript browsers
3. Suppresses the result to be displayed on the web page
4. None of the above
ACTS, Pune
HTML & Java Script Page 6
15. Java Script entities start with ____________ and end with ______________
1. Semicolon, colon
2. Semicolon, Ampersand
3. Ampersand, colon
4. Ampersand, semicolon
16. Which of the following is a server-side Java Script object?
1. Function
2. File
3. FileUpload
4. Date
17. Which of the following is a client-side Java Script object?
1. File
2. Function
3. FileUpload
4. Time
18. Which of the following method is used to evaluate a string of Java Script code
in the context of the
specified object?
1. Eval
2. ParseDoule
3. ParseObject
4. Efloat
19. What is the event that fires when the form elements : <button>.<textarea> loses
the focus?
1. Onclick
2. Ondblclick
3. Onfocus
4. Onblur
20. Which of the following is used to capture all click events in a window?
1. window.captureEvents(Event.CLICK);
2. window.routeEvents(Event.CLICK );
3. window.handleEvents (Event.CLICK);
4. window.raiseEvents(Event.CLICK );
21. Javascript is an object oriented language?
1. False
2. True
ACTS, Pune
HTML & Java Script Page 7
22. C-style block-level scoping is not supported in Java script
1. False
2. True
23. To insert a JavaScript into an HTML page, which tag is used?
1. < script=’java’>
2. < javascript>
3. < script>
4. < js>
24. If we don’t want the script to write page content, under which HTML tag should
the JS tag be placeD?
1. < body>
2. < head>
3. Any of a and b above
4. Both b and c above
25. Which of the following statements are true for Java script?
1. JavaScript is case sensitive
2. JavaScript statements can be grouped together in blocks
3. semicolon at the end of statement is mandatory
4. Both a and b above
26. Which of the following statements are false for Java script?
1. Variable names are not case sensitive
2. Variable names must begin with a letter or the underscore character
3. Var is used to declare a variable
4. Both b and c above
27. Which of the below is used in Java script to insert special characters?
1. &
2. \
3. -
4. %
28. JavaScript ignores extra spaces
1. True
2. False
ACTS, Pune
HTML & Java Script Page 8
29. Which of the ways below is incorrect of instantiating a date?
1. new Date(dateString)
2. new Date()
3. new Date(seconds)
4. new Date(year, month, day, hours, minutes, seconds, milliseconds)
30. Which of the following statements are false for Java script?
1. JavaScript can react to events
2. JavaScript can read and write HTML elements
3. JavaScript cannot be used to create cookies
4. Both b and c above
31. What is negative infinity in Java script?
1. Any of below
2. number in JavaScript, derived by dividing number by a negative number.
3. number in JavaScript, derived by dividing number by zero.
4. number in JavaScript, derived by dividing negative number by zero
32. ___________ JavaScript is also called client-side JavaScript.
1. Microsoft
2. Navigator
3. LiveWire
4. Native
33. Java script can be used for Storing the form's contents to a database file on
the server
1. False
2. True
34. Which of the following is not a valid JavaScript variable name?
1. 2java
2. _java_and_ java _names
3. javaandjava
4. None of the above
35. Which is the correct way to write a JavaScript array?
1. var txt = new Array(1:"arr",2:"kim",3:"jim")
2. var txt = new Array:1=(" arr ")2=("kim")3=("jim")
3. var txt = new Array("arr ","kim","jim")
4. var txt = new Array=" arr ","kim","jim"
ACTS, Pune
HTML & Java Script Page 9
36. File is server-side JavaScript object
1. True
2. False
37. What java wrapper type is created when a JavaScript object is sent to Java?
1. ScriptObject
2. JavaObject
3. Jobject
4. JSObject
38. Which attribute needs to be changed to make elements invisible?
1. visibilty
2. visible
3. invisibility
4. invisible
39. Java Script supports all boolean operators
1. True
2. False
40. What is the alternate name for Java script?
1. LimeScript
2. Both a and d
3. ECMScript
4. ECMAScript
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
1
Contents
JAVA
Script.............................................................................
..............................................................................1
J
Quary .............................................................................
...................................................................................
.9
Node
JS ................................................................................
..............................................................................16
Angular JS
2..................................................................................
......................................................................18
Extra
MCQ................................................................................
..........................................................................30
JAVA Script
Q1. Which of the following is correct about JavaScript?
a. JavaScript is a lightweight, interpreted programming language.
b. JavaScript has object-oriented capabilities that allows you to build
interactivity into otherwise
static HTML pages.
c. The general-purpose core of the language has been embedded in Netscape, Internet
Explorer,
and other web browsers.
d. All of the above.
Q2. Which of the following is correct about features of JavaScript?
a. JavaScript is a lightweight, interpreted programming language.
b.JavaScript is designed for creating network-centric applications.
c.JavaScript is complementary to and integrated with Java.
d.All of the above.
Q3. Which of the following is correct about features of JavaScript?
a. JavaScript is is complementary to and integrated with HTML.
b. JavaScript is open and cross-platform.
c. Both of the above.
d. All of the above.
Q4. Which of the following is an advantage of using JavaScript?
a. Less server interaction b. Immediate feedback to the visitors
b. Increased interactivity d. All of the above.
Q5. Which of the following is a disadvantage of using JavaScript?
a. Client-side JavaScript does not allow the reading or writing of files.
b. JavaScript can not be used for Networking applications because there is no such
support
available.
c. JavaScript doesn't have any multithreading or multiprocess capabilities.
d. All of the above.
Q6. Is JavaScript a case-sensitive language?
a. true b. false
Q7. Which of the following is true about variable naming conventions in JavaScript?
a. You should not use any of the JavaScript reserved keyword as variable name.
b. JavaScript variable names should not start with a numeral 0 − 9.
c. Both of the above.
d. None of the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
2
Q8. Which of the following is true about variable naming conventions in JavaScript?
a. JavaScript variable names must begin with a letter or the underscore character.
b. JavaScript variable names are case sensitive.
c. Both of the above.
d. None of the above.
Q9. Which of the following is true about type of operator in JavaScript?
a. The type of is a unary operator that is placed before its single operand, which
can be of any type.
b. Its value is a string indicating the data type of the operand.
c. Both of the above.
d. None of the above.
Q10. Can you access Cookie using java script?
a. true b. false
Q11. Which of the following is true about cookie handling in JavaScript?
a. JavaScript can manipulate cookies using the cookie property of the Document
object.
b. JavaScript can read, create, modify, and delete the cookie or cookies that apply
to the current
web page.
C. Both of the above
d. None of the above.
Q12. Which of the following is the correct syntax to create a cookie using
JavaScript?
a. document.cookie = 'key1 = value1; key2 = value2; expires = date';
b. browser.cookie = 'key1 = value1; key2 = value2; expires = date';
c. window.cookie = 'key1 = value1; key2 = value2; expires = date';
d. navigator.cookie = 'key1 = value1; key2 = value2; expires = date';
Q13. Which of the following is the correct syntax to redirect a url using
JavaScript?
a. document.location='http://www.newlocation.com';
b. browser.location='http://www.newlocation.com';
c. navigator.location='http://www.newlocation.com';
d. window.location='http://www.newlocation.com';
Q14. Which of the following is the correct syntax to print a page using JavaScript?
a. window.print; b. browser.print; c. navigator.print; d. document.print;
Q15. Which of the following is a valid type of function java script supports?
a. named function b. anonymous function c. Both d.All of the above
Q16. Can you assign a anonymous function to a variable?
a. true b. false
Q17. Can you pass a anonymous function as an argument to another function?
a. true b. false d. None of the
Q18. How can you get the type of arguments passed to a function?
a. using type of operator b. using get Type function
c. Both of the above d. None of the above.
Q19. How can you get the total number of arguments passed to a function?
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
3
a. Using args.length property b. Using arguments.length property
c. Both of the above. d. None of the above.
Q20. Which of the following type of variable is visible everywhere in your Java
Script code?
a. global variable b. local variable c. Both of the above. d. None of the above.
Q21. Which of the following type of variable is visible only within a function
where it is defined?
a. global variable b. local variable c. Both of the above d. None of the above.
Q22. Which of the following type of variable takes precedence over other if names
are same?
a. global variable b. local variable c. Both of the above d. None of the above.
Q23. Which of the following is correct about call backs?
a. A call back is a plain JavaScript function passed to some method as an argument
or option.
b. Some call backs are just events, called to give the user a chance to react when
a certain state is
triggered.
c. Both of the above.
d. None of the above.
Q24. Which built-in method returns the character at the specified index?
a. characterAt b. getCharAt c. charAt d. None of the above.
Q25. Which built-in method combines the text of two strings and returns a new
string?
a. append b. concat c. attach d. None of the above.
Q26. Which built-in method calls a function for each element in the array?
a. while b. loop c. forEach d. None of the above.
Q27. Which built-in method returns the index within the calling String object of
the first occurrence
of the specified value?
a. getIndex b. location c. indexOf d. None of the above.
Q28. Which built-in method returns the length of the string?
a. length b. size c. index d. None of the above.
Q29. Which built-in method removes the last element from an array and returns that
element?
a. last b. get c. Pop d. None of the above.
Q30. Which built-in method adds one or more elements to the end of an array and
returns the new
length of the array?
a. last b. put c. push d. None of the above.
Q31. Which built-in method reverses the order of the elements of an array?
a. changeOrderorder b. reverse c. sortorder d. None of the above.
Q32. Which built-in method sorts the elements of an array?
a. changeOrderorder b. order c. sort d. None of the above.
Q33. Which built-in method returns the characters in a string beginning at the
specified location?
a. substr b. getSubstring c. slice d. None of the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
4
Q34. Which built-in method returns the calling string value converted to lower
case?
a. toLowerCase b. toLower c. changeCasecase d. None of the above.
Q35. Which built-in method returns the calling string value converted to upper
case?
a. toUpperCase b. toUpper c. changeCasecase d. None of the above.
Q36. Which built-in method returns the string representation of the number's value?
a. toValue b. toNumber c. toString d. None of the above.
Q37. All user-defined objects and built-in objects are descendants of an object
called Object?
a. true b. false
Q38. Which of the following code creates an object?
a. var book = Object; b. var book = new Object;
c. var book = new OBJECT; d. var book = new Book;
Q39. Which of the following function of Number object forces a number to display in
exponential
notation?
a. toExponential b. toFixed c. toPrecision d. toLocaleString
Q40.Which of the following function of Number object formats a number with a
specific number of
digits to the right of the decimal?
a. toExponential b. toFixed c. toPrecision d. toLocaleString
Q41. Which of the following function of Number object returns a string value
version of the current
number in a format that may vary according to a browser's locale settings.?
a. toExponential b. toFixed c. toLocaleString d. toString
Q42. Which of the following function of Number object defines how many total digits
to display of a
number?
a. toExponential b. toFixed c. toLocaleString d. toPrecision
Q43. Which of the following function of Number object returns a string value
version of the current
a. toString b. toFixed c. toLocaleString d. toPrecision
Q44. Which of the following function of Number object returns the number's value?
a. toString b. valueOf c. toLocaleString d. toPrecision
Q45. Which of the following function of Boolean object returns a string containing
the source of the
Boolean object?
a. toSource b. valueOf c. toString d. None of the above.
Q46. Which of the following function of Boolean object returns the primitive value
of the Boolean
object?
a. toSource b. valueOf c. toString d. None of the above.
Q47. Which of the following function of Boolean object returns a string of either
'true' or 'false'
depending upon the value of the object?
a. toSource b. valueOf c. toString d. None of the above.
Q48. Which of the following function of String object returns the character at the
specified index?
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
5
a. charAt b. charCodeAt c. concat d. indexOf
Q49. Which of the following function of String object returns a number indicating
the Unicode value
of the character at the given index?
a. charAt b. charCodeAt c. concat d. indexOf
Q50. Which of the following function of String object combines the text of two
strings and returns a
new string?
a. add b. merge c. concat d. append
Q51. Which of the following function of String object returns the index within the
calling String object
of the first occurrence of the specified value?
a. substr b. search c.lastIndexOf d. indexOf
Q52. Which of the following function of String object returns the index within the
calling String object
of the last occurrence of the specified value?
a. lastIndexOf b. search c. substr d. indexOf
Q53. Which of the following function of String object returns a number indicating
whether a
reference string comes before or after or is the same as the given string in sort
order?
a. localeCompare b. search c. substr d. concat
Q54. Which of the following function of String object is used to match a regular
expression against a
string?
a. concat b. match c. search d. replace
Q55. Which of the following function of String object is used to find a match
between a regular
expression and a string, and to replace the matched substring with a new substring?
a. concat b. match c. replace d. search
Q56. Which of the following function of String object executes the search for a
match between a
regular expression and a specified string?
a. concat b. match c. replace d. search
Q57. Which of the followingfunction of String object extracts a section of a string
and returns a new
string?
a. slice b. split c. replace d. search
Q58.Which of the following function of String object splits a String object into an
array of strings by
separating the string into substrings?
a. slice b. split c. replace d. search
Q59. Which of the following function of String object returns the characters in a
string beginning at
the specified location through the specified number of characters?
a. slice b. split c. substr d. search
Q60. Which of the following function of String obje string between two indexes into
the string?
a. slice b. split c. substr d. substring
Q61. Which of the following function of String object returns the calling string
value converted to
lower case while respecting the current locale?
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
6
a. toLocaleLowerCase b. toLowerCase c. toString d. substring
Q62. Which of the following function of String object returns the calling string
value converted to
lower case?
a. toLocaleLowerCase b. toLowerCase c. toString d. substring
Q63.Which of the following function of String object returns the calling string
value converted to
upper case while respecting the current locale?
a. toLocaleUpperCase b. toUpperCase c. toString d. substring
Q64. Which of the following function of String object returns the calling string
value converted to
upper case?
a. toLocaleUpperCase b. toUpperCase c. toString d. substring
Q65. Which of the following function of String object returns a string representing
the specified
object?
a. toLocaleUpperCase b. toUpperCase c. toString d. substring
Q66. Which of the following function of String object returns the primitive value
of the specified
object.
a. toLocaleUpperCase b. toUpperCase c. toString d. valueOf
Q67. Which of the following function of String object creates an HTML anchor that
is used as a
hypertext target?
a. anchor b. link c. blink d. big
Q68. Which of the following function of String object creates a string to be
displayed in a big font as if
it were in a <big> tag?
a. anchor b. big c. blink d. italics
Q69. Which of the following function of String object creates a string to blink as
if it were in a <blink>
tag?
a. anchor b. big c. blink d. italics
Q70. Which of the following function of String object creates a string to be
displayed as bold as if it
were in a <b> tag?
a. anchor b. big c. blink d. bold
Q71. Which of the following function of String object causes a string to be
displayed in fixed-pitch
font as if it were in a <tt> tag?
a. fixed b. big c. blink d. bold
Q72. Which of the following function of String object causes a string to be
displayed in the specified
color as if it were in a <font color='color'> tag?
a. fixed b. fontcolor c. blink d. bold
Q73. Which of the following function of String object causes a string to be
displayed in the specified
size as if it were in a <font size = 'size'> tag?
a. fixed b. fontcolor c. fontsize d. bold
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
7
Q74. Which of the following function of String object causes a string to be italic,
as if it were in an <i>
tag?
a. fixed b. fontcolor c. fontsize d. italics
Q75. Which of the following function of String object creates an HTML hypertext
link that requests
another URL?
a. link b. sub c. sup d. small
Q76. Which of the following function of String object causes a string to be
displayed in a small font,
as if it were in a <small> tag?
a. link b. small c. sup d. sub
Q77. Which of the following function of String object causes a string to be
displayed as struck-out
text, as if it were in a <strike> tag?
a. sup b. small c. strike d. sub
Q78. Which of the following function of String object causes a string to be
displayed as a subscript, as
if it were in a <sub> tag?
a. sup b. small c. strike d. sub
Q79.Which of the following function of String object causes a string to be
displayed as a superscript,
as if it were in a <sup> tag?
a. sup b. small c. strike d. sub
Q80. Which of the following function of Array object returns a new array comprised
of this array
joined with other arrays and/or values?
a. concat b. pop c. push d. some
Q81. Which of the following function of Array object returns true if every element
in this array
satisfies the provided testing function?
a. concat b. every c. push d. some
Q82. Which of the following function of Array object creates a new array with all
of the elements of
this array for which the provided filtering function returns true?
a. concat b. every c. filter d. some
Q83. Which of the following function of Array object calls a function for each
element in the array?
a. concat b. every c. filter d. forEach
Q84. Which of the following function of Array object returns the first least index
of an element within
the array equal to the specified value, or -1 if none is found?
a. indexOf b. join c. lastIndexOf d. map
Q85. Which of the following function of Array object joins all elements of an array
into a string?
a. concat b. join c. pop d. map
Q86. Which of the following function of Array object returns the last greatest
index of an element
within the array equal to the specified value, or -1 if none is found?
a. indexOf b. join c. lastIndexOf d. map
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
8
Q87.Which of the following function of Array object creates a new array with the
results of calling a
provided function on every element in this array?
a. push b. join c. pop d. map
Q88. Which of the following function of Array object removes the last element from
an array and
returns that element?
a. pop b. push c. join d. map
Q89. Which of the following function of Array object adds one or more elements to
the end of an
array and returns the new length of the array?
a. pop b. push c. joind . map
Q90. Which of the following function of Array object applies a function
simultaneously against two
values of the array fromleft − to − right as to reduce it to a single value?
a. pop b. push c. reduce d. reduceRight
Q91. Which of the following function of Array object applies a function
simultaneously against two
values of the array fromright − to − left as to reduce it to a single value?
a. pop b. push c. reduce d. reduceRight
Q92. Which of the following function of Array object reverses the order of the
elements of an array?
a. reverse b. push c. reduce d. reduceRight
Q93. Which of the following function of Array object removes the first element from
an array and
returns that element?
a. reverse b. shift c. slice d. some
Q94. Which of the following function of Array object extracts a section of an array
and returns a new
array?
a. reverse b. shift c. slice d. some
Q95. Which of the following function of Array object returns true if at least one
element in this array
satisfies the provided testing function?
a. reverse b. shift c. slice d. some
Q96. Which of the following function of Array object represents the source code of
an object?
a. toSource b. splice c. toString d. unshift
Q97. Which of the following function of Array object sorts the elements of an
array?
a. toSource b. sort c. toString d. unshift
Q98. Which of the following function of Array object adds and/or removes elements
from an array?
a. toSource b. sort c. splice d. unshift
Q99. Which of the following function of Array object returns a string representing
the array and its
elements?
a. toSource b. sort c. splice d. toString
Q100. Which of the following function of Array object adds one or more elements to
the front of an
array and returns the new length of the array?
a. unshift b. sort c. splice d. toString
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
9
Q101. Which of the following is correct about features of JavaScript?
a. JavaScript is complementary to and integrated with HTML
b. JavaScript is open and cross-platform.
c. Both of the above.
d. All of the above
Q102. Can you pass a anonymous function as an argument to another function?
a. true b. False
Q103. Which of the following is correct about call backs?
a. A call back is a plain JavaScript function passed to some method as an argument
or option.
b. Some call backs are just events, called to give the user a chance to react when
a certain state is
triggered.
c. Both of the above.
d. None of the above.
Q104. Which of the following code creates an object?
a. var book = Object(); b. var book = new Object();
c. var book = new OBJECT(); d. var book = new Book();
Q105. Which of the following function of Number object returns a string value
version of the current
number?
a. toString() b. toFixed() c. toLocaleString() d. toPrecision()
Q106. Which of the following function of String object is used to match a regular
expression against a
string?
a. concat() b. match() c. search() d. replace()
Q107. Which of the following function of String object returns a string
representing the specified
object?
a. toLocaleUpperCase() b. toUpperCase() c. toString() d. substring()
Q108. Which of the following function of String object causes a string to be
displayed in the specified
size as if it were in a <font size = 'size'> tag?
a. fixed() b. fontcolor() c. fontsize() d. bold()
Q109. Which of the following function of Array object calls a function for each
element in the array?
a. concat() b. every() c. filter() d. forEach()
Q110. Which of the following function of Array object adds and/or removes elements
from an array?
a. toSource() b. sort() c. splice() d. unshift()
J Quary
Q1. Which of the following is correct about jQuery selector?
a. A jQuery Selector is a function which makes use of expressions to find out
matching elements
from a DOMbased on the given criteria.
b. jQuery selectors are used to select one or more HTML elements using jQuery.
c. jQuery selectors start with the dollar sign and parentheses - $() d. All of the
above.
Q2. Which of the following jQuery selector selects elements with the given element
tag-name?
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
10
a. $('tag-name') b. $('#tag-name') c. $('.tag-name') d. None of the above.
Q3. Which of the following jQuery selector selects element with the given element
id some-id?
a. $('some-id') b. $('#some-id') c. $('.some-id') d. None of the above.
Q4. Which of the following jQuery selector select elements whose css class is
someclass?
a. $('some-class') b. $('#some-class') c. $('.some-class') d. None of the above.
Q5. Which of the following jQuery selector selects all elements available in a DOM?
a. $('*') b. $('?') c. $('#') d. None of the above.
Q6. Which of the following jQuery method gets attributes of an element?
a. attr b. getAttr c. getAttributes d. None of the above.
Q7. Which of the following jQuery method sets attributes of an element?
a. attrname, value b. setAttrname, value
c. setAttributesname, value d. None of the above.
Q8. Which of the following jQuery method apply a style on an element?
a. addStyleclasses b. addClassclasses c. addCSSClassclasses d. None of the above.
Q9. Which of the following jQuery method removes an attribute from each of the
matched
elements?
a. deleteAttrname b. removeAttrname
c. removeAttributename d. None of the above.
Q10. Which of the following jQuery method returns true if the specified class is
present on at least
one of the set of matched elements?
a. hasCSSClassclass b. hasStyleClassclass c. hasClassclass d. None of the above.
Q11. Which of the following jQuery method remove all or the specified classes from
the set of
matched elements?
a. removeClassclass b. removeStyleClassclass
c. removeCSSClassclass d. None of the above.
Q12.Which of the following jQuery method adds the specified class if it is not
present, remove the
specified class if it is present?
a. toggleStyleClassclass b. toggleClassclass c. toggleCSSClassclass d. None of the
above.
Q13. Which of the following jQuery method gets the html contents innerHTML of the
first matched
element?
a. html b. getHtml c . getInnerHtml d. None of the above.
Q14. Which of the following jQuery method sets the html contents of an element?
a. htmlval b. setHtmlval c. setInnerHtmlval d. None of the above.
Q15. Which of the following jQuery method get the text contents of an element?
a. text b. getText c. getContent d. None of the above.
Q16. Which of the following jQuery method sets the text of an element?
a. textval b. setTextval c. setContentval d. None of the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
11
Q17. Which of the following jQuery method get the input value of an element?
a. getContent b. val c. getValue d. None of the above.
Q18. Which of the following jQuery method set the value of an element?
a. setContentval b. valval c. setValueval d. None of the above.
Q19. Which of the following jQuery method filter out elements from a set of matched
elements?
a. filterselector b. setFilterselector c. putFilterselector d. None of the above.
Q20. Which of the following jQuery method reduce the set of matched elements to a
single element?
a. isEqualindex b. eqindex c. checkEqualselector d. None of the above.
Q21. Which of the following jQuery method checks the current selection against an
expression?
a. getIsselector b. isselector c. checkIsselector d. None of the above.
Q22. Which of the following jQuery method removes elements matching the specified
selector from
the set of matched elements?
a. getNotEqualsselector b. isNotEqualsselector c. notselector d. None of the above.
Q23. Which of the following jQuery method selects a subset of the matchedelements?
a. subsetselector b. getSubsetselector c. sliceselector d. None of the above.
Q24. Which of the following jQuery method adds more elements, matched by the given
selector, to
the set of matched elements?
a. addselector b. addElementselector c. appendselector d. None of the above.
Q25. Which of the following jQuery method adds the previous selection to the
current selection?
a. addselector b. andSelf c. appendselector d. None of the above.
Q26. Which of the following jQuery method gets a set of elements containing all of
the unique
immediate children of each of the matched set of elements?
a. getChildselector b. children[selector]
c. getChildrenselector d. None of the above.
Q27. Which of the following jQuery method gets a set of elements containing the
closest parent
element that matches the specified selector, the starting element included?
a. getNearestselector b. getClosest[selector]
c. closestselector d. None of the above.
Q28. Which of the following jQuery method finds all the child nodes inside the
matched elements
includingtextnodes, or the content document, if the element is an iframe?
a. getChildrenselector b. getContents[selector]
c. contentsselector d. None of the above.
Q29. Which of the following jQuery method reverts the most recent
'destructive'operation, changing
the set of matched elements to its previous state?
a. revert b. end c. undo d. None of the above.
Q30. Which of the following jQuery method searches for descendent elements that
match the
specified selectors?
a. locateselector b. Findselector c. searchselector d. None of the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
12
Q31. Which of the following jQuery method gets a set of elements containing the
unique next siblings
of each of the given set of elements?
a. locateNextselector b. getNextselector c. nextselector d. None of the above.
Q32. Which of the following jQuery method finds all sibling elements after the
current element?
a. locateNextAllselector b. getNextAllselector c. nextAllselector d. None of the
above.
Q33. Which of the following jQuery method returns a jQuery collection with the
positioned parent of
the first matched element?
a. offsetParentselector b. offsetselector
c. parentselector d. None of the above.
Q34. Which of the following jQuery method gets the direct parent of an element?
a. offsetParentselecto r b. offsetselector c. parentselector d. None of the above.
Q35. Which of the following jQuery method gets a set of elements containing the
unique ancestors of
the matched set of elements?
a. offsetParentselector b. offsetselector c. parentsselector d. None of the above.
Q36. Which of the following jQuery method gets a set of elements containing the
unique previous
siblings of each of the matched set of elements?
a. parentsselector b. prevselector c. siblingsselector d. None of the above.
Q37. Which of the following jQuery method finds all sibling elements in front of
the current element?
a. parentsselector b. prevAllselector c. siblingsselector d. None of the above.
Q38. Which of the following jQuery method gets a set of elements containing all of
the unique
siblings of each of the matched set of elements?
a. parentsselector b. prevAllselector c. siblingsselector d. None of the above.
Q39. Which of the following jQuery method gets the style property of an element?
a. getClassname b. getStylename c. cssname d. None of the above.
Q40. Which of the following jQuery method sets the style property of an element?
a. setClassname, value b. setStylename, value
c. cssname, value d. None of the above.
Q41. Which of the following jQuery method sets the height property of an element?
a. setCSSHeightvalue b. setHeightvalue c. heightvalue d. None of the above.
Q42. Which of the following jQuery method gets the height property of an element?
a. getCSSHeight b. getHeight c. height d. None of the above.
Q43. Which of the following jQuery method sets the width property of an element?
a. setCSSWidthvalue b. setWidthvalue c. widthvalue d. None of the above.
Q44. Which of the following jQuery method gets the width property of an element?
a. getCSSWidth b. getWidth c. width d. None of the above.
Q45. Which of the following jQuery method gets the inner height excludingtheborder
of an element?
a. getCSSHeight b. innerHeight c. getInnerHeight d. None of the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
13
Q46. Which of the following jQuery method gets the inner width excludingtheborder
of an element?
a. getCSSWidth b. innerWidth c. getInnerWidth d. None of the above.
Q47. Which of the following jQuery method gets the current offset of the first
matched element, in
pixels, relative to the document?
a. offset b. offsetParent c. position d. None of the above.
Q48. Which of the following jQuery method returns a jQuery collection with the
positioned parent of
the first matched element?
a. offset b. offsetParent c. position d. None of the above.
Q49. Which of the following jQuery method returns the top and left position of an
element relative
to its offset parent?
a. offset b. offsetParent c. position d. None of the above.
Q50. Which of the following jQuery method returns the outer height including the
border of an
element?
a. getCSSHeight b. getHeight c. outerHeight[margin] d. None of the above.
Q51.How can you get the type of arguments passed to a function?
a. using type of operator b. using get Type function
c. Both of the above. d. None of the above.
Q52. Which built-in method combines the text of two strings and returns a new
string?
a. append() b. concat() c. attach() d. None of the above.
Q53. Which of the following jQuery selector select elements whose css class is
some-class?
a. $('some-class') b. $('#some-class') c. $('.some-class') d. None of the above.
Q54. Which of the following jQuery method gets the html contents (innerHTML) of the
first matched element?
a. html( ) b. getHtml( ) c.getInnerHtml( ) d. None of the above.
Q55. Which of the following jQuery method adds more elements, matched by the given
selector, to the set of
matched elements?
a. add( selector ) b. addElement( selector )
c. append(selector) d. None of the above.
Q56. Which of the following jQuery method reverts the most recent 'destructive'
operation, changing
the set of matched elements to its previous state?
a. revert( ) b. end( ) c. undo( ) d. None of the above.
Q57. Which of the following jQuery method gets the width property of an element?
a. getCSSWidth( ) b. getWidth( ) c. width( ) d. None of the above.
Q58. Which of the following jQuery method gets the current offset of the first
matched element, in
pixels, relative to thea. offset( ) b. offsetParent( ) c. position( ) d. None of
the above.
Q59. Which of the following jQuery method stops the bubbling of an event to parent
elements?
a. preventDefault( ) b. stopImmediatePropagation( )
c. stopPropagation( ) d. None of the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
14
Q60. Which of the following jQuery method loads a remote page using an HTTP GET
request?
a. jQuery.get( url, [data], [callback], [type] ) b. jQuery.getJSON( url, [data],
[callback] )
c. jQuery.getScript( url, [callback] ) d. jQuery.post( url, [data], [callback],
[type] )
Q61. Which of the following is correct?
a. jQuery is a JavaScript Library b. jQuery is a JSON Library
Q62. jQuery uses CSS selectors to select elements?
a. True b. False
Q63. With jQuery, look at the following selector: $("div"). What does it select?
a. All div elements b. The first div element
Q64. Which sign does jQuery use as a shortcut for jQuery?
a. the % sign b. the ? Sign c. the $ sign
Q65. jQuery a library for client scripting or server scripting?
a. Client scripting b. Server scripting
Q66. Is it possible to use jQuery together with AJAX?
a. No b. Yes
Q67. The jQuery html() method works for both HTML and XML documents
a. True b. False
Q68. What is the correct jQuery code to set the background color of all p elements
to red?
a. $("p").manipulate("background-color","red"); b. $("p").style("background-
color","red");
c. $("p").css("background-color","red"); d. $("p").layout("background-
color","red");
Q69. With jQuery, look at the following selector: $("div.intro"). What does it
select?
a. The first div element with id="intro "b. All div elements with class="intro"
c. The first div element with class="intro" d. All div elements with id="intro"
Q70. Which jQuery method is used to hide selected elements?
a. display(none) b. visible(false) c. hide() d. hidden()
Q71. Which jQuery method is used to set one or more style properties for selected
elements?
a. css() b. style() c. html()
Q72. Which jQuery method is used to perform an asynchronous HTTP request?
a. jQuery.ajaxSetup() b. jQuery.ajax() c. jQuery.ajaxAsync()
Q73. What is the correct jQuery code for making all div elements 100 pixels high?
a. $("div").height="100" b. $("div").height(100) c. $("div").yPos(100)
Q74. Which statement is true?
a. To use jQuery, you can refer to a hosted jQuery library at Google
b. To use jQuery, you must buy the jQuery library at www.jquery.com
c. To use jQuery, you do not have to do anything. Most browsers (Internet Explorer,
Chrome, Firefox and
Opera) haved.
Q75. What scripting language is jQuery written in?
a. VBScript b. C#c. C++ d. JavaScript
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
15
Q76. Which jQuery function is used to prevent code from running, before the
document is finished loading?
a. $(document).ready() b. $(document).load() c. $(body).onload()
Q77. Which jQuery method should be used to deal with name conflicts?
a. noNameConflict() b. nameConflict() c. noConflict() d. conflict()
Q78. Which jQuery method is used to switch between adding/removing one or more
classes (for CSS) from
selected elements?
a. toggleClass() b. switch()c . altClass() d. switchClass()
Q79. Look at the following jQuery selector: $("div#intro .head"). What does it
select?
a. All elements with class="head" inside the div element with id="intro"
b. All div elements with id="intro" or class="head"
c. The first element with id="head" inside any div element with class="intro"
Q80. Is jQuery a W3C standard?
a. No b. Yes
Q81. What will happen by $("#wblogo").html() It will return html from wblogo id
element a. a.
It will set blank html to wblogo id element b. It will return html from wblogo id
element c. It will set blank html to wblogo class element
Q82. With jQuery, look at the following selector: $("div.intro"). What does it
select?
a. The first div element with class="intro" b. All div elements with class="intro"
c. The first div element with id="intro" d. All div elements with id="intro"
Q83. Which jquery .js version file should be deployed to production?
a. jquery-1.x.x.js b. jquery-1.x.x.min.js c. validation.jsd. required.js
Q84. How can you get href value from <a href=\"http://www.xchanging.com\"
id=\"logo\"/>
a. $("#logo").attr("#href") b. $("logo").("href")
c. $("#logo").attr("href") d. $("#logo").href
Q85. What is the correct jQuery code to set the background color of all p elements
to red?
a. $("p").manipulate("background-color","red"); b. $("p").style("background-
color","red");
c. $("p").layout("background-color","red"); d. $("p").css("background-
color","red");
Q86. Which jQuery method is used to switch between adding/removing one or more
classes (for CSS)
from selected elements?
a. switchClass() b. addRemoveClass() c. altClass() d. toggleClass()
Q87. How to read value between span tag with id dd
a. $(“#dd”).text() b. $(“#dd”).txt() c. $(“#dd”).text d. $(“span”).text()
Q88. How to set value “hello world” in div tag
a. $(“div”).text(“hello world”) b. “hello world” c. $(“div”).text =”hello world” d.
none
Q89. How to read data from text box having id “tt”
a. $(“#tt”).val(); b. $(“#tt”).value(); c. $(“#tt”).value; d. $(“#tt”).val;
Q90. How to set attribute title=”link”for anchor tag dynamically in jQuery
a. $(“a”).attr(“title”,”link”) b. $(“a”).val(title=”link”); c. $
(“a”).attr(title=”link”); d. none
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
16
Node JS
Q1. Which of the following is true about Node.JS?
a. Node.js is a JavaScript based framework/platform built on Google Chrome's
JavaScript V8
Engine.
b. Node.JS is used to delevop I/O intensive web applications like video streaming
sites, single page
applications and other web application.
c. Node.js is open source and is completely free to use.
d. All of the above.
Q2.What is Node.JS?
a. Node.js is a web server.
b. Node.js is a JavaScript based framework/platform built on Google Chrome's
JavaScript
V8 Engine.
c. Node.js is a java based framework
d. None of the above.
Q3. All APIs of Node.JS are.
a. Asynchronous b. Synchronous c. Both of the above d. None of the above.
Q4. Why code written in Node.JS is pretty fast although being written in
JavaScript?
a. Node.JS internally converts JavaScript code to Java based code and then execute
the same.
b. Node.JS internally converts JavaScript code to C based code and then execute the
same.
c. Being built on Google Chrome's V8 JavaScript Engine.
d. None of the above.
Q5. How Node based web servers are different from traditional web servers?
a. Node based server process request much faster than traditional server.
b. Node based server uses a single threaded model and can services much larger
number of
requests than traditional server like Apache HTTP Server.
c. There is no much difference between the two.
d. None of the above.
Q6. In which of the following areas, Node.js is perfect to use?
a. I/O bound Applications b. Data Streaming Applications
c. Data Intensive Realtime Applications DIRT d. All of the above.
Q7. In which of the following areas, Node.js is not advised to be used?
a. Single Page Applications b. JSON APIs based Applications
b. CPU intensive applications d. Data Intensive Realtime Applications DIRT
Q8. Which of the following is true about EventEmitter.emit
property?
a. emit property is used to locate an event handler.
b. emit property is used to bind a function with the event.
c. emit property is used to fire an event.
d. None of the above.
Q9. REPL stands for.
a. Research Eval Program Learn b. Read Eval Print Loop
c. Read Earn Point Learnd d. Read Eval Point Loop
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
17
Q10. Which of following command starts a REPL session?
a. $ node b. $ node start c. $ node repl d. $ node console
Q11. What is use of Underscore Variable in REPL session?
a. to get the last command used. b. to get the last result.
c. to store the result. d. None of the above.
Q12. What npm stands for?
a. Node Package Manager b. Node Project Manager
c. New Project Manager d. New Package Manager
Q13. Which of the following command will show version of Node?
a. $ npm –version b. $ node –version
c. $ npm getVersion d. $ node getVersion
Q14. Which of the following command will show version of npm?
a. $ npm –version b. $ node –version
c. $ npm getVersion d. sssss$ node getVersion
Q15. By default, npm installs any dependency in the local mode.
a. true b. false
Q16.By default, npm installs any dependency in the global mode.
a. true b. false
Q17. Which of the following command will show all the modules installed globally?
a. $ npm ls –g b. $ npm ls c. $ node ls –g d. $ node ls
Q18. Which of the following command will show all the modules installed locally.
a. $ npm ls –g b. $ npm ls c. $ node ls –g d. $ node ls
Q19. Which of the following is true about package.json?
a. package.json is present in the root directory of any Node application/module.
b. package.json is used to define the properties of a package.
c. package.json can be used to update dependencies of a Node application.
d. All of the above.
Q20. What is Callback?
a. Callback is an asynchronous equivalent for a function.
b. Call-back is a technique in which a method call back the caller
method.
c. Both of the above.
d. None of the above.
Q21. Node jess is a single threaded application but supports concurrency.
a. true b. false
Q22. Which of the following is true with respect to Node.
a. Every API of Node js are asynchronous.
b. Node being a single thread, and uses async function calls to maintain the
concurrency.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
18
c. Node thread keeps an event loop and whenever any task get completed, it fires
the
corresponding event which signals the event listener function to get executed.
d. All of the above.
Q23. Which of the following provides in-built events.
a. events b. callback c. throw d. handler
Q24. Which of the following is true about EventEmitter.on property?
a. on property is used to fire event.
b. on property is used to bind a function with the event.
c. on property is used to locate an event handler.
d. None of the above.
Angular JS 2
1) Which of the following is correct about Angular 2 Components?
a) AngularJS had a focus of Controllers but Angular 2 has changed the focus to
having components
over controllers.
b) Components help to build the applications into many modules.
c) This helps in better maintaining the application over a period of time.
d) All of the above.
2) Which of the following is correct about TypeScript?
a) Angular 2 is based on TypeScript.
b) This is a superset of JavaScript.
c) TypeScript is maintained by Microsoft.
d) All of the above.
3) Which of the following is correct about Services?
a) Angular 2 Services are a set of code that can be shared by different components
of an
application.
b) Angular 2 Services cannot be used across multiple applications.
c) Angular 2 Services help to build the applications into many modules. d) All of
the above.
4) Which of the following is true?
a) Angular 2 Service is used to break up the application into logical pieces of
code.
b) Angular 2 Module is used to break up the application into logical pieces of
code.
c) Angular 2 Template is used to break up the application into logical pieces of
code. d) None of
the above.
5) Which of the following is true?
a) Angular 2 Service can be used to bring the modules together.
b) Angular 2 Template can be used to bring the modules together.
c) Angular 2 Component can be used to bring the modules together.
d) None of the above.
6) Which of the following is true?
a) Angular 2 Services are used to define the views of an Angular JS application.
b) Angular 2 Templates are used to define the views of an Angular JS application.
c) Angular 2 Components are used to define the views of an Angular JS application.
d) None of
the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
19
7) Which of the following is true?
a) Angular 2 Services can be used to add more data to an Angular JS class.
b) Angular 2 Metadata can be used to add more data to an Angular JS class.
c) Angular 2 Components can be used to add more data to an Angular JS class. d)
None of the
above.
8) Which of the following is true?
a) Angular 2 Modules are used to create components which can be shared across the
entire
application.
b) Angular 2 Metadata is used to create components which can be shared across the
entire
application.
c) Angular 2 Services are used to create components which can be shared across the
entire
application.
d) None of the above.
9) Which of the following is correct about Bootstrap Array in Angular 2 Modules?
a) This is used to tell Angular JS which components need to be loaded so that its
functionality can
be accessed in the application.
b) Once you include the component in the bootstrap array, you need to declare them
so that
they can be used across other components in the Angular JS application.
c) Both of the above.
d) None of the above.
10) Which of the following is correct about Export Array in Angular 2 Modules?
a) This is used to export components, directives, and pipes which can then be used
in other
modules.
b) This is used to export services which can then be used in other services.
c) Both of the above.
d) None of the above.
11) Which of the following is correct about Import Array in Angular 2 Modules?
a) Import array can be used to import the functionality from other Angular JS
modules.
b) Import array can be used to import the templates.
c) Both of the above.
d) None of the above.
12) Which of the following is correct about Angular 2 Directive?
a) A directive is a custom HTML element that is used to extend the power of
HTML.
b) A directive can be used to import the functionality from other Angular JS
modules.
c) Both of the above.
d) None of the above.
13) Which of the following is correct about Angular 2 Error Handling?
a) This is done by including the ReactJS catch library and then using the catch
function.
b) The catch function contains a link to the Error Handler function.
c) Both of the above.
d) None of the above.
14) Which of the following is correct about Angular 2 Routing?
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
20
a) Routing helps in directing users to different pages based on the option they
choose on the
main page.
b) Based on the option they choose, the required Angular Component will be rendered
to the
user.
c) Both of the above.
d) None of the above.
15) Which of the following is correct about CLI?
a) CLI stands for Command Line Interface.
b) CLI can be used to create Angular JS application.
c) It also helps in creating a unit and end-to-end tests for the application
d) All of the above.
16) Which of the following is correct about tsconfig.json?
a) This file is used to give the options about TypeScript used for the Angular JS
project.
b) This file contains information about Angular 2 project.
c) This file contains the system files required for Angular JS application.
d) All of the above.
17) Which of the following is correct about tsconfig.json?
a) The target for the compilation is generally es5 because most browsers can only
understand ES5
typescript.
b) The sourceMap option is used to generate Map files, which are useful when
debugging. Hence,
during development it is good to keep this option as true.
c) The "emitDecoratorMetadata": true and "experimentalDecorators": true is required
for Angular
JS decorators. If not in place, Angular JS application will not compile.
d) All of the above.
18) Which of the following is correct about package.json?
a) This file is used to give the options about TypeScript used for the Angular JS
project.
b) This file contains information about Angular 2 project.
c) This file contains the system files required for Angular JS application.
d) All of the above.
19) Which of the following is correct about package.json?
a) There are two types of dependencies, first is the dependencies and then there
are dev
dependencies.
b) Both of the above.
c) None of the above.
20) Which of the following is correct about systemjs.config.json?
a) This file is used to give the options about TypeScript used for the Angular JS
project.
b) This file contains information about Angular 2 project.
c) This file contains the system files required for Angular JS application.
d) All of the above.
21) Which of the following is correct about systemjs.config.json?
a) 'npm:': 'node_modules/' tells the location in our project where all the npm
modules
are located.
b) The mapping of app: 'app' tells the folder where all our applications files are
loaded.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
21
c) Both of the above.
d) None of the above.
22) Which of the following filter is used to convert input to all lowercase?
a) lowercase b) lower c) Both of the above. d) None of the above.
23) Which of the following is the correct way to apply a filter?
a) Property-value || filter b) Property-value && filter
c) Property-value | filter c) None of the above.
24) Which of the following filter is used to convert input to all uppercase?
a) uppercase b) upper c) Both of the above. d) None of the above.
25) Which of the following filter is used to slice a piece of data from the input
string.
a) slice b) substring c) Both of the above. d) None of the above.
26) Which of the following filter is used to convert an input string to date
format.
a) dateformat b) date c ) Both of the above. d) None of the above.
27) Which of the following filter is used to convert an input string to currency
format.
a) currency b) amount c) Both of the above. d) None of the above.
28) Which of the following filter is used to convert an input string to percentage
format.
a) percentage b) percent c) Both of the above. d) None of the above.
29) Which of the following is correct about lifecycle hook - ngOnChanges.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first
displays the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
30) Which of the following is correct about lifecycle hook - ngOnInit.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first
displays the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
31) Which of the following is correct about lifecycle hook - ngDoCheck.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first displays
the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
32) Which of the following is correct about lifecycle hook - ngAfterContentInit.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first displays
the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
22
d) This is called in response after Angular projects external content into the
component's view.
33) Which of the following is correct about lifecycle hook - ngAfterContentChecked.
a) This is called in response after Angular checks the content projected into the
component.
b) This is called in response after Angular initializes the component's views and
child views.
c) This is called in response after Angular checks the component's views and child
views.
d) This is the cleanup phase just before Angular destroys the directive/component.
34) Which of the following is correct about lifecycle hook - ngAfterViewInit.
a) This is called in response after Angular checks the content projected into the
component.
b) This is called in response after Angular initializes the component's views and
child views.
c) This is called in response after Angular checks the component's views and child
views.
d) This is the cleanup phase just before Angular destroys the directive/component.
35) Which of the following is correct about lifecycle hook - ngAfterViewChecked.
a) This is called in response after Angular checks the content projected into the
component.
b) This is called in response after Angular initializes the component's views and
child views.
c) This is called in response after Angular checks the component's views and child
views.
d) This is the cleanup phase just before Angular destroys the directive/component.
36) Which of the following is correct about lifecycle hook - ngOnDestroy.
a) This is called in response after Angular checks the content projected into the
component.
b) This is called in response after Angular initializes the component's views and
child views.
c) This is called in response after Angular checks the component's views and child
views.
d) This is the cleanup phase just before Angular destroys the directive/component.
37) Which of the following is correct about systemjs.config.json?
a) 'npm:': 'node_modules/' tells the location in our project where all the npm
modules
are located.
b) The mapping of app: 'app' tells the folder where all our applications files are
loaded.
c) Both of the above.
d) None of the above. Explanation
'npm:': 'node_modules/' tells the location in our project where all the npm modules
are located. The
mapping of app: 'app' tells the folder where all our applications files are loaded.
38) Which of the following is correct about Bootstrap Array in Angular 2 Modules?
a) This is used to tell Angular JS which components need to be loaded so that its
functionality can be
accessed in the application.
b) Once you include the component in the bootstrap array, you need to declare them
so that they can
be used across other components in the Angular JS application.
c) Both of the above.
d) None of the above.
Explanation
Angular 2 Bootstrap array is used to tell Angular which components need to be
loaded so that its
functionality can be accessed in the application. Once you include the component in
the
bootstrap array, you need to declare them so that they can be used across other
components in
the Angular application.
39) Which of the following is true?
a) Angular 2 Service is used to break up the application into logical pieces of
code.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
23
b) Angular 2 Module is used to break up the application into logical pieces of
code.
c) Angular 2 Template is used to break up the application into logical pieces of
code.
d) None of the above.
Explanation
Angular 2 Module is used to break up the application into logical pieces of code.
Each piece of code
or module is designed to perform a single task.
40) Which of the following is true?
a) Angular 2 Service can be used to bring the modules together.
b) Angular 2 Template can be used to bring the modules together.
c) Angular 2 Component can be used to bring the modules together.
d) None of the above.
Explanation
Angular 2 Component can be used to bring the modules together.
41) Which of the following is true?
a) Angular 2 Services are used to define the views of an Angular JS application.
b) Angular 2 Templates are used to define the views of an Angular JS application.
c) Angular 2 Components are used to define the views of an Angular JS application.
d) None of the
above.
Explanation
Angular 2 Templates are used to define the views of an Angular JS application.
42) Which of the following is correct about Import Array in Angular 2 Modules?
a) Import array can be used to import the functionality from other Angular JS
modules.
b) Import array can be used to import the templates.
c) Both of the above.
d) None of the above. Explanation
Angular 2 Import array can be used to import the functionality from other Angular
JS modules.
43) Which of the following is correct about lifecycle hook - ngAfterContentInit.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first
displays the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
Explanation ngAfterContentInit method is called in response after Angular projects
external
content into the component's view.
44)Which of the following filter is used to convert input to all uppercase?
a) uppercase b) upper c) Both of the above. d) None of the above.
Explanation uppercase filter is used to convert the input to all uppercase.
45) Which of the following is correct about Angular 2 Error Handling?
a) This is done by including the ReactJS catch library and then using the catch
function.
b) The catch function contains a link to the Error Handler function.
c) Both of the above.
d) None of the above.
Explanation
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
24
Angular 2 applications have the option of error handling. This is done by including
the ReactJS catch
library and then using the catch function. The catch function contains a link to
the Error Handler
function.
46) Which of the following is correct about Angular 2 Components?
a) AngularJS had a focus of Controllers but Angular 2 has changed the focus to
having components
over controllers.
b) Components help to build the applications into many modules.
c) This helps in better maintaining the application over a period of time.
d) All of the above.
47) Which of the following is correct about TypeScript?
a) Angular 2 is based on TypeScript.
b) This is a superset of JavaScript.
c) TypeScript is maintained by Microsoft.
d) All of the above.
48) Which of the following is correct about lifecycle hook - ngAfterViewChecked.
a) This is called in response after Angular checks the content projected into the
component.
b) This is called in response after Angular initializes the component's views and
child views.
c) This is called in response after Angular checks the component's views and child
views.
d) This is the cleanup phase just before Angular destroys the directive/component.
Explanation ngAfterViewChecked method is called in response after Angular checks
the component's
views and child views.
49) Which of the following is correct about tsconfig.json?
a) This file is used to give the options about TypeScript used for the Angular JS
project.
b) This file contains information about Angular 2 project.
c) This file contains the system files required for Angular JS application.
d) All of the above.
Explanation tsconfig.json file is used to give the options about TypeScript used
for the Angular JS
project.
50) Which of the following is correct about lifecycle hook - ngOnChanges.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first
displays the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
Explanation
When the value of a data bound property changes, then ngOnChanges method is called.
51) Which of the following is correct about package.json?
a) This file is used to give the options about TypeScript used for the Angular JS
project.
b) This file contains information about Angular 2 project.
c) This file contains the system files required for Angular JS application. d) All
of the above.
Explanation package.json contains information about Angular 2 project.
52) Which of the following filter is used to convert an input string to currency
format.
a) currency b)amount c) Both of the above. d) None of the above.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
25
Explanation currency filter is used to convert an input string
to currency format.
53) Which of the following is correct about lifecycle hook - ngOnInit.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first
displays the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
Explanation ngOnInit method is called whenever the initialization of the
directive/component after
Angular first displays the data-bound properties happens.
54) Which of the following is correct about CLI?
a) CLI stands for Command Line Interface.
b) CLI can be used to create Angular JS application.
c) It also helps in creating a unit and end-to-end tests for the application.
d) All of the above.
Explanation
Command Line Interface (CLI) can be used to create our Angular JS application. It
also helps in
creating a unit and end-to-end tests for the application.
55) Which of the following is correct about Export Array in Angular 2 modules?
a) This is used to export components, directives, and pipes which can then be used
in other modules.
b) This is used to export services which can then be used in other services.
c) Both of the above.
d) None of the above.
Explanation
Angular 2 Export array is used to export components, directives, and pipes which
can then be used in
other modules.
56) Which of the following is true?
a) Angular 2 Modules are used to create components which can be shared across the
entire
application.
b) Angular 2 Metadata is used to create components which can be shared across the
entire
application.
c) Angular 2 Services are used to create components which can be shared across the
entire
application.
d) None of the above.
Explanation
Angular 2 Services are used to create components which can be shared across the
entire application.
57) Which of the following is correct about Angular 2 Directive?
a) A directive is a custom HTML element that is used to extend the power of
HTML.
b) A directive can be used to import the functionality from other Angular JS
modules.
c) Both of the above.
d) None of the above.
Explanation
A directive is a custom HTML element that is used to extend the power of HTML.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
26
58) Which of the following is correct about Services?
a) Angular 2 Services are a set of code that can be shared by different components
of an
application.
b) Angular 2 Services cannot be used across multiple applications.
c) Angular 2 Services help to build the applications into many modules.
d) All of the above.
Explanation
Services are a set of code that can be shared by different components of an
application. So for
example if you had a data component that picked data from a database, you could
have it as a
shared service that could be used across multiple applications.
59) Which of the following is correct about package.json?
a) There are two types of dependencies, first is the dependencies and then there
are dev
dependencies.
b) The dev ones are required during the development process and the others are
needed to
run the application.
c) Both of the above.
d) None of the above.
Explanation
There are two types of dependencies, first is the dependencies and then there are
dev dependencies.
The dev ones are required during the development process and the others are needed
to run
the application.
60) Which of the following is correct about systemjs.config.json?
a) This file is used to give the options about TypeScript used for the Angular JS
project.
b) This file contains information about Angular 2 project.
c) This file contains the system files required for Angular JS application.
d) All of the above.
Explanation systemjs.config.json contains the system files required for Angular JS
application. This loads all the necessary script files without the need to add a
script tag to the
html pages.
61) Which of the following filter is used to convert an input string to date
format.
a) dateformat b) date c) Both of the above. d) None of the above.
Explanation date filter is used to convert an input string
to date format.
62) Which of the following is correct about tsconfig.json?
a) The target for the compilation is generally es5 because most browsers can only
understand ES5
typescript.
b) The sourceMap option is used to generate Map files, which are useful when
debugging. Hence,
during development it is good to keep this option as true.
c) The "emitDecoratorMetadata": true and "experimentalDecorators": true is required
for Angular JS
decorators. If not in place, Angular JS application will not compile.
d) All of the above.
Explanation
The target for the compilation is es5 and that is because most browsers can only
understand ES5
typescript. The sourceMap option is used to generate Map files, which are useful
when
debugging. Hence, during development it is good to keep this option as true. The
"emitDecoratorMetadata": true and
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
27
"experimentalDecorators": true is required for Angular JS decorators. If not in
place, Angular JS
application will not compile.
63) Which of the following is correct about lifecycle hook - ngDoCheck.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first displays
the databound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
Explanation ngDoCheck method is for the detection and to act on changes that
Angular can't or
won't detect on its own.
64) Which of the following is the correct way to apply a filter?
a) Property-value || filter b) Property-value && filter
c) Property-value | filter d) None of the above.
Explanation filter are applied using pipe character.
65) Which of the following filter is used to slice a piece of data from the input
string.
a) slice b) substring c) Both of the above d) None of the above.
Explanation slice filter is used to slice a piece of data from the input string.
66) Which of the following filter is used to convert input to all lowercase?
a) lowercase b) lower c) Both of the above. d) None of the above.
Explanation lowercase filter is used to convert the input to all lowercase.
67) Which of the following is correct about Angular 2 Routing?
a) Routing helps in directing users to different pages based on the option they
choose on the main
page.
b) Based on the option they choose, the required Angular Component will be rendered
to the
user.
c) Both of the above.
d) None of the above.
Explanation
Angular 2 applications have the option of error handling. This is done by including
the ReactJS catch
library and then using the catch function. The catch function contains a link to
the Error Handler
function.
68) Which of the following filter is used to convert an input string to percentage
format.
a) percentage b) percent c) Both of the above. d) None of the above.
Explanation percent filter is used to convert an input string to percentage format.
69) Which of the following is true?
a) Angular 2 Services can be used to add more data to an Angular JS class.
b) Angular 2 Metadata can be used to add more data to an Angular JS class.
c) Angular 2 Components can be used to add more data to an Angular JS class.
d) None of the above.
Explanation
Angular 2 Metadata can be used to add more data to an Angular JS class.
70) Which of the following is correct about lifecycle hook - ngOnDestroy.
a) This is called in response after Angular checks the content projected into the
component.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
28
b) This is called in response after Angular initializes the component's views and
child views.
c) This is called in response after Angular checks the component's views and child
views.
d) This is the cleanup phase just before Angular destroys the directive/component.
Explanation ngOnDestroy method is the cleanup phase just before Angular destroys
the
directive/component.
71) Which of the following is correct about Angular 2 Components?
a) AngularJS had a focus of Controllers but Angular 2 has changed the focus to
having
components over controllers.
b) Components help to build the applications into many modules.
c) This helps in better maintaining the application over a period of time.
d) All of the above.
Explanation
All of the above options are correct.
72) Which of the following is true?
a) Angular 2 Services are used to define the views of an Angular JS application.
b) Angular 2 Templates are used to define the views of an Angular JS application.
c) Angular 2 Components are used to define the views of an Angular JS application.
d) None of the above.
Explanation
Angular 2 Templates are used to define the views of an Angular JS application.
73) Which of the following is correct about Import Array in Angular 2 Modules?
a) Import array can be used to import the functionality from other Angular JS
modules.
b) Import array can be used to import the templates.
c) Both of the above.
d) None of the above.
Explanation
Angular 2 Import array can be used to import the functionality from other Angular
JS modules.
74) Which of the following is correct about CLI?
a) CLI stands for Command Line Interface.
b) CLI can be used to create Angular JS application.
c) It also helps in creating a unit and end-to-end tests for the application.
d) All of the above.
Explanation
Command Line Interface (CLI) can be used to create our Angular JS application. It
also helps in creating
a unit and end-to-end tests for the application.
75) Which of the following is correct about package.json?
a) There are two types of dependencies, first is the dependencies and then there
are dev
dependencies.
b) The dev ones are required during the development process and the others are
needed to
run the application.
c) Both of the above.
d) None of the above.
Explanation
There are two types of dependencies, first is the dependencies and then there are
dev dependencies.
The dev ones are required during the development process and the others are needed
to run
the application.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
29
76) Which of the following filter is used to convert input to all uppercase?
a) uppercase b) upper c) Both of the above. d) None of the above.
Explanation uppercase filter is used to convert the input to all uppercase.
77) Which of the following filter is used to convert an input string to percentage
format.
a) percentage b) percent c) Both of the above. d) None of the above.
Explanation percent filter is used to convert an input string to percentage format.
78) Which of the following is correct about lifecycle hook - ngAfterContentInit.
a) When the value of a data bound property changes, then this method is called.
b) This is called whenever the initialization of the directive/component after
Angular first
displays the data-bound properties happens.
c) This is for the detection and to act on changes that Angular can't or won't
detect on its own.
d) This is called in response after Angular projects external content into the
component's view.
Explanation ngAfterContentInit method is called in response after Angular projects
external
content into the component's view.
79) Which of the following is correct about lifecycle hook - ngOnDestroy.
a) This is called in response after Angular checks the content projected into the
component.
b) This is called in response after Angular initializes the component's views and
child views.
c) This is called in response after Angular checks the component's views and child
views.
d) This is the cleanup phase just before Angular destroys the directive/component.
Explanation ngOnDestroy method is the cleanup phase just before Angular destroys
the
directive/component.
80) Which of the following is true about ng-bind directive?
a. ng-bind directive binds the Angular JS Application data to HTML tags.
b. ng-bind updates the model created by ng-model directive to be displayed in the
html tag.
c. ng-bind updates html control data when controller changes the model.
d. All of the above.
81) Angular JS application expressions are pure JavaScript expressions.
a. true b.false
82) Which of the following is true about currency
filter?
a. Currency filter formats text in a currency format.
b. Currency filter is a function which takes text as input.
c. Both of the above.
d. None of the above.
83) Model available in $rootScope can be overridden by its all child scopes.
a. true b. false
84) service method is used to create a service whose purpose is to do some defined
task.
a. true b. false
85) On which of the following types of component can we create a custom directive?
a. Element directives b. Attribute c. CSS d. All of the above.
86) With Angular JS, developer writes less code and gets more functionality.
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
30
a. true b. false
87) ng-init directive can be used to put values to the variables to be used in the
application.
a. true b. false
88) We can use $dirty and $invalid flags to do the form validations.
a. true b. false
Extra MCQ
Q.1) Which of these functions will add two numbers?
a) Fun=function(a,b){return a+b);
b) Fun=function(var a, var b){return a+b);
c) function fun(var a, var b){return a+b);
d) Fun=function(var a, var b){c=a+b);
Q.2) What is the type of value returned by parseint
a) Integer b) Int c) Number d) Whole number
Q.3) Which statement in javascript ensures whether a variable is declared
a) Strict b) Declare c) Use strict d) No strict
Q.4) The method used to fetch an element from DOM tree by its unique identifier
a) getElementById b)getElementByName
c) getElementByName d) getElementbyTagName
Q.5) Which of these is used for printing messages in console
a) Print b) Println c) Write d) Log
Q.6) How do I get the value of the form control in javascript?
a) Val() b) text() c) value d) innervalue
Q.7) var x=5, y=”A’; c=x+y; what is the type of c?
a) Number b) String c) Object d) Boolen
Q.8) Var x=prompt (“Enter number 1”); var y=prompt (“enter number 2”);
c=x+y; What is the type of c?
a) Number b) String c) Object d) Boolen
Q.9) In the registration form, there has to be an option to get the gender of the
participant, which of
the following controls can be used
a) Radio b) Checkbox c) Select d) Both a and c
Q.10) What is the use of regular expression /
a) Search a pattern b) Delete a string c) Remove a string d) None of the above
Q.11) What is the expression of JSON?
a) Java Script Object Nomenclature b) Java Script object Notification
c) Java Virtual Object Notation c) Javascript Object Notation
Q.12) Var pen={color: “blue” , type : “fountain”}, how should I fetch the type of
pen
a) pen, color b) pen[“type] c) pen[1].type; d) pen[1]
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
31
Q.13) Which method is used to change the address in address bar of the browser ?
a) location.href b) location.assign c) location.address d) location.window.href
Q.14) Which object has pixelwidth attribute
a) Screen b) Window c) Location d) Navigator
Q.15) What is the order of events when a key is typed
a) Keydown, Keypress, keyup b) keypress, ketdown, keyup
c) keyup, keydown, keypress d) keydown, keyup, keypress
Q.16) Which of these methods is used for getting confirmation from user?
a) confirmation() b) confirm() c) accept() d) agree
Q.17) Which of the following methods are used to remove some elements from an array
and insert
into certain location
a) splice b) slice c) insert d) add
Q.18) Which of these methods are used to remove an element from an array
a) push b) pop c) slice d) sort
Q.19) which method is used to get the last occurance of a letter in a string
a) indexOf b) lastOccuranceOf c) lastIndexOf d) occuranceOf
Q.20) what is the result of d=new Date; d.getDay() if today is Monday
a) mon b) Monday c) 1 d) 0
Q.21) which object is used to get width and height of current browser window?
a) currentTarget b) window c) location d) navigation
Q.22) Inside which HTML element do we put the JavaScript?
a) <script> b)<scripting> c) <js> d) <javascript>
Q.23) A JavaScript program can traverse and manipulate document content through
a) navigatior Object b) document Object
c) element object d) None of mentioned
Q.24) The setTimeout() method is used to
a) Make the event sleep
b) Register a function to be invoked after a certain time
c) Invoke an event after a certain time
d) Time for iteration
Q.25) Which is the parameter of hide method in jquery
a) milliseconds b) seconds c) minutes d) call back function
Q.26) Which of these effects is used to alternate between hide and show?
a) hideToogle b) showToogle c) toogle d) slideToogle
Q.27) Which of the following jQuery method can be used to get the attribute value?
a) attribute b) altr() c) add() d) none of the above
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
32
Q.28) Which jQuery function is used to prevent code from running, before the
document is finished
loading ?
a) $(document).fun() b) ) $(document).click()
c) ) $(document)..animate() d) ) $(document).ready()
Q.29) jQuery code to set background color of all div elements to red?
a) $(“div”).style(“background-color”,”red”);
b) $(“div”).manipulate(background-color” , “red”);
c) $(“div”).css(background-color” , “red”);
d) $(“div”).layout(background-color” , “red”);
Q.30) Which jQuery method is used to switch between adding/removing one or more
classes (for
CSS) from select elements?
a) switchClass() b) addRemoveClass() c) altClass() d) toogleClass
Q.31) Angular Js is________
a) One way data binding framework b) Two way data binding framework
c) Three way data binding framework d) Routing framework
Q.32) Anugular js expressions are written inside
a)[expr] b){[expr]} c){{expe}} d)[{expr}]
Q.33) Which object stores the values of a form/
a) $window b) $ route c) $scope d) $ main
Q.34) Which directive is used to loop through the list
a) ng-loop b) ng-repeat c) ng-for d) ng-while
Q.35) Which of the following are not features of Node.JS?
a) Event drive b) Asynchronous c) Multithreading d) Non-blocking
Q.36) Which of the following are not core modules?
a) Fs b) Path c) Platform d) url
Q.37) Which of the following method creates Http server in Nodejs?
a) createNode() b) connect() c) createConnection() d) None of the above
Q.38) which of the following method, the response object (res) can send a response
to the client, and
terminate the the request-response cycle in express?
a) res.json() b) res.end() c) res.download() d) All the above
Q.39) Which of the following can send a rendered view template in express JS?
a) app.render(view, [locals], callback); b) res.render(view, [locals], callback);
c) Both b and c d) None of the above
Q.40) Which of the following is used to get route parameters for the given route
path/users/:usreId/books/:bookId
a) req.body.userId, req.body.bookId b) req.body.users , req.body.books
c) req.params.userId , req.params.bookId d) req.params.users , req-params.books
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
33
Q41) What language defines the behavior of a web page?
a. HTML b. CSS c. XML d. Java Script
Q42. Which of the following is the tainted property of a window object in Java
Script?
a. Pathname b. Protocol c. Defaultstatus d. Host
Q43. How to append a value to an array of Java Script?
a. arr[arr.length] = value b. arr[arr.length+1] = new Arrays()
c. arr[arr.length-1] = value d. arr[arr.length*1] = value
Q44. Why so Java and Java Script have similar name?
a. Java Script is a stripped-down version of
Java
b. The syntax of Java is loosely based on Java syntax
c. They both support Object Oriented Programming
d. None of the above
Q45. Which machine actually executes the Java Script?
a. The web server
b. The machine which is running a web browser
c. Java Script engine
d. Both A and C
Q46. Is it possible to declare a variable in Java Script along its type?
a. Yes b. No
Q47. Which of the following are capable of Java Script functions?
a. Returning multiple values
b. Accepting parameters and returning values
c. Accepting parameters
d. all of the above
Q48. How does Java Script store dates in objects of Date
type?
a. The number of days since January 1st, 1900
b. The number of seconds since January 1st, 1970
c. The number of milliseconds since January 1st, 1970
d. The number of picoseconds since January 1st, 1970
Q49. Which attribute is used to hold the Java Script version?
a. SCRIPT b. VERSION c. LANGUAGE d. VER
Q50. Which of the following is correct to write “Hello World” on the web page?
a. System.out.println(“Hello World”)
b. print(“Hello World”)
c. document.write(“Hello World”)
d. response.write(“Hello World”)
Q51. Which of the following syntax is correct to refer an external script called
“formValidation.js”?
a. < script href = “formValidation.js”>
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
34
b. < script source = “formValidation.js”>
c. < script name = “formValidation.js”>
d. < script src = “formValidation.js”>
Q52. What type of image maps could be used with Java Script?
a. Client-side image maps b. Server-side image maps
c. Both A and B d. Localhost image maps
Q53. Which of the following is the correct way for writing Java Script array?
a. var salaries = new Array( 1:39438, 2:39839 3:83729)
b. var salaries = new (Array:1=39438, Array:2=39839, Array:3=83729)
c. var salaries = new Array(39438,39839,83729)
d. var salaries = new Array() values=39438,39839,83729
Q54. What is the purpose of <noscript> tag in Java Script?
a. Prevents scripts on the page from executing.
b. Enclose text to be displayed by non-JavaScript browsers
c. Suppresses the result to be displayed on the web page
d. None of the above
Q55. Java Script entities start with ____________ and end with ______________
a) Semicolon, colon b) Semicolon,
c) Ampersand Ampersand, colon d) Ampersand, semicolon
Q56. Which of the following is a server-side Java Script object?
a) Function b) File c) FileUpload
Q57. Which of the following is a client-side Java Script object?
d) Date
a) File b) Function c) FileUpload d) Time
Q58. Which of the following method is used to evaluate a string of Java Script code
in the context of
the specified object?
a) Eval b) ParseDoule c) ParseObject d) Efloat
Q59. What is the event that fires when the form elements : <button>.<textarea>
loses the focus?
a) Onclick b) Ondblclick c) Onfocus d) Onblur
Q60. Which of the following is used to capture all click events in a window?
a) window.captureEvents(Event.CLICK);
b) window.routeEvents(Event.CLICK );
c) window.handleEvents (Event.CLICK);
d) window.raiseEvents(Event.CLICK );
Q61. C-style block-level scoping is not supported in Java script
a) False b) True
Q62. To insert a JavaScript into an HTML page, which tag is used?
a) < script=’java’> b) < javascript> c) < script> d) < js>
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
35
Q63. If we don’t want the script to write page content, under which HTML tag should
the JS tag be
placeD?
a) < body> b) < head> c) Any of a and b above d) Both b and c above
Q64. Which of the following statements are true for Java script?
a) JavaScript is case sensitive
b) JavaScript statements can be grouped together in blocks
c) semicolon at the end of statement is mandatory
d) Both a and b above
Q65. Which of the following statements are false for Java script?
a) Variable names are not case sensitive
b) Variable names must begin with a letter or the underscore character
c) Var is used to declare a variable
d) Both b and c above
Q66. Which of the below is used in Java script to insert special characters?
a) & b) \ c) - d) %
Q67. JavaScript ignores extra spaces
a) True b) False
Q68. Which of the ways below is incorrect of instantiating a date?
a) new Date(dateString)
b) new Date()
c) new Date(seconds)
d) new Date(year, month, day, hours, minutes, seconds, milliseconds)
Q69. Which of the following statements are false for Java script?
a) JavaScript can react to events
b) JavaScript can read and write HTML elements
c) JavaScript cannot be used to create cookies
d) Both b and c above
Q70. What is negative infinity in Java script?
a) Any of below
b) number in JavaScript, derived by dividing number by a negative number.
c) number in JavaScript, derived by dividing number by zero.
d) number in JavaScript, derived by dividing negative number by zero
Q71. ___________ JavaScript is also called client-side JavaScript.
a) Microsoft b) Navigator c) LiveWire d) Native
Q72. Java script can be used for Storing the form's contents to a database file on
the server
a) False b) True
Q73 Which of the following is not a valid JavaScript variable name?
a) 2java b) _java_and_ java _names c) javaandjava d) None of the above
Q74. Which is the correct way to write a JavaScript array?
USM’s Shriram Mantri Vidyanidhi Info Tech Academy
PG DAC Aug 19 JAVA Script Framework Question Bank
36
a) var txt = new Array(1:"arr",2:"kim",3:"jim")
b) var txt = new Array:1=(" arr ")2=("kim")3=("jim")
c) var txt = new Array("arr ","kim","jim")
d) var txt = new Array=" arr ","kim","jim"
Q75. File is server-side JavaScript object
a) True b) False
Q76. What java wrapper type is created when a JavaScript object is sent to Java?
a) ScriptObject b) JavaObject c) Jobject
Q77. Which attribute needs to be changed to make elements invisible?
d) JSObject
a) visibilty b) visible c) invisibility d) invisible
Q78. Java Script supports all boolean operators
a) True b) False
Q79. What is the alternate name for Java script?
a) LimeScript b) Both a and d ECMScript d) ECMAScript
1
HTML Multiple-Choice Questions
(MCQs) ............................................................................
.......1
List of HTML
MCQs ..............................................................................
..........................................1
CSS Multiple-Choice Questions
(MCQs).............................................................................
.............25
List of CSS
MCQs...............................................................................
............................................25
JavaScript Multiple-Choice Questions
(MCQs).............................................................................
..62
List of JavaScript
MCQs...............................................................................
................................62
jQuery Multiple-Choice Questions
(MCQs).............................................................................
........99
List of jQuery
MCQs ..............................................................................
.......................................99
JSON Multiple-Choice Questions
(MCQs).............................................................................
........136
List of JSON
MCQs ..............................................................................
.......................................136
AJAX Multiple-Choice Questions
(MCQs) ............................................................................
.........150
List of Ajax
MCQs ..............................................................................
.........................................150
ReactJS Multiple-Choice Questions
(MCQs).............................................................................
....163
List of ReactJS
MCQs ..............................................................................
...................................163
HTML Multiple-Choice Questions (MCQs)
List of HTML MCQs
1. HTML is the standard ____language for creating Web pages.
A. scripting
B. programming
C. styling
D. markup
Answer: D) markup
Explanation:
HTML is the standard markup language for creating Web pages.
2. HTML stands for_______.
A. Hyperactive Text Markup Language
2
B. Hyper Text Markup Language
C. Hyper Text Machine Language
D. None of these
Answer: B) Hyper Text Markup Language
Explanation:
HTML stands for "Hyper Text Markup Language".
3. Which is the correct syntax to include comment in an HTML document?
A. //
B. /* Comment */
C. // Comment //
D. <!-- Comment -->
Answer: D) <!-- Comment -->
Explanation:
You can add comments to your HTML source by using the following syntax,
<!-- Write your comments here -->
4. Can we hide content using the comment?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, the comments can be used to hide content. Here is the syntax,
<!-- <p>Hello, world! </p> -->
5. Can we hide inline content using the comment?
3
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, the comments can be used to hide inline content. Here is the syntax,
<p>Hello, world! <!—This is some text --> How are you?</p>
6. Which element/tag defines a paragraph?
A. <p>
B. <pre>
C. <panel>
D. None of the above
Answer: A) <p>
Explanation:
The <p> tag/element defines a paragraph.
7. Which tag/element defines the HTML document's body?
A. <HTML>
B. <HTMLbody>
C. <bdy>
D. <body>
Answer: D) <body>
Explanation:
The <body> element defines the HTML document's body.
8. Which tag contains the meta information about the HTML page?
4
A. <html>
B. <title>
C. <head>
D. <body>
Answer: C) <head>
Explanation:
The <head> tag contains the meta information about the HTML page.
9. Which tag is the root element of an HTML page?
A. <html>
B. <title>
C. <head>
D. <body>
Answer: A) <html>
Explanation:
The <html> tag is the root element of an HTML page.
10. Who invented HTML?
A. Dave Raggett
B. Tim Berners-Lee
C. Denis Ritchie
D. All of the above
Answer: B) Tim Berners-Lee
Explanation:
Tim Berners-Lee invented HTML in 1991.
11. HTML tags with no content are called _____.
5
A. Special tags
B. Advanced tags
C. Empty tags
D. Other tags
Answer: C) Empty tags
Explanation:
HTML tags with no content are called empty tags. For example,
the <br> tag, <hr> tag.
12. Nested HTML Elements are allowed in HTML?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, Nested HTML Elements (<p><b><u>Some text</u></b></p>)are allowed in
HTML.
13. Is HTML a case sensitive?
A. Yes
B. No
Answer: B) No
Explanation:
No, HTML is Not Case Sensitive.
14. HTML headings are defined with the _____ tags.
A. <head1> to <head6>
B. <p1> to <p6>
6
C. <h1> to <h6>
D. <h1> to <h3>
Answer: C) <h1> to <h6>
Explanation:
HTML headings are defined with the <h1> to <h6> tags.
15. Which tag is used to display a horizonal rule (horizonal line)?
A. <br>
B. <hr>
C. <hr>...</hr>
D. <line>
Answer: B) <hr>
Explanation:
The <hr> tag is used to display a horizontal rule.
16. What is the correct syntax of <hr> tag?
A. <hr>
B. <hr />
C. <hr></hr>
D. All of the above
Answer: A), and B):
<hr> and <hr />
Explanation:
Both <hr> and <hr /> can be used to display a horizonal line.
17. Which tag is used to define a line break?
A. <\n>
7
B. <lr>
C. <br>
D. <br>...</br>
Answer: C) <br>
Explanation:
The <br> tag is used to define a line break.
18. What is the correct syntax of <br> tag?
A. <br>
B. <br />
C. <br></br>
D. All of the above
Answer: A), and B): <br> and <br />
Explanation:
Both <br> and <br /> can be used to display a line break.
19. Which tag is used to define preformatted text?
A. <pf>
B. <p>
C. <pre>
D. <code>
Answer: C) <pre>
Explanation:
The <pre> tag is used to define preformatted text.
20. Which HTML attribute is used to define styles of an element?
A. <style>
8
B. <css>
C. style
D. css
Answer: C) style
Explanation:
The style attribute is used to define the styles of an element.
21. Which is the correct HTML statement to define the red color of the
paragraph text?
A. <p style="color: #ff0000;">
B. <p style="color: red;">
C. Both A. and B.
D. None of the above
Answer: C) Both A. and B.
Explanation:
The correct HTML statement to define red paragraph color is,
<p style="color: #ff0000;">
<!--OR-->
<p style="color: red;">
22. Which HTML tag is used to define bold text, without any extra importance?
A. <strong>
B. <bold>
C. <bolder>
D. <b>
Answer: D) <b>
Explanation:
The HTML <b> tag is used to define bold text, without any extra importance.
9
23. Which HTML tag is used to define text with strong importance?
A. <strong>
B. <bold>
C. <bolder>
D. <b>
Answer: A) <strong>
Explanation:
The HTML tag <strong> is used to define text with strong importance.
24. Which HTML tag is used to define italic text?
A. <italic>
B. <em>
C. <i>
D. <it>
Answer: C) <i>
Explanation:
The HTML tag <i> is used to define italic text.
25. Which HTML tag is used to define emphasized text?
A. <italic>
B. <em>
C. <i>
D. <it>
Answer: B) <em>
Explanation:
The HTML tag <em> is used to define emphasized text.
10
26. Which HTML tag is used to define smaller text?
A. <normal>
B. <span>
C. <smaller>
D. <small>
Answer: D) <small>
Explanation:
The HTML tag <small> is used to define smaller text.
27. Which HTML tag is used to define marked or highlighted text?
A. <mark>
B. <highlight>
C. <m>
D. <highlighted>
Answer: A) <mark>
Explanation:
The HTML tag <mark> is used to define marked or highlighted text.
28. Which HTML tag is used to define strike a line through deleted text?
A. <delete>
B. <del>
C. <deleted>
D. <through>
Answer: B) <del>
Explanation:
The HTML tag <del> is used to define strike a line through deleted text.
11
29. Which HTML tag is used to define underline inserted text?
A. <underline>
B. <text-decoration>
C. <u>
D. <ins>
Answer: D) <ins>
Explanation:
The HTML tag <ins> is used to define underline inserted text.
30. Which HTML tag is used to define subscript text?
A. <sub>
B. <subscript>
C. <s>
D. <subscripted>
Answer: A) <sub>
Explanation:
The HTML <sub> tag is used to define subscript text.
31. Which HTML tag is used to define superscript text?
A. <sup>
B. <superscript >
C. <s>
D. <superscripted>
Answer: A) <sup>
Explanation:
The HTML <sup> tag is used to define superscript text.
12
32. Which is the correct HTML statement to display H20 in a paragraph?
A. <p>H<sup>2</sup>O</p>
B. <p>H<ins>2</ins>O</p>
C. <p>H<below>2</below>O</p>
D. <p>H<sub>2</sub>O</p>
Answer: D) <p>H<sub>2</sub>O</p>
Explanation:
The correct HTML statement to display H20 in a paragraph
is: <p>H<sub>2</sub>O</p>
33. Which is the correct HTML statement to display HelloWorld in a paragraph?
A. <p>Hello<sup>World</sup></p>
B. <p>Hello<top>World</top></p>
C. <p>Hello<sub>World</sub></p>
D. <p>Hello<above>World</above></p>
Answer: A) <p>Hello<sup>World</sup></p>
Explanation:
The correct HTML statement to display HelloWorld in a paragraph
is: <p>Hello<sup>World</sup></p>
34. Which is the correct HTML statement to display HelloHi! in a paragraph?
A. <p><del>Hello</del><ins>Hi!</ins></p>
B. <p><strike>Hello</strike><ins>Hi!</ins></p>
C. <p><cut>Hello</cut><ins>Hi!</ins></p>
D. All of the above
Answer: A), and B): <p><del>Hello</del><ins>Hi!</ins></p>
<p><strike>Hello</strike><ins>Hi!</ins></p>
Explanation:
13
The correct HTML statement to display HelloHi! in a paragraph
is/are: <p><del>Hello</del><ins>Hi!</ins></p> <p><strike>Hello</strike>
<ins>Hi!</ins></p>
35. Which is the correct HTML statement to display Hello IncludeHelp in a
paragraph?
A. <p>Hello <mark>IncludeHelp</mark></p>
B. <p>Hello<mark>IncludeHelp</mark></p>
C. <p>Hello <span>IncludeHelp</span></p>
D. <p>Hello<span>IncludeHelp</span></p>
Answer: B) <p>Hello<mark>IncludeHelp</mark></p>
Explanation:
The correct HTML statement to display Hello IncludeHelp in a paragraph
is: <p>Hello <mark>IncludeHelp</mark></p>
36. Which HTML tag is used to define a short quotation?
A. <quotation>
B. <quote>
C. <qut>
D. <q>
Answer: D) <q>
Explanation:
The HTML tag <q> is used to define a short quotation.
37. Which HTML tag is used to define an abbreviation or an acronym?
A. <abbreviation>
B. <abbr>
C. <acronym>
D. <acr>
14
Answer: B) <abbr>
Explanation:
The HTML tag <abbr> is used to define an abbreviation or an acronym.
38. What is the correct HTML syntax of <abbr> tag?
A. <abbr title="abbreviation or acronym">Text</abbr>
B. <abbr description="abbreviation or acronym">Text</abbr>
C. <abbr abbreviation="abbreviation or acronym">Text</abbr>
D. <abbr acronym="abbreviation or acronym">Text</abbr>
Answer: A) <abbr title="abbreviation or acronym">Text</abbr>
Explanation:
The correct HTML syntax of <abbr> tag is,
<abbr title="abbreviation or acronym">Text</abbr>
39. What HTML tag is used to define the contact information for the
author/owner of a document or an article?
A. <contact>
B. <authorinfo>
C. <address>
D. <addr>
Answer: C) <address>
Explanation:
The HTML tag <address> is used to define the contact information for the
author/owner of a document or an article.
40. Which tag is used to override the current text direction?
A. <bdi>
15
B. <bdo>
C. <bdr>
D. None of the above
Answer: B) <bdo>
Explanation:
The HTML tag <bdo> is used to override the current text direction.
41. Which HTML tag is used to define a hyperlink?
A. <a>
B. <h>
C. <hyperlink>
D. Both A. and B.
Answer: A) <a>
Explanation:
The HTML <a> tag defines a hyperlink.
42. Which is the correct syntax of <a> tag?
A. <a src="url">link text</a>
B. <a link="url">link text</a>
C. <a href="url">link text</a>
D. <a srclink="url">link text</a>
Answer: C) <a href="url">link text</a>
Explanation:
The correct syntax to create a hyperlink is,
<abbr title="abbreviation or acronym">Text</abbr>
43. Why "href" attribute is used with <a> tag?
16
A. To define title text
B. To define reference of a document
C. To define destination URL
D. All of the above
Answer: C) To define destination URL
Explanation:
The href attribute of the <a> tag is most important, which indicates the link's
destination.
44. Which ____ attribute specifies where to open the linked document?
A. href
B. link
C. src
D. target
Answer: D) target
Explanation:
The “target” attribute specifies where to open the linked document.
45. Which tag is used to embed an image in an HTML document?
A. <img>
B. <pic>
C. <image>
D. <picture>
Answer: C) <img>
Explanation:
The HTML tag <img> is used to embed an image in an HTML document.
46. What is the correct syntax of <img> tag?
17
A. <img src="url">
B. <img src="url" alt="alternatetext">
C. <img src="url" alt="alternatetext" />
D. All of the above
Answer: D) All of the above
Explanation:
The correct syntax of <img> tag is/are:
<img src="url" alt="alternatetext" />
We can also use,
<img src="url">
<!--Or-->
<img src="url" alt="alternatetext">
47. Which attribute specifies the path to the image?
A. href
B. link
C. src
D. All of the above
Answer: C) src
Explanation:
The src attribute specifies the path to the image.
48. Which attribute specifies an alternate text for the image?
A. alt
B. alternate
C. alttext
D. All of the above
Answer: B) alternate
18
Explanation:
The alternate attribute specifies an alternate text for the image.
49. Which HTML tag is used to define a table?
A. <table>
B. <tables>
C. <tr>
D. <th>
Answer: A) <table>
Explanation:
The HTML tag <table> is used to define a table.
50. Each table cell is defined by a ____ tag.
A. <cell> ... </cell>
B. <tr> ... </tr>
C. <th> ... </th>
D. <td> ... </td>
Answer: D) <td> ... </td>
Explanation:
Each table cell is defined by a <td>and a </td> tag.
51. Each table row is defined by a ____ tag.
A. <cell> ... </cell>
B. <tr> ... </tr>
C. <th> ... </th>
D. <td> ... </td>
Answer: B) <tr> ... </tr>
19
Explanation:
Each table row is defined by a <tr> and a </tr> tag.
52. Each table header is defined by a ____ tag.
A. <cell> ... </cell>
B. <tr> ... </tr>
C. <th> ... </th>
D. <td> ... </td>
Answer: C) <th> ... </th>
Explanation:
Each table header is defined by a <th> and a </th> tag.
53. Which tag is used to define ordered listing?
A. <ol> ... </ol>
B. <ul> ... </ul>
C. <list> ... </list>
D. <li> ... </li>
Answer: A) <ol> ... </ol>
Explanation:
The HTML tag <ol> ... </ol> is used to define ordered listing.
54. Which tag is used to define unordered listing?
A. <ol> ... </ol>
B. <ul> ... </ul>
C. <list> ... </list>
D. <li> ... </li>
Answer: B) <ul> ... </ul>
20
Explanation:
The HTML tag <ul> ... </ul> is used to define unordered listing.
55. Which tag is used to define list items?
A. <ol> ... </ol>
B. <ul> ... </ul>
C. <list> ... </list>
D. <li> ... </li>
Answer: D) <li> ... </li>
Explanation:
The HTML tag <li> ... </li> is used to define list items.
56. Which tag is used to define description lists?
A. <dl> ... </dl>
B. <dd> ... </dd>
C. <dlist> ... </dlist>
D. <check> ... </check>
Answer: A) <dl> ... </dl>
Explanation:
The HTML tag <dl> ... </dl> is used to define description lists.
57. Which tag is a block-level element?
A. <block> ... </block>
B. <b> ... </b>
C. <div> ... </div>
D. <divx> ... </divx>
Answer: C) <div> ... </div>
21
Explanation:
The HTML tag <div> ... </div> is a block-level element.
58. Which attribute is often used to point to a class name in a style sheet?
A. style
B. css
C. src
D. class
Answer: D) class
Explanation:
The class attribute is often used to point to a class name in a style sheet.
59. Which attribute is used to specify a unique id for an HTML element?
A. style
B. css
C. id
D. class
Answer: C) id
Explanation:
The HTML id attribute is used to specify a unique id for an HTML element.
60. Can we use class name with multiple HTML elements?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, we can use class name with multiple HTML elements.
22
61. Can we use id attribute with multiple HTML elements?
A. Yes
B. No
Answer: B) No
Explanation:
No, we cannot use id attribute with multiple HTML elements.
62. Which tag specifies an inline frame?
A. <frame>
B. <iframe>
C. <inlineframe>
D. <frames>
Answer: B) <iframe>
Explanation:
The HTML tag <iframe> specifies an inline frame.
63. What is the correct syntax for <iframe> tag?
A. <iframe href="url" title="description"></iframe>
B. <iframe link="url" title="description"></iframe>
C. <iframe src="url" title="description"></iframe>
D. All of the above
Answer: C) <iframe src="url" title="description"></iframe>
Explanation:
The correct syntax for <iframe> tag is,
<iframe src="url" title="description"></iframe>
23
64. Which tag is used to create an HTML form for user input?
A. <form>
B. <input>
C. <form_put>
D. <form_get>
Answer: A) <form>
Explanation:
The HTML tag <form> is used to create an HTML form for user input.
65. Which tag is used to display a single-line text input field?
A. <input type="textbox">
B. <input type="checkbox">
C. <input type="text">
D. <input type="submit">
Answer: C) <input type="text">
Explanation:
The HTML tag <input type="text"> is used to display a single-line input field.
66. Which tag is used to display a radio button?
A. <input type="textbox">
B. <input type="checkbox">
C. <input type="text">
D. <input type="radio">
Answer: D) <input type="radio">
Explanation:
The HTML tag <input type="radio"> is used to display a radio button.
24
67. Which tag is used to display a checkbox?
A. <input type="textbox">
B. <input type="checkbox">
C. <input type="text">
D. <input type="radio">
Answer: B) <input type="checkbox">
Explanation:
The HTML tag <input type="checkbox"> is used to display a checkbox.
68. Which tag is used to display a submit button?
A. <input type="submit">
B. <input type="checkbox">
C. <input type="text">
D. <input type="radio">
Answer: A) <input type="submit">
Explanation:
The HTML tag <input type="submit"> is used to display a submit button.
69. Which tag is used to display a clickable button?
A. <input type="submit">
B. <input type="checkbox">
C. <input type="text">
D. <input type="button">
Answer: D) <input type="button">
Explanation:
The HTML tag <input type="button"> is used to display a clickable button.
25
70. Which input type reset defines a reset button that will reset all form values
to their default values?
A. clear
B. clear:both
C. reset
D. refresh
Answer: C) reset
Explanation:
The reset input type reset defines a reset button that will reset all form values
to
their default values. Here is the syntax,
<input type="reset">
CSS Multiple-Choice Questions (MCQs)
List of CSS MCQs
1. What is CSS stands for?
A. Cascading Style Sheets
B. Cascade Style Sheet
C. Color Style Sheets
D. Color Style Sheet
Answer: A) Cascading Style Sheets
Explanation:
The full form of the CSS is Cascading Style Sheets. Cascading Style Sheets is a
style
sheet language used for describing the presentation of a document written in a
markup language such as HTML. CSS is a cornerstone technology of the World Wide
Web, alongside HTML and JavaScript.
2. What CSS describes?
A. CSS describes how calculation perform on button click.
26
B. CSS describes how HTML elements are to be displayed on screen, paper, or in
other media
C. Both A. and B.
D. None of the above
Answer: B) CSS describes how HTML elements are to be displayed on screen, paper,
or in other media
Explanation:
CSS describes how HTML elements are to be displayed on screen, paper, or in other
media.
3. What is the correct syntax for referring an external CSS?
A. <link rel="stylesheet" type="text/css" href="mystyle.css">
B. <stylesheet rel="stylesheet" type="text/css" href="mystyle.css">
C. <style rel="stylesheet" type="text/css" href="mystyle.css">
D. All of the above
Answer: A) <link rel="stylesheet" type="text/css" href="mystyle.css">
Explanation:
The correct syntax to include (refer) an external CSS in an HTML document is,
<link rel="stylesheet" type="text/css" href="mystyle.css">
Here,
• rel defined the relationship.
• href is the CSS filename.
• type is the type of the file, for CSS – the type is "text/css"
4. What is a CSS selector?
A. A CSS selector is the CSS class name
B. A CSS selector is the set of properties that are going to be applied on HTML
elements
C. A CSS selector is name of CSS file.
27
D. A CSS selector is the first part of a CSS Rule. It may an HTML element or
pattern of elements.
Answer: D) A CSS selector is the first part of a CSS Rule. It may an HTML element
or
pattern of elements
Explanation:
A CSS selector is the first part of a CSS Rule. It may an HTML element or pattern
of
elements and other terms that tell the browser which HTML elements should be
selected to have the CSS property values inside the rule applied to them.
5. In a CSS file, there is a CSS rule for paragraphs tags – what does p can be
called?
A. Selector
B. Attribute
C. Property
D. Tag
Answer: A) Selector
Explanation:
In a CSS rule, the HTML element(s) for them we are writing the CSS is known as "CSS
Selector".
6. Internal styles are written within the _____ element.
A. <style>…</style>
B. <css>…</css>
C. <stylesheet>…</stylesheet>
D. Both A. and B.
Answer: A) <style>…</style>
Explanation:
Internal styles are defined within the <style> element, inside the <head> section
of
an HTML page.
28
7. Inline styles are written within the _____ attribute.
A. style
B. css
C. stylesheet
D. Both A. and B.
Answer: A) style
Explanation:
Inline styles are defined within the style attribute of the relevant element.
Example:
<h1 style="color:blue;text-align:center;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
8. CSS comments are placed within the ______.
A. //
B. /* and */
C. <* and *>
D. <! And !>
Answer: B) /* and */
Explanation:
A CSS comment is placed inside the <style> element, and starts with /* and ends
with */.
9. Can comments also span multiple lines?
A. Yes
B. No
Answer: A) Yes
29
Explanation:
Yes, comments can also span multiple lines.
Example:
/* This is
a multi-line
comment */
OR
/*
This is
a multi-line
comment
*/
10. Which property is used to define the text color?
A. text-color
B. color
C. font-color
D. Both A. and B.
Answer: B) color
Explanation:
The color property is used to define the text color in CSS.
11. Which property is used to define the background color?
A. bgcolor
B. bg-color
C. background
D. background-color
Answer: D) background-color
Explanation:
The background-color property is used to define the background color in CSS.
30
12. From the given options which is/are the valid way to represent a color?
A. A valid color name like "blue"
B. HEX code like "#0000ff"
C. RGB Value like "rgb(0,0,255)
D. All of the above
Answer: D) All of the above
Explanation:
All of the given options are valid to define/represent the color name.
13. Which property is used to define the font of the element's text?
A. font
B. font-family
C. font-style
D. All of the above
Answer: B) font-family
Explanation:
The font-family property is used to define the font of the element's text.
Example:
p
{
font-family: "Times New Roman", Times, serif;
}
14. To make a text italic, which CSS property is used?
A. font
B. font-family
C. font-style
D. All of the above
31
Answer: C) font-style
Explanation:
The font-style property is used to define the font style i.e., to make the text
bold.
To make the text italic, italic value is used.
Example:
p
{
font-style: italic;
}
15. What are the valid values of font-style property?
A. italic, bold, bolder
B. normal, bold, italic
C. underline, bold, italic
D. inherit, italic, normal, oblique
Answer: D) inherit, italic, normal, oblique
Explanation:
The following are the valid values of the font-style property,
• inherit
• italic
• normal
• oblique
16. Why font-weight property is used?
A. Sets how thick or thin characters in text should be displayed.
B. Sets the size of the font
C. Both A. and B.
D. None of the above
Answer: A) Sets how thick or thin characters in text should be displayed
32
Explanation:
The font-weight property sets how thick or thin characters in text should be
displayed.
17. What is/are the correct value(s) of font-weight property?
A. bold, italic, underline
B. normal, bold, italic
C. normal, bold, bolder, lighter, initial, and inherit
D. None of the above
Answer: C) normal, bold, bolder, lighter, initial, and inherit
Explanation:
The valid values of the font-wight property:
• normal,
• bold
• bolder
• lighter
• initial
• inherit
18. Which is the correct inline CSS for p tag to define paragraph's text and
background colors?
A. <p css="color: red; background-color: yellow;">
B. <p cssstyle="color: red; background-color: yellow;">
C. <p inline="color: red; background-color: yellow;">
D. <p style="color: red; background-color: yellow;">
Answer: D) <p style="color: red; background-color: yellow;">
Explanation:
The correct inline CSS style is,
<p style="color: red; background-color: yellow;">Paragraph
Text.</p>
33
19. What is the correct syntax of border property in CSS?
A. border: border-width border-style border-color
B. border: border-color border-width border-style
C. border: border-style border-width border-color
D. All of the above
Answer: A) border: border-width border-style border-color
Explanation:
The correct syntax to define element's border using the border property
border: border-width border-style border-color
Example:
<p style="border: 2px solid red;">
This is some text in a paragraph.
</p>
20. Which of the following is the correct syntax to display the hyperlinks
without any underline?
A. a {text-decoration : underline;}
B. a {text-decoration : none;}
C. a {text-decoration : block;}
D. None of the above
Answer: B) a {text-decoration : none;}
Explanation:
The correct syntax to display the hyperlinks without any underline is,
a {text-decoration : none;}
21. Which of the following is the correct syntax to remove the underline on
hyperlinks and visited hyperlinks?
34
A. a {text-decoration : underline;}, a:visited {text-decoration : underline;}
B. a {text-decoration : block;}, a:visited {text-decoration : block;}
C. a {text-decoration : none;}, a:visited {text-decoration : none;}
D. None of the above
Answer: C) a {text-decoration : none;}, a:visited {text-decoration : none;}
Explanation:
The correct syntax to display the hyperlinks without any underline is,
a {text-decoration : none;}, a:visited {text-decoration : none;}
22. Which CSS property is used to style the hyperlinks on hover (Mouse over)?
A. a:mouseover
B. a:move
C. a:mover
D. a:hover
Answer: D) a:hover
Explanation:
The a:hover property is used to define the style on mouse over event,
a:hover{
// styles
}
23. If you want to use a green dotted border around an image, which CSS
property is used for that?
A. border-style
B. border-color
C. border-decoration
D. Both A. and B.
Answer: D) Both A. and B.
Explanation:
35
Two properties border-style and border-color are used to define a green dotted
border around an image.
Example:
<img src="image_1.jpg" style="border-style:dotted;border#color:green;"/>
24. Which CSS property and value is used to center an element?
A. text-align:center
B. align:center
C. text-align:middle
D. align:middle
Answer: A) text-align:center
Explanation:
text-align property with value center is used to center an elements.
25. What are the valid values of text-align property?
A. left, middle, right
B. left, center, right
C. left, center, right, justify
D. left, middle, right, justify
Answer: C) left, center, right, justify
Explanation:
The valid values of text-align property are,
• left
• center
• right
• justify
36
26. What is the use of "text-align:justify" in CSS?
A. Stretches the lines so that each line has equal width
B. Stretches the lines so that each line can be arranged in left alignment
C. Stretches the lines so that each line can be arranged in right alignment
D. None of the above
Answer: A) Stretches the lines so that each line has equal width
Explanation:
The text-align:justify property stretches the lines so that each line has equal
width.
27. Which CSS property is used to specify the indentation of the first line of a
text?
A. text-align
B. padding-left
C. margin-left
D. text-indent
Answer: D) text-indent
Explanation:
The text-indent property is used to specify the indentation of the first line of a
text.
Example:
p {
text-indent: 50px;
}
28. Which CSS property is used to specify the space between the characters in a
text?
A. text-space
B. letter-space
C. letter-spacing
37
D. letter-distance
Answer: C) letter-spacing
Explanation:
The letter-spacing property is used to specify the space between the characters in
a text.
Example:
p {
letter-spacing: 5px;
}
29. Which CSS property is used to specify the space between lines?
A. line-space
B. line-spacing
C. line-padding
D. line-height
Answer: D) line-height
Explanation:
The line-height property is used to specify the space between lines.
Example:
p {
line-height: 2.0;
}
30. Which CSS property is used to specify the space between the words in a
text?
A. word-spacing
B. word-padding
C. word-height
D. characters-spacing
38
Answer: A) word-spacing
Explanation:
The word-spacing property is used to specify the space between the words in a text.
Example:
p {
word-spacing: 10px;
}
31. Which CSS property adds shadow to text?
A. content-shadow
B. text-shadow
C. word-shadow
D. text-outline
Answer: B) text-shadow
Explanation:
The text-shadow property adds shadow to text.
Example:
p {
text-shadow: 1px 2px green;
}
32. Which CSS property is used to specify uppercase and lowercase letters in a
text?
A. text-transform
B. text-case
C. case
D. text-casing
Answer: A) text-transform
39
Explanation:
The text-transform property is used to specify uppercase and lowercase letters in
a text.
Example:
p {
text-transform: uppercase / lowercase / capitalize;
}
33. Which is the correct CSS statement to capitalize the first letter of each
word?
A. text-transform: uppercase
B. text-transform: capitalize
C. text-transform: sentence
D. Both A. and B.
Answer: B) text-transform: capitalize
Explanation:
The correct CSS statement is to capitalize the first letter of each word,
p {
text-transform: capitalize;
}
34. What are the valid values of text-transform property?
A. uppercase, lowercase, and capitalize
B. uppercase, lowercase, capitalize, and sentence
C. upper, lower, and capital
D. upper, lower, capital, and sentence
Answer: A) uppercase, lowercase, and capitalize
Explanation:
The valid values of text-transform property are,
40
• uppercase
• lowercase, and
• capitalize
35. What are the valid values of "text-decoration" property?
A. overline, line-through, underline, and none
B. overline, strike, line-through, underline, and none
C. double-line, overline, line-through, underline, and none
D. None of these
Answer: A) overline, line-through, underline, and none
Explanation:
The valid values of text-decoration property are,
• overline
• line-through
• underline, and
• none
36. Which CSS property specifies how to align the last line of a text?
A. text-align
B. last-text-align
C. text-align-last-line
D. text-align-last
Answer: D) text-align-last
Explanation:
The text-align-last property specifies how to align the last line of a text.
Example:
p {
text-align-last: right;
}
41
37. Which CSS property sets the vertical alignment of an element?
A. vertical-align
B. vertical-text-align
C. text-valign
D. vertical-align-text
Answer: A) vertical-align
Explanation:
The vertical-align property sets the vertical alignment of an element.
Example:
p {
vertical-align: baseline;
}
38. What are the valid values of vertical-align property?
A. baseline, text-top, text-bottom, subscript, and superscript
B. baseline, top, bottom, sub, and super
C. baseline, text-top, text-bottom, sub, and super
D. base, text-top, text-bottom, sub, and super
Answer: C) baseline, text-top, text-bottom, sub, and super
Explanation:
The valid values of vertical-align property are,
• baseline
• text-top
• text-bottom
• sub, and
• super
39. Which is the correct CSS statement to define multiple font families?
42
A. font: "Times New Roman", Times, serif;
B. font-name: "Times New Roman", Times, serif;
C. font-family: "Times New Roman, Times, serif";
D. font-family: "Times New Roman", Times, serif;
Answer: D) font-family: "Times New Roman", Times, serif;
Explanation:
The correct CSS statement to define multiple font families,
p {
font-family: "Times New Roman", Times, serif;
}
40. Which CSS property specifies the type of list item marker?
A. list-style
B. list-style-type
C. list-style-circle
D. list-style-square
Answer: B) list-style-type
Explanation:
The list-style-type property specifies the type of list item marker.
Example:
ul {
list-style-type: circle;
}
41. Which is the correct CSS statement is used to remove the markers/bullets?
A. list-style: none;
B. list-style-type: 0;
C. list-style-type: blank;
D. list-style-type: none;
43
Answer: D) list-style-type: none;
Explanation:
The correct CSS statement is used to remove the markers/bullets,
ul {
list-style-type: none;
}
42. Which CSS property specifies an image as the list item marker?
A. list-style-image
B. list-style-picture
C. list-style-background
D. list-style-bgimage
Answer: A) list-style-image
Explanation:
The list-style-image property specifies an image as the list item marker.
Example:
ul {
list-style-image: url('sqpurple.gif');
}
43. Which CSS property specifies if/how an element is displayed?
A. block
B. display
C. element-display
D. element-block
Answer: B) display
Explanation:
The display property specifies if/how an element is displayed.
44
Example:
ul {
display: block;
}
44. Which CSS property specifies the type of positioning method used for an
element?
A. positions
B. text-position
C. positioning
D. position
Answer: D) position
Explanation:
The position property specifies the type of positioning method used for an
element.
Example:
div.fixed{
position: fixed;
}
45. HTML elements are positioned ___ by default.
A. static
B. fixed
C. relative
D. none
Answer: A) static
Explanation:
HTML elements are positioned static by default.
45
46. What are the valid values for "position" property?
A. block, none, fixed, absolute, and static
B. block, static, fixed, absolute, and sticky
C. static, relative, fixed, absolute, and none
D. static, relative, fixed, absolute, and sticky
Answer: D) static, relative, fixed, absolute, and sticky
Explanation:
The valid values for position property are,
• static
• relative
• fixed
• absolute
• sticky
47. Which CSS property specifies the opacity/transparency of an element?
A. transparency
B. opacity
C. transform-opacity
D. opacity-all
Answer: B) opacity
Explanation:
The opacity property specifies the opacity/transparency of an element.
Example:
img {
opacity: 0.8;
}
48. Which CSS function performs a calculation to be used as the property value?
A. sum()
46
B. add()
C. calc()
D. addition()
Answer: C) calc()
Explanation:
The calc() function performs a calculation to be used as the property value.
Example:
body {
width: calc(100% - 100px);
}
49. Which CSS function uses the largest value?
A. large()
B. maximum()
C. max_value()
D. max()
Answer: D) max()
Explanation:
The max() function uses the largest value.
Example:
body {
width: max(80%, 100px);
}
50. Which CSS function uses the smallest value?
A. small()
B. minimum()
C. min_value()
D. min()
47
Answer: D) min()
Explanation:
The min() function uses the smallest value.
Example:
body {
width: min(80%, 100px);
}
51. In how many ways can CSS be added to HTML?
A. One
B. Two
C. Three
D. Infinite
Answer: C) Three
Explanation:
CSS can be added to HTML in three different ways.
• By using style attribute inside <body> tag.
• By using <style> tag inside the <head> section of HTML
• By creating an external CSS file and linking this file using <link> tag in HTML.
52. The <style> in Internal CSS refers to ___.
A. Attributes
B. HTML tags
C. Selector
D. All of the above
Answer: B) HTML tags
Explanation:
In Internal CSS, we add CSS using <style>, which is an HTML tag.
48
53. Can we link multiple stylesheets to a single page?
A. Yes
B. No
C. Can't say, it depends on CSS properties
D. None of the above
Answer: A) Yes
Explanation:
Yes, we can link multiple stylesheets to a single page. You just have to add the
<link>
element for each stylesheet.
54. The CSS property used to change text sizes?
A. font-family
B. font-size
C. font
D. Both A and C
Answer: D) Both A and C
Explanation:
The font and font-size CSS properties are used to change the font size. Font size
is
one of the longhand properties of the font.
55. In this line of code, identify the selector ___.
p {border: 2px solid blue;}
A. p
B. border
C. 2px
D. None of these
Answer: A) p
49
Explanation:
In the given line of code, p is the selector. Selectors target HTML elements that
we
want to style. Here, the border is a CSS property and 2px solid blue is the
property
value.
56. How many color names does CSS supports?
A. 140
B. 100
C. 75
D. 90
Answer: A) 140
Explanation:
CSS3 has 140 color names available which are supported by all the browsers.
57. The ___ property is used in the positioning of the background image.
A. background-image
B. background-position
C. padding
D. All of the above
Answer: B) background-position
Explanation:
As the name suggests, the background-position property specifies the position of
the
background image.
58. ___ means 4 times the size of the current font.
A. 4px
B. 4 pt.
C. 4em
D. 4vw
50
Answer: C) 4em
Explanation:
All four units refer to the unit of length. 4em means 4 times the size of the
current
font which is relative to the font size of the element.
59. Amongst the following browsers, which browser supports almost all the CSS
properties?
A. Firefox
B. Safari
C. Google Chrome
D. Opera
Answer: C) Google Chrome
Explanation:
Both Google Chrome and Microsoft Edge support almost all the CSS properties.
60. What is the CSS Entity for the character '#'?
A. 0023
B. 0026
C. 0027
D. None of the these
Answer: A) 0023
Explanation:
We use CSS Entities to display all the characters. There are different entities for
different characters. For this character "#", CSS Entity is 0023.
61. This selector selects all the <h> elements where the parent is a <div>
element.
A. h + p
51
B. h > p
C. p.h
D. p > h
Answer: B) h > p
Explanation:
This is an element>element selector in which operand on the left side of child
combinator (>) is the parent and operand on the right side is the child element.
62. Which selector selects the markers of list items?
A. :: marker
B. .marker
C. ::selector
D. None of these
Answer: A) ::marker
Explanation:
The :: marker selector targets the list markers of list items.
63. Which is the most widely used font in customizing web pages?
A. Times New Roman
B. Georgia
C. Arial
D. Garamond
Answer: C) Arial
Explanation:
Arial (sans-serif) is the most widely used font on web pages.
64. Which of the following CSS properties are animatable?
52
A. color
B. border-left
C. flex
D. All of the above
Answer: D) All of the above
Explanation:
We can add animation and transitions to all these three properties. To add
animations, we apply animation property.
65. We can give space between unit and value when assigning length values to
CSS properties.
A. True
B. False
Answer: B) False
Explanation:
If you give a space between unit and value, the property won't be injected in div.
66. Which of these units of length is supported by Chrome Version 1.0?
A. rem
B. px
C. vw
D. vh
Answer: B) px
Explanation:
Pixels (px) is supported by Chrome Version 1.0.
67. Which line of code is a must to write to apply CSS Flexbox properties?
53
A. display: flex;
B. display: flexbox;
C. display: block;
D. flex-direction: row;
Answer: A) display: flex;
Explanation:
If you want to apply CSS Flexbox properties, you need to set
the display to flex first.
68. The default value of justify-content property is ___.
A. flex-start
B. flex-end
C. space-between
D. None
Answer: A) flex-start
Explanation:
The justify-content property is one of the CSS Flexbox properties. Its default
value is flex-start.
69. Which is the correct syntax for adding animation?
A. animation: name timing-function duration
B. animation: name duration timing-function
C. animation: name delay duration
D. None of these
Answer: B) animation: name duration timing-function
Explanation:
The correct syntax for adding animation is:
animation: name duration timing-function
54
70. Which line of code specifies playing an animation with the same speed from
beginning to the end?
A. div {animation- timing function: linear;}
B. div {animation- timing function: ease in;}
C. div {animation- play- state: paused;}
D. div {animation- fill-mode: both;}
Answer: A) div {animation- timing function: linear;}
Explanation:
We use the animation- timing- function property to define the time an
animation uses to change from one set of CSS styles to another. When we set its
value to linear, the animation will have the same speed from start to end.
71. Which line of code represents a universal selector?
A. *{border: 2px solid red;}
B. body {border: 2px solid red;}
C. both A&B
D. None of these
Answer: A) *{border: 2px solid red;}
Explanation:
Syntax for Universal selector is:
*{CSS property}
This selector selects all the HTML elements on the page.
72. Which of the following properties specify the width of the borders?
A. border-width
B. border-style
C. border
D. Both A and C
55
Answer: D) Both A and C
Explanation:
Both border and border-width properties specify the width of the borders.
The border property is a shorthand property for border-width, border-style,
and border-color.
73. Is border-image property animatable?
A. Yes
B. No
Answer: B) No
Explanation:
The border-image property is not animatable. We cannot use this property in
defining animations and transitions.
74. What value is set to border: collapse property to define borders around
each cell? (Refer to the image)
A. collapse
B. separate
C. initial
D. inherit
Answer: B) separate
Explanation:
56
When we set the value of border:collapse property to separate, each cell will
display
its borders.
75. Which cursor property value indicates that the program is busy?
A. help
B. default
C. auto
D. wait
Answer: D) wait
Explanation:
When we set the cursor property value to wait, the cursor indicates that the
program
is busy.
76. What does this line of code explain?
p {display: flex;}
A. All the <p> elements are displayed as a block-level flex container
B. All the <p> elements are not displayed by the browser
C. All the <p> elements are displayed as a grid container
D. All the <p> elements are displayed as an inline flex container
Answer: A) All the <p> elements are displayed as a block-level flex container
77. The text-align property defines the ___ alignment of text in an element.
A. horizontal
B. vertical
C. both horizontal & vertical
D. None of these
Answer: A) horizontal
Explanation:
57
The text-align property specifies the horizontal alignment of the text.
78. Does the z-index property accept negative values?
A. Yes
B. No
Answer: A) Yes
Explanation:
The z-index property accepts both negative and positive values.
79. Which CSS property is not supported by the Firefox browser?
A. text-indent
B. scroll- behavior
C. overflow
D. viewport
Answer: D) viewport
Explanation:
The viewport property is not supported by Firefox. Chrome and Microsoft Edge
support this.
80. Which one is a fallback font?
A. Times New Roman
B. Georgia
C. Serif
D. None of these
Answer: C) Serif
Explanation:
58
One of the most commonly used fallback fonts is serif. Times New Roman and
Georgia are examples of serif.
81. Where do we store external stylesheets?
A. HTML files
B. CSS files
C. Folder
D. None of these
Answer: B) CSS files
Explanation:
External stylesheets are stored in CSS files and we can link those files in HTML
using
the <link> tag.
82. In the given line of code, identify the type of selector used.
#Main {background-color: yellow;}
A. CSS element selector
B. CSS id selector
C. Combinator selector
D. All of the above
Answer: B) CSS id selector
Explanation:
The id selector uses the id attribute of an HTML element to select a specified
element.
Syntax:
#id attribute {CSS property}
83. The Hex Code for the red color is ___.
59
A. #FF0000
B. #F0F000
C. #F0000F
D. None of these
Answer: A) #FF0000
Explanation:
Hex codes are three-byte hexadecimal numbers that are used to identify color in
HTML/CSS.
84. In CSS, what does HSL stands for?
A. hue, standard, light
B. height, standard, line-width
C. hue, saturation, lightness
D. hue, standard, line-width
Answer: C) hue, saturation, lightness
Explanation:
HSL stands for hue, saturation, lightness. In CSS, we can specify color using the
HSL
value.
85. Among the following CSS properties, which property is not a shorthand
property?
A. background
B. padding
C. display
D. border
Answer: C) display
Explanation:
The display property is not a shorthand property. It has only one property value.
60
86. In this line of code, what is the use of the alt attribute?
<img src="circle.jpg" alt="It is red">
A. Adds a text description to an image
B. Provides alternative information for an image
C. To hide an image
D. Both A & B
Answer: D) Both A & B
Explanation:
The alt attribute is used to provide alternative information for an image if a user
fails
to view an image on the webpage and also it tells us something related to the
image.
87. The CSS border property specifies the style, color, and ___ of an element's
border.
A. length
B. size
C. width
D. area
Answer: C) width
Explanation:
The CSS border properties specify the style, color, and width of an element's
border.
The border property is a shorthand property for border-width, border-style, and
border-color.
88. To get this output, the CSS properties put to use are ___.
A. display, border, align-items, justify-content
B. display, border-width, justify-content, border-color
C. margin, display, padding-left, justify-content
61
D. None of these
Answer: A) display, border, align-items, justify-content
Explanation:
Code:
border: 4px solid blue;
display: flex;
align-items: center;
justify-content: center;
89. What does 'padding: 50px 20px;' specifies?
A. top padding is 50px
B. bottom padding is 20px
C. right padding is 20px
D. Both A & C
Answer: D) Both A & C
Explanation:
This line of code specifies top and bottom paddings are "50px" & "right" and left
paddings are "20px".
90. What is the default size for normal text, like paragraphs?
A. 11px
B. 12px
C. 16px
D. 18px
Answer: C) 16px
Explanation:
If we don't specify a font size, the default size for normal texts is "16px" or
"1em".
62
JavaScript Multiple-Choice Questions (MCQs)
List of JavaScript MCQs
1. JavaScript is the programming language of the _____.
A. Desktop
B. Mobile
C. Web
D. Server
Answer: C) Web
Explanation:
JavaScript is the programming language of the Web.
Discuss this Question
2. Which type of JavaScript language is _____?
A. Object-oriented
B. Object-based
C. Functional programming
D. All of the above
Answer: B) Object-based
Explanation:
JavaScript is an object-oriented based programming language.
Discuss this Question
3. Which of the following statement(s) is true about the JavaScript?
A. It is a scripting language used to make the website interactive
B. It is an advanced version of Java for Desktop and Mobile application
development
C. It is a markup language of Java to develop the webpages
D. All of the above
63
Answer: A) It is a scripting language used to make the website interactive
Explanation:
The correct statement about the JavaScript programming language is "It is a
scripting
language used to make the website interactive".
Discuss this Question
4. In which HTML element, we put the JavaScript code?
A. <javascript>...</javascript>
B. <js>...</js>
C. <script>...</script>
D. <css>...</css>
Answer: C) <script>...</script>
Explanation:
The JavaScript code is written inside the <script>...</script> tag/element.
Discuss this Question
5. JavaScript code can be written in ____.
A. JavaScript file (.js file)
B. HTML document directly
C. JavaScript file and in HTML document directly
D. In style sheets (.css file)
Answer: C) JavaScript file and in HTML document directly
Explanation:
JavaScript code can be written in the JavaScript file and in HTML document
directly.
Discuss this Question
6. Which symbol is used separate JavaScript statements?
64
A. Comma (,)
B. Colon (:)
C. Hyphen (_)
D. Semicolon (;)
Answer: D) Semicolon (;)
Explanation:
The semicolon (;) is used to separate the JavaScript statements.
Discuss this Question
7. JavaScript ignores?
A. newlines
B. tabs
C. spaces
D. All of the above
Answer: D) All of the above
Explanation:
JavaScript ignores spaces, tabs, and newlines written in the code, we can use them
for the alignment and separate the sections to give a perfect look at our code.
Discuss this Question
8. Which is the correct syntax to call an external JavaScript file in the current
HTML document?
A. <script src="jsfile.js"></script>
B. <script href=" jsfile.js"></script>
C. <import src=" jsfile.js"></import>
D. <script link=" jsfile.js"></script>
Answer: A) <script src="jsfile.js"></script>
Explanation:
The correct syntax to call an external JavaScript file in the current HTML document
is:
65
<script src="jsfile.js"></script>
Discuss this Question
9. Which JavaScript method is used to access an HTML element by id?
A. getElementById()
B. getElement(id)
C. getElementById(id)
D. elementById(id)
Answer: C) getElementById(id)
Explanation:
The JavaScript method document.getElementById(id) is used to access an HTML
document by id.
Discuss this Question
10. Which property is used to define the HTML content to an HTML element
with a specific id?
A. innerText
B. innerContent
C. elementText
D. innerHTML
Answer: D) innerHTML
Explanation:
The innerHTML is the property that defined HTML content.
Example:
document.getElementById("notif").innerHTML = "New course
launched";
Discuss this Question
66
11. Which JavaScript method is used to write HTML output?
A. document.write()
B. document.output()
C. console.log()
D. document.writeHTML()
Answer: A) document.write()
Explanation:
The JavaScript method document.write() defines the HTML output.
Discuss this Question
12. Which JavaScript method is used to write on browser's console?
A. console.write()
B. console.output()
C. console.log()
D. console.writeHTML()
Answer: C) console.log()
Explanation:
The JavaScript method console.log() is used to write on browser's console.
Discuss this Question
13. Which JavaScript method is used to write into an alert box?
A. window.alertHTML()
B. window.alert()
C. window.alertBox()
D. window.alertContent()
Answer: B) window.alert()
Explanation:
67
The JavaScript method window.alert() is used to write into an alert box.
Discuss this Question
14. Which is the correct JavaScript statement to display "Hello Boss!" into an
alert box?
A. alert("Hello Boss!");
B. alert('Hello Boss!');
C. alert(Text:'Hello Boss!');
D. Both A. and B.
Answer: D) Both A. and B.
Explanation:
The both of statement are correct to display "Hello Boss!" into an alert box:
window.alert("Hello Boss!");
window.alert('Hello Boss!');
Discuss this Question
15. Which is the correct JavaScript statement to print the addition of two
numbers 10 and 20 in a paragraph whose id is 'result'?
A. getElementById("result").innerHTML = 10+20;
B. getElementById("result").innerHTML = "10+20";
C. getElementById("#result").innerHTML = 10+20;
D. All of the above
Answer: A) getElementById("result").innerHTML = 10+20;
Explanation:
The correct JavaScript statement to print the addition of two numbers 10 and 2o in
a
paragraph whose id is "result" is:
document.getElementById("result").innerHTML = 10+20;
Discuss this Question
68
16. What is the use of this JavaScript statement?
<button onclick="window.print()">Submit</button>
A. It will write "Submit" on the current Window
B. It will print the content of the current page
C. It will write the content of the current page in the browser’s console
D. None of the above
Answer: B) It will print the content of the current page
Explanation:
The window.print() method prints the content of the current page.
Discuss this Question
17. In JavaScript, single line comment begins with ___.
A. #
B. /*
C. $
D. //
Answer: D) //
Explanation:
In JavaScript, single line comment begins with //.
Discuss this Question
18. In JavaScript, multi-line comments start with __ and end with ___.
A. /* and */
B. <!—and -->
C. ## and ##
D. // and //
69
Answer: A) /* and */
Explanation:
In JavaScript, multi-line comments start with /* and end with */.
Discuss this Question
19. Which JavaScript keyword is used to declare a variable?
A. Var
B. var
C. Let
D. All of the above
Answer: B) var
Explanation:
The var keyword defines a variable in JavaScript.
Discuss this Question
20. How many keywords are there in JavaScript to declare variables or
constants?
A. 1
B. 2
C. 3
D. 4
Answer: C) 3
Explanation:
There are 3 ways / keywords to declare variables or constants, those are:
• var
• let
• const
Discuss this Question
70
21. What is the main difference between var and let keywords in JavaScript?
A. var defines a variable while let defines a constant
B. var defined function scoped variable while let define block scoped variable
C. The value of a variable declared with var can be changed while the value of a
variable declared with let cannot be changed
D. All of the above
Answer: B) var defined function scoped variable while let define block scoped
variable
Explanation:
The var and let keywords are both used for variable declaration in JavaScript. But,
the main difference between them is that var defines function scoped variable
while let defines block-scoped variable.
Discuss this Question
22. The const keyword is used to define a ______.
A. Function scopes variable
B. Block scoped variable
C. Constant
D. Constant with no initial value
Answer: C) Constant
Explanation:
The const keyword is used to define a constant.
Discuss this Question
23. Which is the correct syntax to declare a constant in JavaScript?
A. const constant_name;
B. constant_name const;
C. constant_name const = value;
D. const constant_name = value;
71
Answer: D) const constant_name = value;
Explanation:
The correct syntax to declare a constant is:
const constant_name = value;
Example:
const PI = 3.14;
Discuss this Question
24. What will be the value of VALUE?
<script>
const VALUE = 10;
VALUE = 20;
</script>
A. 10
B. 20
C. ValueError
D. TypeError
Answer: D) TypeError
Explanation:
We cannot change the value of a constant, thus the above code will generate a
TypeError – "TypeError: Assignment to constant variable"
Discuss this Question
25. What is the default value of an uninitialized variable?
A. 0
B. undefined
C. null
D. NaN
72
Answer: B) undefined
Explanation:
The default value of an unfinalized variable is undefined.
Discuss this Question
26. What is the output of the following JavaScript code?
<script>
var a;
document.getElementById("demo").innerHTML = a+1;
</script>
A. 0
B. undefined
C. 1
D. NaN
Answer: D) NaN
Explanation:
The output of the above JavaScript code is: NaN
Discuss this Question
27. Can be redeclare a variable that is declared with var keyword?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, we can redeclare variable that is declared with var keyword.
Discuss this Question
73
28. What is the output of the following JavaScript code?
<script>
var name = "Alex" + " " + "Alvin";
document.getElementById("demo").innerHTML = name;
</script>
A. Alex Alvin
B. AlexAlvin
C. TypeError
D. ValueError
Answer: A) Alex Alvin
Explanation:
The output of the above JavaScript code is: "Alex Alvin"
Discuss this Question
29. What is the output of the following JavaScript code?
<script>
var a = 10 + 20 + "5";
document.getElementById("demo").innerHTML = a;
</script>
A. 35
B. 305
C. TypeError
D. ValueError
Answer: B) 305
Explanation:
The output of the above JavaScript code is: 305
Discuss this Question
30. Can be redeclare a variable that is declared with let keyword?
74
A. Yes
B. No
Answer: B) No
Explanation:
No, we cannot redeclare variable that is declared with let keyword.
Discuss this Question
31. What is the output of the following JavaScript code (let example)?
<script>
let a = 10;
let a = 0;
</script>
A. 10
B. 0
C. SyntaxError
D. TypeError
Answer: C) SyntaxError
Explanation:
The output of the above JavaScript code is: "SyntaxError: 'a' has already been
declared".
Discuss this Question
32. Which is the exponentiation operator in JavaScript?
A. exp()
B. ^
C. **
D. pow
Answer: C) **
75
Explanation:
The exponentiation operator in JavaScript is ** which is used to calculate the
result of
first operand's to the power of the second operators i.e., x**y = x to the power of
y
(xy).
Discuss this Question
33. Does JavaScript support increment (++) and decrements (--) Operators?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, JavaScript supports increment (++) and decrements (--) operators.
Example:
<script>
var x = 5;
document.getElementById("test").innerHTML = ++x;
</script>
Discuss this Question
34. What will be the output of the following JavaScript code?
<script>
var x = 5;
document.getElementById("demo").innerHTML = x--;
</script>
A. 5
B. 4
C. TypeError
D. ValueError
Answer: B) 4
76
Explanation:
The output of the above statement will be 5.
In the above statement, we used post-decrement (x--). Post-decrement decreases
the value by 1 after evaluating the current statement.
Discuss this Question
35. What will be the output of the following JavaScript code?
<script>
var x = 10 + 20 * 5;
document.getElementById("tes").innerHTML = x;
</script>
A. 110
B. 150
C. TypeError
D. ValueError
Answer: A) 110
Explanation:
The output of the above statement will be 110.
In the above code, the expression is 10 + 20 * 5. The precedence of multiplication
operator (*) is higher than the addition operator (+). This 20 *5 will evaluate
first.
Discuss this Question
36. What will be the output of the following JavaScript code?
<script>
var x = (10 + 20) * 5;
document.getElementById("tes").innerHTML = x;
</script>
A. 110
B. 150
77
C. TypeError
D. ValueError
Answer: B) 150
Explanation:
The output of the above statement will be 150.
In the above code, the expression is (10 + 20) * 5. The precedence of () are higher
than any other operators This (10 + 20) will evaluate first.
Discuss this Question
37. JavaScript types are _____.
A. Static
B. Dynamic
Answer: B) Dynamic
Explanation:
JavaScript types are dynamic, which means the same variable can be used to store
the different types of values.
Discuss this Question
38. JavaScript arrays are written with _____.
A. round brackets ()
B. curly brackets {}
C. double quotes ""
D. square brackets []
Answer: D) square brackets []
Explanation:
JavaScript arrays are written with square brackets [].
Discuss this Question
78
39. JavaScript objects are written with _____.
A. round brackets ()
B. curly brackets {}
C. double quotes ""
D. square brackets []
Answer: B) curly brackets {}
Explanation:
JavaScript objects are written with curly brackets {}.
Discuss this Question
40. Which JavaScript operator is used to determine the type of a variable?
A. typeof
B. TypeOf
C. typeOf
D. sizeof
Answer: A) typeof
Explanation:
The typeof operator is used to determine the type of a variable.
Discuss this Question
41. Which is the correct syntax of JavaScript typeof operator?
A. typeof variable/value
B. typeof(variable/value)
C. Both A. and B.
D. None of the above
Answer: C) Both A. and B.
Explanation:
79
Both of the syntaxes can be used for JavaScript typeof operator.
Discuss this Question
42. What will be the output of the following JavaScript code?
<script>
var x = 12.34;
document.getElementById("test").innerHTML = typeof(x);
</script>
A. int
B. float
C. long
D. number
Answer: D) number
Explanation:
The output of the following JavaScript code is number.
Discuss this Question
43. Which keyword is used to define a JavaScript function?
A. module
B. fun
C. func
D. function
Answer: D) function
Explanation:
The function keyword is used to define the JavaScript function.
Discuss this Question
44. Which is the correct syntax for the function definition?
80
A. return_type function function_name(parameter1, parameter2, ...) { /*Function's
body*/ }
B. function function_name(parameter1, parameter2, ...) { /*Function's body*/ }
C. return_type function_name(parameter1, parameter2, ...) { /*Function's body*/ }
D. function function_name(parameter1, parameter2, ...) as return_type {
/*Function's body*/ }
Answer: B) function function_name(parameter1, parameter2, ...) { /*Function's
body*/
}
Explanation:
The function definition syntax is:
function function_name(parameter1, parameter2, ...)
{
/*Function's body*/
}
Discuss this Question
45. What will be the output of the following JavaScript code?
<script>
function addition(a, b) {
return a+b;
}
document.getElementById("test").innerHTML = addition;
</script>
A. SyntaxError
B. ValueError
C. 0
D. function addition(a, b) { return a+b; }
Answer: D) function addition(a, b) { return a+b; }
Explanation:
Calling of a function without () will return the function definition i.e., function
object
instead of the result.
Discuss this Question
81
46. Can we use a function as a variable value?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, a function can be used as a variable value.
Discuss this Question
47. In JavaScript a variable contains one value while an object may contain ___.
A. One value
B. Two values
C. Three values
D. Many values
Answer: D) Many values
Explanation:
In JavaScript a variable contains one value while an object may contain many
values.
Discuss this Question
48. Which is the correct syntax to access an object property in JavaScript?
A. objectName:propertyName
B. propertyName
C. objectName["propertyName"]
D. Both B. and C.
Answer: D) Both B. and C.
Explanation:
82
The properties of an object can we accessed using
either objectName.propertyName or objectName["propertyName"].
Discuss this Question
49. Which property is used to get the length of a string in JavaScript?
A. strlen
B. len
C. length
D. Length
Answer: C) length
Explanation:
The length property is used to get the length of a string in JavaScript.
Discuss this Question
50. What will be the output of the following JavaScript code?
<script>
let str = "IncludeHelp";
document.getElementById("test").innerHTML = str.length;
</script>
A. 11
B. 12
C. ValueError
D. SyntaxError
Answer: A) 11
Explanation:
The output of the above statement will be the length of the string. That is 11.
Discuss this Question
83
51. Which character is used to break up a code line within a text string in
JavaScript?
A. Single quote (')
B. Single backslash (\)
C. Double quote (")
D. Tipple single quote (''')
Answer: B) Single backslash (\)
Explanation:
The Single backslash (\) is used to break up a code line within a text string in
JavaScript.
Example:
document.getElementById("test").innerHTML = "Hello \
IncludeHelp!";
Discuss this Question
52. Will the following JavaScript code work?
<script>
document.getElementById("test").innerHTML = \
"Hello, IncludeHelp!";
</script>
A. Yes
B. No
Answer: B) No
Explanation:
No, the above code will not work. Because, we cannot breakup a JavaScript code line
with single backslash (\).
Discuss this Question
84
53. Which is the correct JavaScript statement to define string as object?
A. var s = new String("IncludeHelp!");
B. var s = String("IncludeHelp!");
C. var s = "IncludeHelp!"
D. All of the above
Answer: A) var s = new String("IncludeHelp!");
Explanation:
The strings can also be defined as an object using the new keyword. The correct
JavaScript statement to define a string as an object is:
var s = new String("IncludeHelp!");
Discuss this Question
54. What will be the output of the following JavaScript code?
<script>
let str1 = new String("IncludeHelp!");
let str2 = new String("IncludeHelp!");
document.getElementById("test").innerHTML = (str1==str2);
</script>
A. true
B. false
C. True
D. False
Answer: B) false
Explanation:
In the above code, str1 and str2 are the objects. And. In the JavaScript,
comparison
of two objects returns false.
Discuss this Question
55. Which is/are the valid JavaScript method(s) to extract string parts?
85
A. slice(start, end)
B. substring(start, end)
C. substr(start, length)
D. All of the above
Answer: D) All of the above
Explanation:
The all of the above JavaScript methods can be used to extract string parts.
Discuss this Question
56. What will be the output of the following JavaScript code?
<script>
let x = "Hello, IncludeHelp!";
document.getElementById("test").innerHTML = x.slice(-13,-1);
</script>
A. IncludeHelp!
B. IncludeHelp
C. ValueError
D. Hello,
Answer: B) IncludeHelp
Explanation:
The negative value counts from the end of the string. Thus, the output will
be "IncludeHelp".
Discuss this Question
57. In JavaScript, the string template literals use ____ rather than the quotes
("")
to define a string?
A. Single quotes ('')
B. Backslash with single quote (\’'\')
C. Backslashes (\\)
D. Back-ticks (``)
86
Answer: D) Back-ticks (``)
Explanation:
In JavaScript, the string template literals use back-ticks (``) rather than the
quotes
("") to define a string.
Discuss this Question
58. Does the following JavaScript variable definition is correct?
let x = `I'm "David!"`;
A. Yes
B. No
Answer: A) Yes
Explanation:
The JavaScript variable definition statement is true. Because, with the JavaScript
template literals, we can use both single and double quotes inside a string.
Discuss this Question
59. Which JavaScript method is used to get a number as a string?
A. toString()
B. intToString()
C. parseInteger()
D. All of the above
Answer: A) toString()
Explanation:
The JavaScript method toString() is used to get a number as a string.
Discuss this Question
87
60. What will be the output of the following JavaScript code?
<script>
const myArray = ['h', 'e', 'l', 'l', 'o'];
document.write(myArray[0]);
document.write(myArray[1]);
</script>
A. he
B. undefinedh
C. ValueError
D. TypeError
Answer: A) he
Explanation:
In JavaScript, the array indexing starts with 0. Thus, the above statement with
print
"h" and "e".
Discuss this Question
61. What will be the output of the following JavaScript code?
<script>
let cars = ['Honda', 'Hyundai'];
cars.push('Mahindra');
document.write(typeof cars + " " + cars);
</script>
A. array Honda,Hyundai,Mahindra
B. string Honda,Hyundai,Mahindra
C. object Honda,Hyundai,Mahindra
D. object "Honda", "Hyundai", "Mahindra"
Answer: C) object "Honda", "Hyundai", "Mahindra"
Explanation:
The push() method pushes an element at the end of the array. And, typeof returns
the type of the object. Here, cars is an array.
Discuss this Question
88
62. What will be the output of the following JavaScript code?
<script>
let cars1 = ['Honda', 'Hyundai'];
let cars2 = cars1;
cars1.push('Mahinda');
document.write(cars1 + "---" + cars2);
</script>
A. Honda,Hyundai,Mahinda---Honda,Hyundai
B. Honda,Hyundai,Mahinda---Honda,Hyundai,Mahinda
C. Honda,Hyundai ---Honda,Hyundai
D. [Honda,Hyundai,Mahinda]---[Honda,Hyundai,Mahinda]
Answer: B) Honda,Hyundai,Mahinda---Honda,Hyundai,Mahinda
Explanation:
In the JavaScript, the arrays are objects, and the array elements are stored by
reference. Hence, when an array value is copied, any change in the copied array
will
also reflect in the original array. Thus, the values of cars1 and cars2 are the
same.
Discuss this Question
63. What will be the output of the following JavaScript code?
<script>
var msgs=new Array("Hello","Hey","Morning!");
for (i=0;i<msgs.length;i++){
document.write(msgs[i] + " | ");
}
</script>
A. Hello | Hey | Morning! |
B. Hello | Hey |
C. ValueError
D. TypeError
Answer: A) Hello | Hey | Morning! |
89
Explanation:
In the above JavaScript code, the array is declared using the new operator and all
elements are printing using the loop. Thus, the output would be "Hello | Hey |
Morning! |".
Discuss this Question
64. What will be the output of the following JavaScript code?
<script>
var values = [10, 20, 30, 40];
var result = values.reduceRight(function(x,y){
return (x + y);
});
document.write("Result: " + result);
</script>
A. Result: 40
B. Result: 70
C. Result: 90
D. Result: 100
Answer: D) Result: 100
Explanation:
In the above JavaScript code, we used the reduceRight() method which is used to
reduce the given array elements into a single value by executing a reducer
function.
The reducer() function is applied against the accumulator and reduces all the
elements from right to left. Thus, the output would be "Result: 100".
Discuss this Question
65. What will be the output of the following JavaScript code?
<script>
var cars = ["Honda","Hyundai","Mahindra"];
var result = cars.shift();
90
document.writeln("Result: ", cars);
</script>
A. Result: Honda,Hyundai,Mahindra
B. Result: Honda
C. Result: Hyundai,Mahindra
D. Result: Honda,Mahindra
Answer: C) Result: Hyundai,Mahindra
Explanation:
In the above JavaScript code, we used the shift() method which is used to remove
the first element of the given array and return that element. This method changes
the length of the original array. Thus, the output would be "Result:
Hyundai,Mahindra".
Discuss this Question
66. What will be the output of the following JavaScript code?
<script>
var cars = ["Honda","Hyundai","Mahindra"];
var result = cars.unshift("Toyota", "Tata");
document.writeln("[", result, "] ", cars);
</script>
A. [5] Toyota,Tata,Honda,Hyundai,Mahindra
B. [5]Honda,Hyundai,Mahindra,Toyota,Tata
C. [2] Toyota,Tata
D. [5] Honda,Hyundai,Toyota,Tata,Mahindra
Answer: A) [5] Toyota,Tata,Honda,Hyundai,Mahindra
Explanation:
In the above JavaScript code, we used unshift() method which is used to add one
or more elements in the beginning of the given array and returns the updated array.
This method changes the length of the original array. Thus, the output would be
"[5]
Toyota,Tata,Honda,Hyundai,Mahindra".
91
Discuss this Question
67. Which JavaScript method is used to call a function (a callback function)
once for each array element?
A. for()
B. traverse()
C. forEach()
D. foreach()
Answer: C) forEach()
Explanation:
The JavaScript method forEach() is used to call a function (a callback function)
once for each array element.
Discuss this Question
68. What will be the output of the following JavaScript code?
<script>
const arr = [10, 20, 30];
let result = 0;
arr.forEach(myFunction);
document.write("Result: " , result)
function myFunction(value, index, array) {
result += value;
}
</script>
A. Result: 60
B. Result: 102030
C. Result: 10,20,30
D. ValueError
Answer: A) Result: 60
Explanation:
92
In the above JavaScript code, we used the forEach() method which is used to call a
function (a callback function) once for each array element, and in the callback
function, we are adding the elements of the array. Thus, the output would be
"Result:
60".
Discuss this Question
69. What will be the output of the following JavaScript code?
<script>
const values = [10, 20, 30];
const result = values.map(myFunction);
document.write("Result: ", result);
function myFunction(value, index, array) {
return value * value;
}
</script>
A. Result: 10,20,30
B. Result: 10*10,20*20,30*30
C. Result: 100,400,900
D. ValueError
Answer: C) Result: 100,400,900
Explanation:
In the above JavaScript code, we used the map() method which is used to create a
new array by performing a function on each array element, and in
the myFunction() we are multiplying the elements with the same value. Thus, the
output would be "Result: 100,400,900".
Discuss this Question
70. Which JavaScript method is used to create a new array with array elements
that passes a test?
A. forEach()
B. map()
C. forMap()
93
D. filter()
Answer: D) filter()
Explanation:
The JavaScript method filter() is used to create a new array with array elements
that pass a test.
Discuss this Question
71. Which JavaScript object works with the dates?
A. Date
B. DateTime
C. date
D. dateTime
Answer: A) Date
Explanation:
The JavaScript Date object works with the dates.
Discuss this Question
72. Which JavaScript statement(s) is correct to create Date object(s) with new
Date() constructor?
A. new Date()
B. new Date(year, month, day, hours, minutes, seconds, milliseconds)
C. new Date(milliseconds)
D. new Date(date string)
E. All of the above
Answer: E) All of the above
Explanation:
All of the above statements are correct to create Date objects with new
Date() constructor.
94
Discuss this Question
73. What will be the output of the following JavaScript code?
<script>
const curr = new Date();
document.write(curr);
</script>
A. Tue Dec 21 2021 13:04:36 GMT+0530
B. Tue Dec 21 2021 13:04:36 (India Standard Time)
C. Tue Dec 21 2021 13:04:36::00::01 GMT+0530 (India Standard Time)
D. Tue Dec 21 2021 13:04:36 GMT+0530 (India Standard Time)
Answer: D) Tue Dec 21 2021 13:04:36 GMT+0530 (India Standard Time)
Explanation:
The above JavaScript code will print the current date & time in the format of Tue
Dec 21 2021 13:04:36 GMT+0530 (India Standard Time).
Discuss this Question
74. Which JavaScript method is used to convert a date to a UTC string (a date
display standard)?
A. toUTCString()
B. toUtcString()
C. utcString()
D. toutcstring()
Answer: A) toUTCString()
Explanation:
The JavaScript method toUTCString() is used to convert a date to a UTC string (a
date display standard).
Discuss this Question
95
75. The internal clock in JavaScript counts from midnight _____.
A. January 1, 1972
B. January 1, 1947
C. January 1, 1980
D. January 1, 1970
Answer: D) January 1, 1970
Explanation:
The internal clock in JavaScript counts from midnight January 1, 1970.
Discuss this Question
76. What does the Date object's method getTime() return?
A. Date in DD-MM-YYYY format
B. Date in DD MON YYYY format
C. Date in MON, DD YYYY format
D. Number of milliseconds since January 1, 1970
Answer: D) Number of milliseconds since January 1, 1970
Explanation:
The Date object's method getTime() returns the number of milliseconds since
January 1, 1970.
Discuss this Question
77. Which method is used to get the year of a date as a four-digit number?
A. getYear()
B. fullYear()
C. getFullYear()
D. getfullyear()
Answer: C) getFullYear()
Explanation:
96
The getFullYear() method is used to get the year of a date as a four-digit number.
Discuss this Question
78. What will be the output of the following JavaScript code?
<script>
document.write(Math.round(107.5))
</script>
A. 107.5
B. 107
C. 108
D. 107.00
Answer: C) 108
Explanation:
The Math.round(x) returns the value of x rounded to its nearest integer. Thus, the
output would be 108.
Discuss this Question
79. What will be the output of the following JavaScript code?
<script>
try{
const cars = {
company: 'Honda'
};
delete cars.company;
document.write(cars.company);
}
catch (err){
document.write(err.message);
}
</script>
A. undefined
B. Honda
97
C. ValueError
D. TypeError
Answer: A) undefined
Explanation:
In the above JavaScript code, the statement delete cars.company; will delete the
property. Thus, the output would be "undefined".
Discuss this Question
80. What will be the output of the following JavaScript code?
<script>
try{
const cars = {
company: 'Honda'
};
Object.seal(cars);
delete cars.company;
document.write(cars.company);
}
catch (err){
document.write(err.message);
}
</script>
A. undefined
B. Honda
C. ValueError
D. TypeError
Answer: B) Honda
Explanation:
In the above JavaScript code, we have sealed the object and the seal property does
not allow the object to be deleted. Hence, the property company will not be
deleted.
Discuss this Question
98
81. What will be the output of the following JavaScript code?
<script>
let x = "10";
let y = + x;
document.write(typeof y);
</script>
A. string
B. object
C. undefined
D. number
Answer: D) number
Explanation:
In JavaScript, the unary + operator can be used to convert a variable to a number.
Hence, the statement let y = + x; will convert variable to number.
Discuss this Question
82. What will be the output of the following JavaScript code?
<script>
let x = 10;
document.write(typeof x, " , ", typeof String(x));
</script>
A. number , string
B. number , number
C. object , string
D. object , object
Answer: A) number , string
Explanation:
In the above JavaScript code, we are using the String() method which is a global
method to convert numbers to string. Thus, the statement typeof String(x) will
return string.
99
Discuss this Question
83. What will be the output of the following JavaScript code?
<script>
let x = 10;
document.write(x, " , ", toString(x));
</script>
A. 10 , 10
B. 10 , undefined
C. 10 , [object Undefined]
D. None of the above
Answer: C) 10 , [object Undefined]
Explanation:
In the above JavaScript code, the statement toString(x) will not convert number to
string because toString() is not a global method, it is a Number method and the
correct way is to call this function is x.toString().
jQuery Multiple-Choice Questions (MCQs)
List of jQuery MCQs
1. jQuery is a ______.
A. JavaScript Library
B. JSON Library
C. Java Library
D. JSON and CSS Library
Answer: A) JavaScript Library
Explanation:
jQuery is a JavaScript Library.
2. To work with jQuery, you should have the basic knowledge of these topics?
100
A. HTML
B. CSS
C. JavaScript
D. All of the above
Answer: D) All of the above
Explanation:
To work with jQuery, you should have the basic knowledge of HTML, CSS, and
JavaScript.
3. Who developed jQuery?
A. John Richard
B. John Resig
C. John Carter
D. John Alexander
Answer: B) John Resig
Explanation:
John Resig developed jQuery.
4. In which year jQuery was initial released?
A. 2004
B. 2005
C. 2006
D. 2007
Answer: C) 2006
Explanation:
jQuery was initial released on August 26, 2006.
5. Is jQuery case-sensitive?
101
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, jQuery is case-sensitive.
6. Which feature(s) jQuery contains?
A. HTML/DOM manipulation
B. CSS manipulation
C. HTML event methods
D. Effects and animations
E. AJAX
F. Utilities
G. All of the above
Answer: G) All of the above
Explanation:
All of the above features jQuery contains.
7. Which sign is used to define/access jQuery?
A. $
B. .
C. &
D. #
Answer: A) $
Explanation:
$ sign is used to define/access jQuery.
8. Which jQuery is used to hide the current element?
102
A. $(this).hideelement()
B. $(this).hide('true')
C. $(this).hide(0)
D. $(this).hide()
Answer: D) $(this).hide()
Explanation:
The $(this).hide() method is used to hide the current element.
9. Which is the correct jQuery statement to hide all <div> elements?
A. $("div").hide()
B. $(div).hide()
C. $(".div").hide()
D. $("#div").hide()
Answer: A) $("div").hide()
Explanation:
The $("div").hide() statement can be used to hide all <div> elements.
10. Which is the correct jQuery statement to hide all elements having class
name "new"?
A. $("new").hide()
B. $(new).hide()
C. $(".new").hide()
D. $("#new").hide()
Answer: C) $(".new").hide()
Explanation:
The $(".new").hide() statement can be used to hide all elements having class
name "new".
103
11. Which is the correct jQuery statement to hide all elements having id name
"new"?
A. $("new").hide()
B. $(new).hide()
C. $(".new").hide()
D. $("#new").hide()
Answer: D) $("#new").hide()
Explanation:
The $("#new").hide() statement can be used to hide all elements having id name
"new".
12. What is the use of jQuery Selectors?
A. jQuery selectors are used to select and manipulate HTML element(s).
B. jQuery selectors are used to import the HTML elements from the other file.
C. jQuery selectors are used to select and manipulate JSON elements(s).
D. jQuery selectors are used to select and manipulate ReactJS classes.
Answer: A) jQuery selectors are used to select and manipulate HTML element(s)
Explanation:
jQuery selectors are used to select and manipulate HTML element(s).
13. Which is the correct jQuery selector statement to select all <div> elements?
A. $(".div")
B. $("#div")
C. $("div")
D. $("<div>")
Answer: C) $("div")
Explanation:
The statement $("div") is the correct syntax to select all <div> elements.
104
14. Which sign is used for class selector?
A. $class
B. .class
C. #class
D. None
Answer: C) .class
Explanation:
The dot sign (.) i.e., .class is used for the class selector.
15. Which sign is used for id selector?
A. $id
B. .id
C. #id
D. None
Answer: C) #id
Explanation:
The hash sign (#) i.e., #id is used for the id selector.
16. Why #id selectors are used for?
A. To select all elements having the id
B. To select all elements without having the id
C. To select all elements having the id within a specified <div>
D. To select all elements having the id within a specified section.
Answer: C) To select all elements having the id within a specified <div>
Explanation:
The #id selectors are used to select all elements having the id.
105
17. Which is the correct jQuery selector to select all elements?
A. $("all")
B. $("*.*")
C. $("*")
D. $("***")
Answer: C) $("*")
Explanation:
The $("*") selector is used to select all elements.
18. Which is the correct jQuery selector to select current HTML element?
A. $(this)
B. $(cur)
C. $(.this)
D. $(#this)
Answer: A) $(this)
Explanation:
The $(this) selector is used to select current HTML elements.
19. Which is the correct jQuery selector to select all <div> elements with class
name "new"?
A. $(".new")
B. $("div.new")
C. $(".div.new")
D. $(".div#new")
Answer: B) $("div.new")
Explanation:
The $("div.new") selector is used to select all <div> elements with class name
"new".
106
20. Which is the correct jQuery selector to select the first HTML element?
A. $("element_name.first")
B. $("element_name#first")
C. $("element_name::first")
D. $("element_name:first")
Answer: D) $("element_name:first")
Explanation:
The $("element_name:first") selector is used to select the first HTML element.
21. Which is the correct jQuery selector to select the first <div> of the HTML
document?
A. $("div.first")
B. $("div#first")
C. $("div::first")
D. $("div:first")
Answer: D) $("div:first")
Explanation:
The $("div:first") selector is used to select the first <div> of the HTML
document.
22. Which is the correct jQuery selector to select the first list item of <ul>
element?
A. $("ul li:first")
B. $("ul:first")
C. $("li:first")
D. $("ul.li:first")
Answer: A) $("ul li:first")
Explanation:
107
The $("ul li:first") selector is used to select the first list item of <ul>
element.
23. Which is the correct jQuery selector to select the first list item of every
<ul>
element?
A. $("ul li:first-child")
B. $("ul li:first.*")
C. $("li:first-child")
D. $("ul:first-child")
Answer: A) $("ul li:first-child")
Explanation:
The $("ul li:first-child") selector is used to select the first list item of
every <ul> element.
24. Which is the correct jQuery selector to select all elements having "href"
attribute?
A. $("a.[href]")
B. $("a:[href]")
C. $("[href].*")
D. $("[href]")
Answer: D) $("[href]")
Explanation:
The $("[href]") selector is used to select all elements having href attribute.
25. Which is the correct jQuery selector to select all <button> elements and
<input> elements with type="input"?
A. $(".button")
B. $(":button")
C. $("button","input type="button")
D. $(":button,:input")
108
Answer: B) $(":button")
Explanation:
The $(":button") selector is used to select all <button> elements
and <input> elements with type="input".
26. Which is the correct jQuery selector to select all even table rows?
A. $("tr::even")
B. $("tr.even")
C. $("tr:even")
D. $("tr:#even")
Answer: C) $("tr:even")
Explanation:
The $("tr:even") selector is used to select all even table rows.
27. Which is the correct jQuery selector to select all odd table rows?
A. $("tr::odd")
B. $("tr.odd")
C. $("tr:odd")
D. $("tr:#odd")
Answer: C) $("tr:odd")
Explanation:
The $("tr:odd") selector is used to select all odd table rows.
28. Which method is used to attach an event handler function to an HTML
element on mouse click?
A. click()
B. Click()
C. dblclick()
109
D. DblClick()
Answer: A) click()
Explanation:
The jQuery method click() is used to attach an event handler function to an HTML
element on mouse click.
29. Which method is used to attach an event handler function to an HTML
element on mouse double click?
A. click()
B. Click()
C. dblclick()
D. DblClick()
Answer: C) dblclick()
Explanation:
The jQuery method dblclick() is used to attach an event handler function to an
HTML element on mouse double click.
30. Which method is used to attach an event handler function to an HTML
element when the mouse pointer enters the HTML element?
A. mouseover()
B. mousevisit()
C. mouse-enter()
D. mouseenter()
Answer: D) mouseenter()
Explanation:
The jQuery method mouseenter() is used to attach an event handler function to an
HTML element when the mouse pointer enters the HTML element.
110
31. Which method is used to attach an event handler function to an HTML
element when the mouse pointer leaves the HTML element?
A. mouseLeave()
B. mouseleave()
C. mouse-leave()
D. mouseexit()
Answer: B) mouseleave()
Explanation:
The jQuery method mouseleave() is used to attach an event handler function to an
HTML element when the mouse pointer leaves the HTML element.
32. Which method is used to attach an event handler function to an HTML
element when the left, middle or right mouse button is pressed down, while the
mouse is over the HTML element?
A. mousedown()
B. mouseover()
C. mousepress()
D. mousekey()
Answer: A) mousedown()
Explanation:
The jQuery method mousedown() is used to attach an event handler function to an
HTML element when the left, middle or right mouse button is pressed down, while
the mouse is over the HTML element.
33. Which method is used to attach an event handler function to an HTML
element when the left, middle or right mouse button is released, while the
mouse is over the HTML element?
A. mouseup()
B. mouseover()
C. mouseabove()
D. mousekey()
111
Answer: A) mouseup()
Explanation:
The jQuery method mouseup() is used to attach an event handler function to an
HTML element when the left, middle or right mouse button is released, while the
mouse is over the HTML element.
34. Which method is used to attach an event handler function to an HTML
element when the mouse moves over the HTML elements?
A. mousemove()
B. mouseover()
C. hover()
D. mousehover()
Answer: C) hover()
Explanation:
The jQuery method hover() is used to attach an event handler function to an HTML
element when the mouse moves over the HTML elements.
35. Which method is used to attach an event handler function to an HTML
element when the form field gets focus?
A. focused()
B. focuses()
C. focuselement()
D. focus()
Answer: D) focus()
Explanation:
The jQuery method focus() is used to attach an event handler function to an HTML
element when the form field gets focus.
112
36. Which method is used to attach an event handler function to an HTML
element when the form field loses focus?
A. blur()
B. leave()
C. focusleave()
D. leavefocus()
Answer: A) blur()
Explanation:
The jQuery method blur() is used to attach an event handler function to an HTML
element when the form field loses focus.
37. Which method is used to attach one or more event handlers for the selected
elements?
A. at()
B. atelements()
C. on()
D. focuson()
Answer: C) on()
Explanation:
The jQuery method on() is used to attach one or more event handlers for the
selected elements.
38. What is the use of jQuery method toggle()?
A. To hide shown elements and to show hidden elements
B. To remove current element
C. To shift current element at the previous position
D. All of the above
Answer: A) To hide shown elements and to show hidden elements
Explanation:
113
The toggle() method is used to hide the shown elements and to show the hidden
elements.
39. Which jQuery method is used to fade in a hidden element?
A. fade()
B. fadeIn()
C. fadeOut()
D. fadeToggle()
Answer: B) fadeIn()
Explanation:
The jQuery fadeIn() method is used to fade in a hidden element.
40. What is the syntax of jQuery fadeIn() method?
A. $(selector).fadeIn();
B. $(selector).fadeIn(callback, speed);
C. $(selector).fadeIn(callback);
D. $(selector).fadeIn(speed,callback);
Answer: D) $(selector).fadeIn(speed,callback);
Explanation:
The syntax of jQuery method fadeIn() is:
$(selector).fadeIn(speed,callback);
41. Which jQuery method is used to fade out a visible element?
A. fadeout()
B. fadeIn()
C. fadeOut()
D. fadeToggle()
Answer: C) fadeOut()
114
Explanation:
The jQuery fadeOut() method is used to fade out a visible element.
42. What is the syntax of jQuery fadeOut() method?
A. $(selector).fadeOut();
B. $(selector).fadeOut(callback, speed);
C. $(selector).fadeOut(callback);
D. $(selector).fadeOut(speed,callback);
Answer: D) $(selector).fadeOut(speed,callback);
Explanation:
The syntax of jQuery method fadeOut() is:
$(selector).fadeOut(speed,callback);
43. Which jQuery method toggles between the fadeIn() and fadeOut()
methods?
A. toggle()
B. Toggle()
C. fadeToggle()
D. fadetoggle()
Answer: C) fadeToggle()
Explanation:
The jQuery fadeToggle() method toggles between
the fadeIn() and fadeOut() methods.
44. What is the syntax of jQuery fadeToggle() method?
A. $(selector).fadeToggle();
B. $(selector).fadeToggle(callback, speed);
C. $(selector).fadeToggle(callback);
115
D. $(selector).fadeToggle(speed,callback);
Answer: D) $(selector).fadeToggle(speed,callback);
Explanation:
The syntax of jQuery method fadeToggle() is:
$(selector).fadeToggle(speed,callback);
45. Which jQuery method allows fading to a given opacity (value between 0
and 1)?
A. fade()
B. fadeOpacity()
C. fadeTo()
D. fadeto()
Answer: C) fadeTo()
Explanation:
The jQuery fadeTo() method allows fading to a given opacity (value between 0 and
1).
46. Which is the correct jQuery statement to fade out a <p> element?
A. $("p").fadeOut();
B. $("#p").fadeOut();
C. $(".p").fadeOut();
D. $("p").fadeout();
Answer: A) $("p").fadeOut();
Explanation:
The jQuery statement to fade out a p elements is:
$("p").fadeOut();
116
47. Which is the correct jQuery statement to fade out a <p> element with
duration effect "slow"?
A. $("p").fadeOut("slow");
B. $("#p").fadeOut("slow");
C. $(".p").fadeOut("slow");
D. $("p").fadeout();
Answer: A) $("p").fadeOut("slow");
Explanation:
The jQuery statement to fade out a <p> elements with duration effect "slow" is:
$("p").fadeOut("slow");
48. Which jQuery method is used to slide down an element?
A. slideBottom()
B. slideDown()
C. slidedown()
D. slide()
Answer: B) slideDown()
Explanation:
The jQuery slideDown() method is used to slide down an element.
49. Which jQuery method is used to slide up an element?
A. slideUp()
B. slideBottom()
C. slidebottom()
D. slide()
Answer: A) slideUp()
Explanation:
The jQuery slideUp() method is used to slide up an element.
117
50. Which jQuery method toggles between the slideDown() and slideUp()
methods?
A. slide ()
B. slideSwitch()
C. slidetoggle()
D. slideToggle()
Answer: D) slideToggle()
Explanation:
The jQuery slideToggle() method toggles between
the slideDown() and slideUp() methods.
51. Which jQuery method is used to create custom animations?
A. animation()
B. slidAnimate()
C. animate()
D. SlideAnimate()
Answer: C) animate()
Explanation:
The jQuery animate() method is used to create custom animations.
52. What is the correct syntax of animate() method?
A. $(selector).animate({params},speed,callback);
B. $(#selector).animate({params},speed,callback);
C. $(selector).animate(speed,callback);
D. $(selector).animate({speed,callback,params});
Answer: A) $(selector).animate({params},speed,callback);
Explanation:
118
The correct syntax of animate() method is:
$(selector).animate({params},speed,callback);
53. In the syntax of animate() method, why params parameter is used?
A. It is used to define the speed of the animation
B. It is used to define the mouse events on the HTML element
C. It is used to define the CSS property to be animated
D. None of the above
Answer: C) It is used to define the CSS property to be animated
Explanation:
The params parameter of jQuery animate() method is used to define the CSS
property to be animated.
54. In the syntax of animate() method, what is/are the valid value(s) of speed
parameter?
A. slow
B. fast
C. milliseconds
D. All of the above
Answer: D) All of the above
Explanation:
The following are the correct value of the speed parameter are:
• slow
• fast
• milliseconds
55. Which jQuery method is used to stop an animation before it is finished?
A. animate(false)
119
B. animate('false')
C. animate("false")
D. stop()
Answer: D) stop()
Explanation:
The jQuery method stop() is used to stop an animation before it is finished.
56. What is the correct syntax of stop() method?
A. $(selector).stop(stopAll,goToEnd);
B. $(selector).stop(speed,callback);
C. $(selector).stop(stopAll,goToEnd,callback);
D. $(selector).stop(stopAll,speed);
Answer: A) $(selector).stop(stopAll,goToEnd);
Explanation:
The correct syntax of stop() method is:
$(selector).stop(stopAll,goToEnd);
57. In jQuery DOM, what does DOM stand for?
A. Data Object Model
B. Document Object Manipulation
C. Document Object Model
D. Document On Model
Answer: D) Document Object Model
Explanation:
In jQuery DOM, DOM stands for Document Object Model.
120
58. Which jQuery DOM method is used to set or return the text content of
selected elements?
A. content()
B. text()
C. html()
D. val()
Answer: B) text()
Explanation:
The jQuery DOM method text() is used to set or return the text content of selected
elements.
59. Which jQuery DOM method is used to set or return the content of selected
elements (including HTML markup)?
A. content()
B. text()
C. html()
D. val()
Answer: C) html()
Explanation:
The jQuery DOM method html() is used to set or return the content of selected
elements (including HTML markup).
60. Which jQuery DOM method is used to set or return the value of form fields?
A. content()
B. text()
C. html()
D. val()
Answer: D) val()
Explanation:
121
The jQuery DOM method val() is used to set or return the value of form fields.
61. Which is the correct jQuery statement to get the text content of an HTML
element having id "notification"?
A. $("notification").text()
B. $("#notification").text()
C. $(".notification").text()
D. $("#notification").val()
Answer: B) $("#notification").text()
Explanation:
The jQuery statement $("#notification").text() will return the text content of
the HTML document having id "notification".
62. Which jQuery DOM method is used to get the attribute value?
A. attr()
B. attribute()
C. attrib()
D. val()
Answer: A) attr()
Explanation:
The jQuery DOM method attr() is used to get the attribute value.
63. Which is the correct jQuery statement to get the value "href" attribute
having id "top"?
A. $("top").attr("href")
B. $(".top").attr("href")
C. $("$top").attr("href")
D. $("#top").attr("href")
Answer: D) $("#top").attr("href")
122
Explanation:
The jQuery statement $("#top").attr("href") will return the the
value href attribute having id "top".
64. Which jQuery DOM method is used to insert content at the end of the
selected elements?
A. insert()
B. add()
C. append()
D. appendValue()
Answer: C) append()
Explanation:
The jQuery DOM method append() is used to insert content at the end of the
selected elements.
65. Which jQuery DOM method is used to insert content at the beginning of the
selected elements?
A. insert()
B. before()
C. append()
D. prepend()
Answer: D) prepend()
Explanation:
The jQuery DOM method prepend() is used to insert content at the beginning of
the selected elements.
66. Which jQuery DOM method is used to insert content after the selected
elements?
A. after()
123
B. postpend()
C. addafter()
D. prepend()
Answer: A) after()
Explanation:
The jQuery DOM method after() is used to insert content after the selected
elements.
67. Which jQuery DOM method is used to insert content before the selected
elements?
A. before()
B. addbefore()
C. addprepend()
D. prepend()
Answer: A) before()
Explanation:
The jQuery DOM method before() is used to insert content before the selected
elements.
68. Which is the correct syntax to insert content at the end of the <p>
elements?
A. $("#p").append("Text to be added");
B. $("p").before("Text to be added");
C. $("p").append("Text to be added");
D. $("p").prepend("Text to be added");
Answer: C) $("p").append("Text to be added");
Explanation:
The correct syntax to insert content at the end of the <p> elements is:
$("p").append("Text to be added");
124
69. Which is the correct syntax to insert content at the beginning of the <p>
elements?
A. $("#p").before("Text to be added");
B. $("p").addafter("Text to be added");
C. $("p").after("Text to be added");
D. $("p").prepend("Text to be added");
Answer: D) $("p").prepend("Text to be added");
Explanation:
The correct syntax to insert content at the beginning of the <p> elements is:
$("p").prepend("Text to be added");
70. Which is the correct syntax to insert content after the <div> elements?
A. $("div").after("Text to be added");
B. $("div").postpend("Text to be added");
C. $("div").addafter("Text to be added");
D. $("#div").after("Text to be added");
Answer: A) $("div").after("Text to be added");
Explanation:
The correct syntax to insert content after the <div> elements is:
$("div").after("Text to be added");
71. Which is the correct syntax to insert content before the <div> elements?
A. $("div").before("Text to be added");
B. $("div").pretpend("Text to be added");
C. $("div").addbefore("Text to be added");
D. $("#div").before("Text to be added");
Answer: A) $("div").before("Text to be added");
125
Explanation:
The correct syntax to insert content before the <div> elements is:
$("div").before("Text to be added");
72. What is the difference between remove() and empty() methods?
A. remove() removes the selected element and its child elements while empty()
removes the child elements of the selected element
B. remove() removes the child elements of the selected element while empty()
removes the selected elements and its child elements
C. remove() removes the child elements while empty() removes the content of
the selected element
D. remove() removes the child elements while empty() removes the content of
the selected element and its child elements
Answer: A) remove() removes the selected element and its child elements while
empty() removes the child elements of the selected element
Explanation:
The difference between remove() and empty() methods is: remove() removes the
selected element and its child elements while empty() removes the child elements of
the selected element.
73. Write a jQuery statement to remove all child elements only from the
element having id "notif"?
A. $("notif").empty();
B. $("#notif").empty();
C. $(".notif").empty();
D. $("<notif>").empty();
Answer: B) $("#notif").empty();
Explanation:
The jQuery statement to remove all child elements only from the element having id
"notif" is:
126
$("#notif").empty();
74. Write a jQuery statement to remove all <p> elements with class="prog"?
A. $(".prog").remove();
B. $("p").empty(".prog");
C. $("p").remove(".prog");
D. $("p.prog").remove();
Answer: C) $("p").remove(".prog");
Explanation:
The jQuery statement to removes all <p> elements with class="prog" is:
$("p").remove(".prog");
75. Write a jQuery statement to remove all <pre> elements with class="prog"
and class="old"?
A. $(".prog#old").remove();
B. $("pre").empty(".prog",".old");
C. $("pre").remove(".prog, .old");
D. $("pre.prog.old").remove();
Answer: C) $("pre").remove(".prog, .old");
Explanation:
The jQuery statement to remove all <pre> elements
with class="prog" and class="old" is:
$("pre").remove(".prog, .old");
76. Which method is used to add CSS class to the selected elements?
A. add()
B. addClass()
127
C. addClasses()
D. AddClasses()
Answer: B) addClass()
Explanation:
The jQuery method addClass() is used to add CSS class to the selected elements.
77. Can we add more than one CSS classes to the selected elements using the
addClass() method?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, we can add more than one CSS classes to the selected elements using
the addClass() method.
78. Which method is used to remove CSS class to the selected elements?
A. removeCSS()
B. removeClass()
C. removeClasseses()
D. RemoveClass()
Answer: B) removeClass()
Explanation:
The jQuery method removeClass() is used to remove CSS class to the selected
elements.
79. Which method is used to set or get the CSS style attribute?
A. cssAttribute()
128
B. attribute()
C. attr()
D. css()
Answer: D) css()
Explanation:
The jQuery method css() is used to get or set the CSS style attribute.
80. Which is the correct syntax to get the value of a CSS style
attribute/property using the css() method?
A. css("propertyname");
B. css(propertyname);
C. css(".propertyname");
D. css("#propertyname");
Answer: A) css("propertyname");
Explanation:
The correct syntax to get the value of a CSS style attribute/property using
the css() method is: css("propertyname");
81. Which is the correct syntax to set the value of a CSS style attribute/property
using the css() method?
A. css("propertyname"="value");
B. css("propertyname","value");
C. css("propertyname":"value");
D. css("propertyname":="value");
Answer: B) css("propertyname","value");
Explanation:
The correct syntax to set the value of a CSS style attribute/property using
the css() method is:
css("propertyname","value");
129
82. Which is the correct jQuery statement to set background color and text
decoration to all <p> elements?
A. $("p").css({"background-color": "#f1f1f1"; "text-decoration": "underline"});
B. $("#p").css({"background-color": "#f1f1f1"; "text-decoration": "underline"});
C. $("p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});
D. $("#p").css({"background-color": "#f1f1f1", "text-decoration": "underline"});
Answer: C) $("p").css({"background-color": "#f1f1f1", "text-decoration":
"underline"});
Explanation:
The correct jQuery statement to set background color and text decoration to
all <p> elements is:
$("p").css({"background-color": "#f1f1f1", "text-decoration":
"underline"});
83. Which jQuery method is used to get or set the width of an HTML element?
A. cssWidth()
B. Csswidth()
C. lenght()
D. width()
Answer: D) width()
Explanation:
The jQuery method width() is used to get or set the width of an HTML element.
84. Which jQuery method is used to get or set the height of an HTML element?
A. cssHeight()
B. CssHeight()
C. height()
D. getHeight()
Answer: C) height()
130
Explanation:
The jQuery method height() is used to get or set the height of an HTML element.
85. Which jQuery methods are used to get or set the width and height of an
HTML element including the paddings?
A. innerWidth() and innerHeight()
B. width() and height()
C. cssWidth() and cssHeight()
D. elementWidth() and elementHeight()
Answer: A) innerWidth() and innerHeight()
Explanation:
The jQuery methods innerWidth() and innerHeight() are used to get or set the
width and height of an HTML element including the paddings.
86. Which jQuery methods are used to get or set the width and height of an
HTML element including the paddings and borders?
A. outerWidth() and outerHeight()
B. width() and height()
C. cssWidth() and cssHeight()
D. elementWidth() and elementHeight()
Answer: A) outerWidth() and outerHeight()
Explanation:
The jQuery methods outerWidth() and outerHeight() are used to get or set the
width and height of an HTML element including the paddings and borders.
87. Which are the jQuery methods for traversing up the DOM tree?
A. parent()
B. parents()
C. parentsUntil()
131
D. All of the above
Answer: D) All of the above
Explanation:
These are the jQuery methods for traversing up the DOM tree:
i. parent()
ii. parents()
iii. parentsUntil()
88. Which jQuery method is used to get the direct parent element of the
selected element?
A. parent()
B. parents()
C. parentsUntil()
D. All of the above
Answer: A) parent()
Explanation:
jQuery method parent() is used to get the direct parent element of the selected
element.
89. Which jQuery method is used to get the all ancestor elements of the
selected element, all the way up to the document's root element (<html>)?
A. parent()
B. parents()
C. parentsUntil()
D. All of the above
Answer: B) parents()
Explanation:
jQuery method parents() is used to get the all ancestor elements of the selected
element, all the way up to the document's root element (<html>).
132
90. Which jQuery method is used to get the all ancestor elements between two
given arguments?
A. parent()
B. parents()
C. parentsUntil()
D. All of the above
Answer: C) parentsUntil()
Explanation:
jQuery method parentsUntil() is used to get the all ancestor elements between
two given arguments.
91. There is a <pre> element, write a jQuery statement to get it's parent?
A. $("pre").parent();
B. $("pre").parents();
C. $("pre").parentsUntil();
D. None of the above
Answer: A) $("pre").parent();
Explanation:
The correct jQuery statement to get the direct parent of a <pre> tag is:
$("pre").parent();
92. Which are the jQuery methods for traversing down the DOM tree?
A. children()
B. find()
C. childrens()
D. Both A. and B.
Answer: D) Both A. and B.
133
Explanation:
These are the jQuery methods for traversing down the DOM tree:
i. children()
ii. find()
93. Which jQuery method is used to get all direct children of the selected
element?
A. children()
B. find()
C. childrens()
D. Both A. and B.
Answer: A) children()
Explanation:
jQuery method children() is used to get all direct children of the selected
element.
94. Which jQuery method is used to get descendant elements of the selected
element, all the way down to the last descendant?
A. children()
B. find()
C. childrens()
D. Both A. and B.
Answer: B) find()
Explanation:
jQuery method find() is used to get descendant elements of the selected element,
all the way down to the last descendant.
95. What will the following jQuery code do?
$(document).ready(function(){
134
$("pre").siblings();
});
A. It will return all parent elements of <pre> element
B. It will return all children elements of <pre> element
C. It will return all sibling elements of <pre> element
D. It will return all nonrelative elements of <pre> element
Answer: C) It will return all sibling elements of <pre> element
Explanation:
The above code will return all sibling elements of <pre> element.
96. Which is the correct jQuery statement to change the color of all <p>
elements which are sibling elements of <pre>?
A. $("#pre").siblings("p").css({"color": "red"});
B. $(".pre").siblings("p").css({"color": "red"});
C. $("pre").siblings(".p").css({"color": "red"});
D. $("pre").siblings("p").css({"color": "red"});
Answer: D) $("pre").siblings("p").css({"color": "red"});
Explanation:
The correct jQuery statement to change the color of all <p> elements which are
sibling elements of <pre> is:
$("pre").siblings("p").css({"color": "red"});
97. Which jQuery method is used to get the next sibling element of the selected
element?
A. sibling()
B. nextSibling()
C. next()
D. siblings()
Answer: C) next()
135
Explanation:
jQuery method next() is used to get the next sibling element of the selected
element.
98. Which jQuery method is used to get the all next sibling element of the
selected element?
A. siblingAll()
B. nextSiblingAll()
C. nextAll()
D. siblingsAll()
Answer: C) nextAll()
Explanation:
jQuery method nextAll() is used to get the all next sibling element of the selected
element.
99. Let suppose there are multiple <h3> elements in an HTML document, which
is the correct jQuery statement to get the first <h3> element?
A. $("h3").first();
B. $("h3").parent();
C. $("h3").firstParent();
D. $("h3").top();
Answer: A) $("h3").first();
Explanation:
The correct jQuery statement to get the first <h3> element is:
$("h3").first();
100. Let suppose there are multiple <h3> elements in an HTML document,
which is the correct jQuery statement to get the last <h3> element?
136
A. $("h3").last();
B. $("h3").children();
C. $("h3").lastChild();
D. $("h3").down();
Answer: A) $("h3").last();
Explanation:
The correct jQuery statement to get the last <h3> element is:
$("h3").last();
JSON Multiple-Choice Questions (MCQs)
List of JSON MCQs
1. JSON stands for _______.
A. JavaScript Object Notation
B. Java Object Notation
C. JavaScript Object Normalization
D. JavaScript Object-Oriented Notation
Answer: A) JavaScript Object Notation
Explanation:
JSON stands for JavaScript Object Notation.
2. JSON is a _____ for storing and transporting data.
A. xml format
B. text format
C. JavaScript
D. php format
Answer: B) text format
Explanation:
JSON is a text format for storing and transporting data.
137
3. The JSON syntax is a subset of the _____ syntax.
A. Ajax
B. Php
C. HTML
D. JavaScript
Answer: D) JavaScript
Explanation:
The JSON syntax is a subset of the JavaScript syntax.
4. Who is the creator of JSON?
A. Alvin Alexander
B. Rasmus Lerdorf
C. Douglas Crockford
D. Jesse James Garrett
Answer: C) Douglas Crockford
Explanation:
Douglas Crockford is the creator of JSON.
5. In the JSON syntax, data is separated by _____.
A. Semicolons
B. Colons
C. Commas
D. Hyper
Answer: C) Commas
Explanation:
In the JSON syntax, data is separated by commas.
138
6. In the JSON syntax, array is written within in ____.
A. Square brackets
B. Curley braces
C. Paratheses
D. None of the above
Answer: A) Square brackets
Explanation:
In the JSON syntax, array is written within in square brackets.
7. What are the features of JSON?
A. Simplicity
B. Openness
C. Self-Describing
D. Internationalization
E. Extensibility
F. Interoperability
G. All of the above
Answer: G) All of the above
Explanation:
The JSON features are:
• Simplicity
• Openness
• Self-Describing
• Internationalization
• Extensibility
• Interoperability
8. Which is the correct symbol to insert a comment in JSON?
A. //
B. /*…*/
C. <!-- … -->
139
D. JSON doesn't support the comments
Answer: D) JSON doesn't support the comments
Explanation:
JSON doesn't support the comments. But you can add an extra attribute to write the
comments.
9. In the JSON syntax, data is in ____ pairs.
A. class/object
B. name/value
C. datatype/variable
D. value/=
Answer: B) name/value
Explanation:
In the JSON syntax, data is in name/value pairs.
10. JSON names (keys) require double quotes?
A. True
B. False
Answer: A) True
Explanation:
It's true that JSON names (key) require double quotes.
11. JSON names (keys) must be strings?
A. True
B. False
Answer: A) True
140
Explanation:
It's true that JSON names (keys) must be strings.
12. What is the correct syntax of writing JSON name/value pair, where the
value is of string type?
A. "name" : "value"
B. "name" : value
C. "name" : 'value'
D. 'name' : 'value'
Answer: A) "name" : "value"
Explanation:
The correct syntax of writing JSON name/value pair, where the value is of string
type:
"name" : "value"
13. What is the file type for JSON files?
A. .jsn
B. .js
C. .json
D. jso
Answer: C) .json
Explanation:
The file type for JSON files is ".json"
14. What is the MIME type for JSON text?
A. application/json
B. application/jsn
C. xml/json
D. xml/jsn
141
Answer: A) application/json
Explanation:
The MIME type for JSON text is "application/json".
15. Which is not a JSON data type?
A. number
B. string
C. array
D. date
Answer: D) date
Explanation:
The "date" is not a valid data type.
16. The undefined is a valid datatype in JSON?
A. Yes
B. No
Answer: B) No
Explanation:
No, "undefined" is not a valid type in JSON.
17. Which is the correct example of a JSON object with name, age, and city?
A. { "record":{"name":"Alex", "age":21, "city":"London"} }
B. { "record"={"name":"Alex", "age":21, "city":"London"} }
C. { "record":{"name":Alex, "age":21, "city":London} }
D. { record :{"name":"Alex", "age":21, "city":"London"} }
Answer: A) { "record":{"name":"Alex", "age":21, "city":"London"} }
Explanation:
142
The correct example of a JSON object with name, age, and city:
{ "record":{"name":"Alex", "age":21, "city":"London"} }
18. Which of these is an example of a proper JSON array?
A. { students:["Alex", "Alvin", "Bobby"] }
B. { students=["Alex", "Alvin", "Bobby"] }
C. { "students":["Alex", "Alvin", "Bobby"] }
D. { "students":[{"Alex", "Alvin", "Bobby"]} }
Answer: C) { "students":["Alex", "Alvin", "Bobby"] }
Explanation:
The example of a proper JSON array is:
{ "students":["Alex", "Alvin", "Bobby"] }
19. In the below statement, what is the type of "student"?
{"student":{"name":"Alvin", "age":21, "city":"Mumbai"}}
A. String
B. Array
C. Object
D. Class
Answer: C) Object
Explanation:
In the statement: {"student":{"name":"Alvin", "age":21, "city":"Mumbai"}}
The student is an object.
20. Values in JSON can be null?
143
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, the values in JSON can be null.
21. How to create JSON Boolean object?
A. {"name"=true/false}
B. {'name':true/false}
C. {"name":true/false}
D. {name:true/false}
Answer: C) {"name":true/false}
Explanation:
The syntax to create a JSON Boolean object:
{"name":true/false}
22. A common use of JSON is ________.
A. to update data into the database
B. to retrieve data from the database
C. to exchange data to/from a web server
D. None of the above
Answer: C) to exchange data to/from a web server
Explanation:
A common use of JSON is to exchange data to/from a web server.
23. Which function is used to convert text into a JavaScript object?
144
A. JSON.parse()
B. string.parse()
C. object.parse()
D. All of the above
Answer: A) JSON.parse()
Explanation:
The JSON.parse() function is used to convert text into a JavaScript object.
24. Which function is used to convert a JavaScript object into a string?
A. JSON.string()
B. JSON.stringify()
C. JSON.ToString()
D. All of the above
Answer: B) JSON.stringify()
Explanation:
The JSON.stringify() function is used to convert a JavaScript object into a string.
25. Which is the correct statement to convert the below given array to string?
const arr = ["Alex", "Alvin", "Bobby", "Dock"];
A. const json_arr = JSON.string(arr);
B. const json_arr = JSON.ToString(arr);
C. const json_arr = JSON.ArrayToString(arr);
D. const json_arr = JSON.stringify(arr);
Answer: D) const json_arr = JSON.stringify(arr);
Explanation:
The correct statement to convert an array to string is:
const arr = ["Alex", "Alvin", "Bobby", "Dock"];
const json_arr = JSON.stringify(arr);
145
26. Which PHP function is used to convert PHP objects into JSON?
A. json_encode()
B. phpjson_encode()
C. json_string()
D. json_object()
Answer: A) json_encode()
Explanation:
The PHP function json_encode() is used to convert PHP objects into JSON.
27. Which PHP function is used to convert the request into an object?
A. json_decode()
B. phpjson_decode()
C. json_string()
D. json_object()
Answer: A) json_decode()
Explanation:
The PHP function json_decode() is used to convert the request into an object.
28. ______ is a method for sending JSON data without worrying about cross#domain
issues.
A. JSON
B. json
C. JSONP
D. JSONP_Encode()
Answer: C) JSONP
Explanation:
146
JSONP is a method for sending JSON data without worrying about cross-domain
issues.
29. JSONP stands for _____.
A. JSON with Packing
B. JSON with Padding
C. JSON with Parsing
D. JSON with Prefix
Answer: B) JSON with Padding
Explanation:
JSONP stands for JSON with Padding.
30. Does JSON support the Unicode Characters?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, JSON supports the Unicode Characters.
31. Which of the following code will throw an error?
A. JSON.parse('{"name":"John", "age":30, "city":"New York"}');
B. JSON.parse(null);
C. JSON.parse(undefined);
D. JSON.parse('[]');
Answer: C) JSON.parse(undefined);
Explanation:
The following statement will throw an error:
147
JSON.parse(undefined);
32. What is/are the parameter(s) of the method JSON.parse()?
A. Text
B. Reviver
C. Object
D. Both Text and Reviver
Answer: D) Both Text and Reviver
Explanation:
Both Text and Reviver can be used as the parameters in the JSON.parse() function.
33. The order of JSON objects is always preserved?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, the order of JSON objects is always preserved.
34. How do you represent a JSON array of strings?
A. { "days" : { "SUN" , "MON" , "TUE" , "WED" , "THU" , "FRI" , "SAT" } }
B. { "days" = [ "SUN" , "MON" , "TUE" , "WED" , "THU" , "FRI" , "SAT" ] }
C. { "days" = { "SUN" , "MON" , "TUE" , "WED" , "THU" , "FRI" , "SAT" } }
D. { "days" : [ "SUN" , "MON" , "TUE" , "WED" , "THU" , "FRI" , "SAT" ] }
Answer: D) { "days" : [ "SUN" , "MON" , "TUE" , "WED" , "THU" , "FRI" , "SAT" ] }
Explanation:
A JSON array of strings can be represented by the below format/syntax:
148
{ "days" : [ "SUN" , "MON" , "TUE" , "WED" , "THU" , "FRI" ,
"SAT" ] }
35. How do you represent a JSON array of objects?
A. {"students": {{"name":"Alvin", "age":21, "city":"Mumbai"}, {"name":"Alex",
"age":24, "city":"Delhi"}} }
B. {"students"= [{"name":"Alvin", "age":21, "city":"Mumbai"}, {"name":"Alex",
"age":24, "city":"Delhi"}] }
C. {"students"= {{"name":"Alvin", "age":21, "city":"Mumbai"}, {"name":"Alex",
"age":24, "city":"Delhi"}} }
D. {"students": [{"name":"Alvin", "age":21, "city":"Mumbai"}, {"name":"Alex",
"age":24, "city":"Delhi"}] }
Answer: D) {"students": [{"name":"Alvin", "age":21, "city":"Mumbai"},
{"name":"Alex",
"age":24, "city":"Delhi"}] }
Explanation:
A JSON array of objects can be represented by the below format/syntax:
{"students": [{"name":"Alvin", "age":21, "city":"Mumbai"},
{"name":"Alex", "age":24, "city":"Delhi"}] }
36. JSON array elements can be access by ___.
A. Name
B. Key
C. Value
D. Index
Answer: D) Index
Explanation:
JSON array elements can be accessed by the index. And Array indexing starts with 0.
37. In the below statement, what is the type of "sports"?
149
{"name":"Alvin", "age":21, "sports":["Cricket", "Football",
"Running"]}
A. string
B. object
C. class
D. attribute
Answer: B) object
Explanation:
In the below statement, the type of sports is an object:
{"name":"Alvin", "age":21, "sports":["Cricket", "Football",
"Running"]}
38. In the below statement, what is the type of "age"?
{"name":"Alvin", "age":21, "sports":["Cricket", "Football",
"Running"]}
A. number
B. int
C. integer
D. long
Answer: A) number
Explanation:
In the below statement, the type of age is a number:
{"name":"Alvin", "age":21, "sports":["Cricket", "Football",
"Running"]}
39. In the below statement, what data type is encoded in the outermost
component?
[
150
{
"Name" : "Alex
},
{
"Course" : "B.Tech"
}
]
A. object
B. array
C. string
D. XML
Answer: B) array
Explanation:
The data type is encoded in the outermost component the given JSON is an array.
40. Which number types are available in the JavaScript but not supported in the
JSON?
A. Fractional and Rational
B. Infinity and Rational
C. Rational and Irrational
D. Infinity and NaN
Answer: D) Infinity and NaN
Explanation:
The Infinity and NaN data types are available in the JavaScript but not supported
in the JSON.
AJAX Multiple-Choice Questions (MCQs)
List of Ajax MCQs
1. Ajax is used for creating _____.
A. Web applications
B. Desktop applications
C. System applications
151
D. Both A. and B.
Answer: A) Web applications
Explanation:
Ajax is used for creating better, faster, and more interactive web applications
with the
help of XML, HTML, CSS, and JavaScript.
2. Ajax stands for ______.
A. Asynchronous JavaScript and XML
B. Asynchronous JSON and XML
C. Asynchronous Java and XML
D. Asynchronous JavaScript and XMLHttpRequest
Answer: A) Asynchronous JavaScript and XML
Explanation:
AJAX stands for Asynchronous JavaScript and XML.
3. Which are the two major features of AJAX?
A. Make requests to the server without reloading the page
B. Receive and work with data from the server
C. Make requests to the server with reloading the page
D. Only receive the data from the server
Answer: A & B
Explanation:
The two major features of AJAX are:
• Make requests to the server without reloading the page
• Receive and work with data from the server
4. What server support Ajax?
152
A. WWW
B. SMTP
C. HTTP
D. All of the above
Answer: C) HTTP
Explanation:
HTTP server support Ajax.
5. Which of the following feature makes the Ajax unique?
A. It can work with all the databases
B. It is a server-side application can also be used to create servers
C. It can use Python & C++ for programming
D. It makes data requests asynchronously
Answer: D) It makes data requests asynchronously
Explanation:
Ajax makes data requests asynchronously – it's a feature that makes the Ajax
unique.
6. Ajax sends data to a web server _____.
A. in the background
B. before loading the page
C. with reloading the page
D. All of the above
Answer: A) in the background
Explanation:
Ajax sends data to a web server in the background.
7. Ajax updates a web page ____ reloading the page.
153
A. with
B. without
Answer: B) without
Explanation:
Ajax updates a web page without reloading the page
8. How many types of triggers are present in update panel?
A. one
B. two
C. three
D. four
Answer: B) two
Explanation:
There are two types of triggers are present in update panel.
9. Which are the triggers present in update panel?
A. PostTrigger and AsyncPostTrigger
B. PostBackTrigger and SyncPostBackTrigger
C. SyncPostBackTrigger and AsyncPostBackTrigger
D. PostBackTrigger and AsyncPostBackTrigger
Answer: D) PostBackTrigger and AsyncPostBackTrigger
Explanation:
There are two types of triggers present in update panel, which are:
• PostBackTrigger
• AsyncPostBackTrigger
10. Why PostBackTrigger is used in update panel?
154
A. Specifies a control and event that will cause a full-page update
B. Specifies a control and event that will cause a partial page update
C. Specifies a control and event that will cause a full web application update
D. Specifies a control and event that will cause a full web application refresh
Answer: A) Specifies a control and event that will cause a full-page update
Explanation:
The PostBackTrigger trigger is used for specifying a control and event that will
cause a full-page update.
11. Why AsyncPostBackTrigger is used in update panel?
A. Specifies a control and event that will cause a full-page update
B. Specifies a control and event that will cause a partial page update
C. Specifies a control and event that will cause a full web application update
D. Specifies a control and event that will cause a full web application refresh
Answer: B) Specifies a control and event that will cause a partial page update
Explanation:
The AsyncPostBackTrigger trigger is used for specifying a control and event that
will cause a partial page update.
12. Which formats are supported by Ajax to send and receive information?
A. JSON, XML, HTML, SQL, MySQL, and Text Files
B. JSON, XML, HTML, and Text Files
C. JSON, XML, HTML, NoSQL, and Oracle
D. JAVA, JSON, XML, HTML, Oracle, and Text Files
Answer: B) JSON, XML, HTML, and Text Files
Explanation:
Ajax can send and receive information in various formats, including JSON, XML,
HTML, and text files.
155
13. Ajax technologies include ______.
A. HTML/XHTML and CSS
B. DOM
C. XML or JSON
D. XMLHttpRequest
E. JavaScript
F. All of the above
Answer: F) All of the above
Explanation:
Ajax technologies include the following technologies:
• HTML/XHTML and CSS
• DOM
• XML or JSON
• XMLHttpRequest
• JavaScript
14. Which technologies give Ajax its name?
A. Net and XML
B. ASP and XML
C. Asynchronous JavaScript, CSS, ASP, and XML
D. Asynchronous JavaScript and XML
Answer: D) Asynchronous JavaScript and XML
Explanation:
The combination of Asynchronous JavaScript and XML give Ajax its name.
15. Which company made Ajax popular?
A. Oracle
B. Google
C. Microsoft
D. Facebook
156
Answer: B) Google
Explanation:
AJAX was made popular in 2005 by Google, with Google Suggest.
16. Ajax is about updating ______, without reloading the full-page.
A. parts of a web page
B. parts of a database records
C. parts of a HTML tags dynamically
D. parts of a CSS classes dynamically
Answer: A) parts of a web page
Explanation:
Ajax is about updating parts of a web page, without reloading the full-page.
17. What are the advantages of Ajax?
A. Bandwidth utilization
B. More interactive
C. Speeder retrieval of data
D. All of the above
Answer: D) All of the above
Explanation:
The advantages of Ajax are:
• Bandwidth utilization
• More interactive
• Speeder retrieval of data
18. What is update panel in Ajax?
A. a server control used to update the specified portion of a web page
157
B. server control used to update the full-page after reloading the page
C. a dashboard used to update the specified portion of a web page
D. None of the above
Answer: C) a dashboard used to update the specified portion of a web page
Explanation:
In the Ajax – Update panel is a server control used to update the specified portion
of
a web page.
19. Which object can be used to exchange data with a server behind the scenes?
A. XMLHttpRequest
B. HttpsRequest
C. JSONHttpRequest
D. All of the above
Answer: A) XMLHttpRequest
Explanation:
The XMLHttpRequest object can be used to exchange data with a server behind the
scenes.
20. What is the correct syntax to create an XMLHttpRequest object?
A. XMLHttpRequest() variable
B. XMLHttpRequest() variable;
C. variable = new XMLHttpRequest()
D. variable = new XMLHttpRequest();
Answer: D) variable = new XMLHttpRequest();
Explanation:
The correct syntax to create an XMLHttpRequest object is:
variable = new XMLHttpRequest();
158
21. Which method cancels the current request?
A. cancel()
B. abort()
C. stop()
D. pause()
Answer: B) abort()
Explanation:
The abort() method is used to cancel the current request.
22. Which method returns the header information?
A. getAllResponseHeaders()
B. getResponseHeaders()
C. getHeaderInformation()
D. getAllHeaderInformations()
Answer: A) getAllResponseHeaders()
Explanation:
The getAllResponseHeaders() method is used to get the header information.
23. Which method returns the specific header information?
A. getResponseHeader()
B. getSpecifcHeader()
C. getHeaderOnly()
D. getHeaderInfo()
Answer: A) getResponseHeader()
Explanation:
The getResponseHeader() method is used to get the specific header information.
159
24. Which method adds a label/value pair to the header to be sent?
A. getRequestHeader()
B. setAllRequestHeader()
C. setRequestHeader()
D. getAllRequestHeader()
Answer: C) setRequestHeader()
Explanation:
The setRequestHeader() method is used to add a label/value pair to the header to
be sent.
25. Which property holds the status of the XMLHttpRequest?
A. readyState
B. holdState
C. pauseState
D. stopState
Answer: A) readyState
Explanation:
The readyState property is used to holds the status of the XMLHttpRequest.
26. Which property returns the response data as a string?
A. getText
B. getResponseText
C. responseText
D. responseAllText
Answer: C) responseText
Explanation:
The responseText property returns the response data as a string.
160
27. Which property returns the response data as XML data?
A. getXML
B. getResponseXML
C. responseXML
D. responseAllXML
Answer: C) responseXML
Explanation:
The responseXML property returns the response data as XML data.
28. Which property returns the status-number of a request?
A. statusText
B. statusXML
C. status-number
D. status
Answer: D) status
Explanation:
The status property returns the status-number of a request.
29. Which property returns the status-text?
A. statusText
B. statusXML
C. status-number
D. status
Answer: A) statusText
Explanation:
The statusText property returns the status-text.
161
30. "GET is simpler and faster than POST." – Is this statement true?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, the statement "GET is simpler and faster than POST." is true.
31. Which is the correct syntax to add HTTP headers to the request?
A. setRequestHeader(value, header)
B. setAllRequestHeader(value, header)
C. setRequestHeader(header, value)
D. setAllRequestHeader(header, value)
Answer: C) setRequestHeader(header, value)
Explanation:
The correct syntax to add HTTP headers to the request is,
setRequestHeader(header, value)
32. How to convert the below statement to the synchronous request?
xhttp.open("GET", "info.php", true);
A. Convert the third parameter to "false"
B. Convert the third parameter to "sync"
C. Convert the first parameter to "sync_GET"
D. All of the above
Answer: A) Convert the third parameter to "false"
Explanation:
To execute a synchronous request, you need to change the third parameter of
the open() method to false.
162
33. Which are the two properties to hold the status of XMLHttpRequest?
A. status and statusText
B. statusNum and statusText
C. statusId and statusText
D. None of the above
Answer: A) status and statusText
Explanation:
The status and statusText properties are used to hold the status of
the XMLHttpRequest object.
34. If the value of status property is 404, what does it mean?
A. OK
B. Forbidden
C. Method Not Allowed
D. Page not found
Answer: D) Page not found
Explanation:
Value 404 represents "Page not found".
35. The ______ function is called every time the readyState changes.
A. getreadystatechange
B. onreadystatechange
C. onsetreadystatechange
D. toreadystatechange
Answer: B) onreadystatechange
Explanation:
The onreadystatechange function is called every time the readyState changes.
163
ReactJS Multiple-Choice Questions (MCQs)
List of ReactJS MCQs
1. React is also known as _____.
A. ReactJS
B. js
C. Both A. and B.
D. None of these
Answer: C) Both A. and B.
Explanation:
React is also known as React.js and ReactJS.
Discuss this Question
2. React is a ____.
A. Web development Framework
B. JavaScript Library
C. jQuery
D. Web Server
Answer: B) JavaScript Library
Explanation:
React is a JavaScript library.
Discuss this Question
3. Which ReactJS function renders HTML to the web page?
A. render()
B. ReactDOM.render()
C. renders()
D. ReactDOM.renders()
164
Answer: B) ReactDOM.render()
Explanation:
The ReactDOM.render() function is used to render HTML to the web page.
Discuss this Question
4. JSX stands for _____.
A. JSON
B. JSON XML
C. JavaScript XML
D. JavaScript and AngularJS
Answer: C) JavaScript XML
Explanation:
JSX stands for JavaScript XML.
Discuss this Question
5. JSX allows us to write _____.
A. jQuery in React
B. Angular Code in React
C. MySQL in React
D. HTML in React
Answer: D) HTML in React
Explanation:
JSX allows us to write HTML in React.
Discuss this Question
6. What is the correct syntax to write expression in JSX?
165
A. [ expression ]
B. { expression }
C. {{ expression }}
D. _expression
Answer: B) { expression }
Explanation:
With JSX, an expression can be written using the syntax, { expression }.
Discuss this Question
7. A class component must include the _______ statement.
A. extends React.Component
B. extends React
C. extends Component
D. extends React.Component.All
Answer: A) extends React.Component
Explanation:
A class component must include the extends React.Component statement.
Discuss this Question
8. What are Props?
A. Props are arguments passed into React components
B. Props are functions in the ReactJS
C. Props are used to returns multiple values from the function
D. All of the above
Answer: A) Props are arguments passed into React components
Explanation:
Props are arguments passed into React components.
Discuss this Question
166
9. What does props stand for?
A. Proper Arguments
B. Properties
C. Proper Return Values
D. All of the above
Answer: B) Properties
Explanation:
The props stands for properties.
Discuss this Question
10. Which ReactJS command is used to create a new application?
A. create-react-app
B. new-react-app
C. create-new-reactapp
D. react-app
Answer: A) create-react-app
Explanation:
The create-react-app command is used to create a new React Application.
Discuss this Question
11. Which ReactJS command is used to set up everything you need to run a
React Application?
A. create-react-app
B. new-react-app
C. create-new-reactapp
D. react-app
Answer: A) create-react-app
167
Explanation:
The create-react-app command is used to set up everything you need to run a
React Application.
Discuss this Question
12. How to install create-react-app?
A. npx create-react-app -new my-app
B. npx create-react-app -app my-app
C. npx new-react-app my-app
D. npx create-react-app my-app
Answer: D) npx create-react-app my-app
Explanation:
The npx create-react-app my-app command is used to install create-react#app.
Discuss this Question
13. ES6 stands for ____.
A. ECMAScript 6
B. Extended-JavaScript Version 6
C. Extensive-JavaScript 6
D. Expanded-JavaScript 6
Answer: A) ECMAScript 6
Explanation:
ES6 stands for ECMAScript 6.
Discuss this Question
14. ECMAScript was created to standardize _____.
168
A. TypeScript
B. Java
C. JSON
D. JavaScript
Answer: D) JavaScript
Explanation:
ECMAScript was created to standardize JavaScript.
Discuss this Question
15. In ES6 – A class is a type of ____.
A. Basic datatype
B. Derived datatype
C. Variable
D. Function
Answer: D) Function
Explanation:
In ES6 – A class is a type of function.
Discuss this Question
16. In ES6 – Which keyword is used to initiate a class?
A. function
B. class
C. ReactClass
D. ReactClassJs
Answer: B) class
Explanation:
In ES6 – A class is a type of function, but instead of using the keyword function
to
initiate it, we use the keyword class.
169
Discuss this Question
17. In ES6 – The class properties are assigned inside a _____ method.
A. props()
B. properties()
C. constructor()
D. react-properties()
Answer: C) constructor()
Explanation:
In ES6 – The class properties are assigned inside a constructor() method.
class Laptop{
constructor(name) {
this.model = name;
}
}
Discuss this Question
18. In ES6 – Which keyword is used for class inheritance?
A. extends
B. extend
C. inheritance
D. inheritances
Answer: A) extends
Explanation:
In ES6 – The extends keyword is used for class inheritance.
Discuss this Question
19. In ES6 – What is the correct syntax of class inheritance?
170
A. class class1 extends class2{...}
B. class class1 extends | class2{...}
C. class class1 | extends class2{...}
D. class class1 | extends | class2{...}
Answer: A) class class1 extends class2{...}
Explanation:
In ES6 – The correct syntax of class inheritance is:
class class1 extends class2{...}
Discuss this Question
20. In ES6 – Which method refers to the parent class?
A. parent()
B. super()
C. top()
D. main()
Answer: B) super()
Explanation:
In ES6 – The super() method refers to the parent class.
Discuss this Question
21. In ES6 – Why arrow functions are used?
A. To access pointer variable
B. To access variable of a class
C. Both A. and B.
D. Write shorter function syntax
Answer: D) Write shorter function syntax
Explanation:
171
In ES6 – The arrow functions are used to write shorter function syntax.
Discuss this Question
22. Consider the below function – which is the correct syntax of arrow function?
Msg = function() {
return "Good Morning";
}
A. Msg = () => {return "Good Morning";}
B. Msg = () => "Good Morning";
C. Both A. and B.
D. None of the above
Answer: C) Both A. and B.
Explanation:
In ES6 – Below given both of the syntaxes are correct of arow function:
Msg = () => {
return "Good Morning";
}
Msg = () => "Good Morning";
Discuss this Question
23. Which is the correct arrow function to add two numbers?
A. add = (a,b) => a+b;
B. add = (a,b) => return a+b;
C. add = (a,b) => { return a+b;}
D. Both A. and B.
E. Both B. and C.
Answer: E) Both B. and C.
Explanation:
In ES6 – Below given both are the arrow functions to add two numbers:
172
add = (a,b) => return a+b;
add = (a,b) => { return a+b;}
Discuss this Question
24. With an arrow function – this keyword represents _____.
A. Content
B. Header object
C. Current object
D. Child object
Answer: B) Header object
Explanation:
With an arrow function – this keyword represents Header object.
Discuss this Question
25. Complete the below given arrow function.
Msg = ____ "Hi, there!";
A. ()
B. =>
C. ()>
D. () =>
Answer: D) () =>
Explanation:
The correct arrow function is:
Msg = () => "Hi, there!";
Discuss this Question
173
26. In ES6 – Which are the keywords to define variables?
A. var
B. let
C. const
D. All of the above
Answer: D) All of the above
Explanation:
In ES6 – There are three ways of defining your variables: var, let, and const.
Discuss this Question
27. In ES6 – var has a function scope, not a block scope?
A. True
B. False
Answer: A) True
Explanation:
In ES6 – The statement "var has a function scope, not a block scope." is True.
Discuss this Question
28. Which is used to pass data to components from outside?
A. Render with arguments
B. props
C. setState
D. PropTypes
Answer: B) props
Explanation:
props are used to pass data to components from outside.
Discuss this Question
174
29. In ES6 – let is the block scoped version of ____.
A. const
B. function
C. var
D. None of the above
Answer: C) var
Explanation:
In ES6 – The let is the block scoped version of var.
Discuss this Question
30. In ES6 – let has a block scope.
A. True
B. False
Answer: A) True
Explanation:
In ES6 – The statement "let has a block scope." is True.
Discuss this Question
31. In ES6 – Which keyword is used to define a constant?
A. var
B. const
C. let
D. constant
Answer: B) const
Explanation:
In ES6 – The const keyword is used to define a constant.
175
Discuss this Question
32. Which method is used to generate lists?
A. map()
B. generate()
C. new()
D. maps()
Answer: A) map()
Explanation:
The map() method is used to generate lists in React ES6.
Discuss this Question
33. What is the default port where webpack-server runs?
A. 443
B. 3030
C. 3306
D. 8080
Answer: D) 8080
Explanation:
The default port to run webpack-server is 8080.
Discuss this Question
34. What are components in ReactJS?
A. Components are like functions that return HTML elements.
B. Components are the HTML elements.
C. Components are the set of variables defined in ReactJS.
D. None of the above
Answer: A) Components are like functions that return HTML elements.
176
Explanation:
In ReactJS, the components are like functions that return HTML elements.
Discuss this Question
35. How many types of the components in ReactJS?
A. 1
B. 2
C. 3
D. 4
Answer: B) 2
Explanation:
There are two types of components in ReactJS.
Discuss this Question
36. Which are the valid components in ReactJS?
A. Variable components
B. Function components
C. Class components
D. Both A. and B.
E. Both B. and C.
Answer: E) Both B. and C.
Explanation:
There are two types of components in ReactJS, which are:
• Function components
• Class components
Discuss this Question
177
37. Which statement is required to define a class component?
A. extends React.Components
B. imports React.Components
C. extends React.Component
D. imports React.Component
Answer: C) extends React.Component
Explanation:
In ReactJS, a class component must include the extends
React.Component statement.
Discuss this Question
38. Consider the below statement – Which method will be used at the place of
blank space (____)?
class MainTitle extends React.Component {
______ {
return <h1>Welcome at IncludeHelp!</h1>;
}
}
A. renderDOM()
B. renderComponent()
C. render()
D. render()
Answer: C) render()
Explanation:
The correct code is:
class MainTitle extends React.Component {
render() {
return <h1>Welcome at IncludeHelp!</h1>;
}
}
Discuss this Question
178
39. Can components be passed as props?
A. Yes
B. No
Answer: A) Yes
Explanation:
Yes, the components can be passed as props.
Discuss this Question
40. In ReactJS, what is State?
A. It's a temporary storage of the elements
B. It's a state of the execution of the ReactJS application
C. It's an internal storage of the components
D. All of the above
Answer: C) It's an internal storage of the components
Explanation:
In ReactJS, the State is an internal storage of the components.
QuestionID : 10327 Subject Name HTML
Q1. Given the statement :
“if IsValid(a) Or IsValid(b) Then”,
In the above statement the IsValid(b) function always get called
Correct Answer : F
Your Answer :
QuestionID : 10330 Subject Name HTML
Q2. A variable that your webpage can store on or retrieve from the user’s
computer is known as
1. Java
2. Cookie
3. Applet
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10337 Subject Name HTML
Q3. Web Server is designed to locate, address and send out simple HTML
pages to
all other users who access these pages.
Correct Answer : T
Your Answer :
QuestionID : 10344 Subject Name HTML
Q4. Which of the following can you NOT specify with the window.open
method?
1. Which browser buttons and menus
2. Email address
3. Size and position of the new window
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10345 Subject Name HTML
Q5. _________ is Javascript`s default object
1. Document
2. Window
Close this Window Hi dac10, You have scored : 0
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 2/10
3. Browser
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10346 Subject Name HTML
Q6. The major difference between the <br> and <p> tag is that <br> forces a
break with a white space, whereas <p> is essentially just a line return.
Correct Answer : T
Your Answer :
QuestionID : 10347 Subject Name HTML
Q7. In table formatting, the cellspacing attribute declares the amount of white
space around the image or text included within the tag.
Correct Answer : F
Your Answer :
QuestionID : 10356 Subject Name HTML
Q8. < form method="POST" action="mailto:
[email protected]"
enctype="text/plain">
< p>What is your gender?
< input type="radio" value="y">yes
< input type="radio" value="n">no
< /p>
< p>Do you smoke?
< input type="radio" value="y" >yes
< input type="radio" value = "n" > no
< /p >
< p> < input type="submit" value="Submit" >
< input type="reset" value="Reset" >< /p >
< /form >
Which of the following is the worst problem in this form?
1. Name attribute not used.
2. Values are similar for both sets of questions.
3. It is no longer legal to request gender information.
4. The action will not return form results.
Correct Answer : 1
Your Answer :
QuestionID : 10359 Subject Name HTML
Q9. How can you make a list that lists the items with circles?
1. < list>
2. < ul>
3. < dl>
4. < ol>
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 3/10
Correct Answer : 2
Your Answer :
QuestionID : 10362 Subject Name HTML
Q10. Request.Form.Count returns ______________
1. The number of characters in the form`s name attribute
2. The number of values submitted in the form
3. The number of seconds since the form was submitted
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10368 Subject Name HTML
Q11. What is the correct JavaScript syntax to write "Hello World"?
1. "Hello World"
2. document.write("Hello World")
3. response.write("Hello World")
4. ("Hello World")
Correct Answer : 2
Your Answer :
QuestionID : 10373 Subject Name HTML
Q12. Where is the correct place to insert a JavaScript?
1. Both the <head> section and the <body> section are correct
2. The <body> section
3. The <head> section
4. none of the above
Correct Answer : 1
Your Answer :
QuestionID : 10375 Subject Name HTML
Q13. CSS can be defined for entire pages by simply adding what to the head
section?
1. Script
2. Class structure
3. Style definition
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10377 Subject Name HTML
Q14. CSS can be added to a page on how many levels?
1. 4 - Tag, Head, External file and Meta tag
2. 2 - Head and External file
3. 3 - Tag, Head and External file
4. None of the above
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 4/10
Correct Answer : 3
Your Answer :
QuestionID : 10387 Subject Name HTML
Q15. The _____ is used as a template for defining the user interface for your
web class.
1. HTML page
2. browser
3. internet
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10394 Subject Name HTML
Q16. "< %=" is the same as ______________
1. Document.Write
2. < %
3. Response.Write
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10400 Subject Name HTML
Q17. Text files are useful for storing small amounts of information such as
the top ten visited pages in your website. What is the limitation of using this
method?
1. a. Cannot password protect a text file.
2. b. Not recommended if the information constantly changes.
3. c. Not very efficient in allowing multiple users accessing it at the same
time.
4. d. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10401 Subject Name HTML
Q18. __________ ASP property is used to identify a user
1. The Server object
2. The Application object
3. An ASP Cookie
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10402 Subject Name HTML
Q19. Session variables are also popular in that they temporarily store
information on a user-by-user basis as long as the visitor remains active on
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 5/10
your site. What is a limitation of this method?
1. Once the visitor leaves the site, any current information is lost such as
the contents in a shopping cart.
2. A user may elect not to accept a session variable
3. Both a & b options
4. None of these options
Correct Answer : 3
Your Answer :
QuestionID : 10407 Subject Name HTML
Q20. ________of these page extensions WILL NOT recognize and execute
an include file
1. .stm
2. .html
3. .asp
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10411 Subject Name HTML
Q21. How can we protect databases from accidental viewing or intentional
attempt at downloading?
1. Use garbled file names
2. Regularly change the DSN and DSN-less connection strings
3. Put the databases into directories higher than the root - in other words,
directories not accessible via the web browser
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10418 Subject Name HTML
Q22. What information can a connection string contain about the database
you are trying to connect to?
1. Type of database
2. Location of database
3. username & password
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10423 Subject Name HTML
Q23. ASP comes with built-in _________ component that displays a different
advertisement each time a user enters or refreshes a page
1. AdRotator
2. Rotate Adds
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 6/10
3. Advertisement
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10435 Subject Name HTML
Q24. Who is making the Web standards?
1. Microsoft
2. Netscape
3. The World Wide Web Consortium (W3C)
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10952 Subject Name HTML
Q25. HTML elements must always properly nest.
Correct Answer : F
Your Answer :
QuestionID : 10954 Subject Name HTML
Q26. Predefined entities represent special markup Characters.
Correct Answer : T
Your Answer :
QuestionID : 10957 Subject Name HTML
Q27. Do not include the XHTML namespace when including XHTML in an
XML document.
Correct Answer : F
Your Answer :
QuestionID : 11633 Subject Name HTML
Q28. Ordered lists are used for Bullets.
Correct Answer : F
Your Answer :
QuestionID : 11635 Subject Name HTML
Q29. The ___________ color is the default color of a hyperlink.
1. green
2. blue
3. red
4. yellow
Correct Answer : 2
Your Answer :
QuestionID : 11639 Subject Name HTML
Q30. The___________attribute takes text to be displayed in case the Browser
is unable to display the image specified in the SRC attribute.
1. Title
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 7/10
2. Alt
3. Src
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11649 Subject Name HTML
Q31. The___________attribute takes text to be displayed in case the Browser
is unable to display the image specified in the SRC attribute.
1. Title
2. Alt
3. Src
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11657 Subject Name HTML
Q32. HTML allows only static text to be displayed on the page.
Correct Answer : T
Your Answer :
QuestionID : 11659 Subject Name HTML
Q33. Once the screen is divided into different sections, each section can be
loaded with a different HTML document using the _____________tag.
1. Frame tag
2. Body tag
3. Anchor tag
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11662 Subject Name HTML
Q34. The _________________ attribute of the < FRAME > tag disables the
user`s ability to resize theframe.
1. Noresize
2. Nochange
3. SRC
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 11663 Subject Name HTML
Q35. HTML allows only static text to be displayed on the page.
Correct Answer : T
Your Answer :
QuestionID : 11667 Subject Name HTML
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 8/10
Q36. A table header row is defined with the < TD> and < /TD> tag pair.
Correct Answer : F
Your Answer :
QuestionID : 11668 Subject Name HTML
Q37. If a variable is declared outside the body of the function, it is available
throughout script inside
all functions and elsewhere in the program.
Correct Answer : T
Your Answer :
QuestionID : 11669 Subject Name HTML
Q38. The color of the links can be changed in the < Body> tag.
Correct Answer : T
Your Answer :
QuestionID : 11672 Subject Name HTML
Q39. The ______________ attribute of the < FORM> tag points to the URL
of a program on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 11679 Subject Name HTML
Q40. The Select object allows multiple choices from a list of choices that are
offered.
Correct Answer : T
Your Answer :
QuestionID : 11682 Subject Name HTML
Q41. The name Cookie has a special significance with respect to object
oriented programming language.
Correct Answer : F
Your Answer :
QuestionID : 14241 Subject Name HTML
Q42. An HTML document is divided into_________ _________ and
the________ ________ sections
1. Head and body
2. Head and tag
3. Images and hyperlinks
4. None of the above
Correct Answer : 1
Your Answer :
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 9/10
QuestionID : 14243 Subject Name HTML
Q43. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14248 Subject Name HTML
Q44. ________ __________ enable a jump to a particular location in a
document.
1. static linking
2. dynamic linking
3. web linking
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14253 Subject Name HTML
Q45. CELLSPACING controls the distance between the data in a cell and the
boundaries of the cell.
Correct Answer : F
Your Answer :
QuestionID : 14257 Subject Name HTML
Q46. ___________tag starts text from a new line skipping one line in
between.
1. < BR >
2. < HR >
3. < P >
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14276 Subject Name HTML
Q47. Methods are used to read or modify the data contained in an object.
Correct Answer : T
Your Answer :
QuestionID : 14287 Subject Name HTML
Q48. The Post method sends data captured by the form elements to the web
server, encoded as part of the URL that points to the web server.
Correct Answer : F
Your Answer :
QuestionID : 14289 Subject Name HTML
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/3htm.htm 10/10
Q49. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 14293 Subject Name HTML
Q50. The name Cookie has a special significance with respect to object
oriented programming language.
Correct Answer : F
Your Answer QuestionID : 10325 Subject Name HTML
Q1. A Text Stream Object allows you to access (read/write) the contents
of text files stored on the web server.
Correct Answer : T
Your Answer :
QuestionID : 10336 Subject Name HTML
Q2. Which type of internet address is unique?
1. DNS
2. Default Gateway
3. ISP
4. IP
Correct Answer : 4
Your Answer :
QuestionID : 10345 Subject Name HTML
Q3. _________ is Javascript`s default object
1. Document
2. Window
3. Browser
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10348 Subject Name HTML
Q4. It is considered permissible to use heading tags for general font
formatting
when designing for greater web accessibility.
Correct Answer : T
Your Answer :
QuestionID : 10349 Subject Name HTML
Q5. What is the correct syntax for referring to an external script called
"xxx.js"?
1. < script src="xxx.js">
2. < script href="xxx.js">
3. < script name="xxx.js">
4. < script ="xxx.js">
Close this Window Hi dac10, You have scored : 0
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 2/10
Correct Answer : 1
Your Answer :
QuestionID : 10351 Subject Name HTML
Q6. When making a 2-window frameset, you must name the windows
"menu" and "main”?
Correct Answer : F
Your Answer :
QuestionID : 10355 Subject Name HTML
Q7. Use < td> and < /td > to add ___________ to your tables
1. steps
2. columns
3. rows
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10366 Subject Name HTML
Q8. < SPAN>, < B> and < I> are examples of what _________ tags
1. Inline tags
2. Block tags
3. Price tags
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10368 Subject Name HTML
Q9. What is the correct JavaScript syntax to write "Hello World"?
1. "Hello World"
2. document.write("Hello World")
3. response.write("Hello World")
4. ("Hello World")
Correct Answer : 2
Your Answer :
QuestionID : 10378 Subject Name HTML
Q10. ________ is NOT a valid CSS selector
1. ID selectors
2. HEAD selectors
3. TAG selectors
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10379 Subject Name HTML
Q11. How are sessions maintained?
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 3/10
1. The browser sends a cookie to the server with each request.
2. The browser sends a QueryString variable to the server with each
request.
3. The browser sends a hidden Form variable to the server with each
request.
4. The browser sends a long variable to the server in the BODY of each
request.
Correct Answer : 1
Your Answer :
QuestionID : 10381 Subject Name HTML
Q12. __________ is NOT a valid value for the visibility property
1. Hidden
2. Visible
3. Middle
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10384 Subject Name HTML
Q13. When does the application OnEnd event handler fire?
1. After every request for an application document, since web servers are
stateless servers.
2. As soon as there are no open connections to any application document.
3. When the web server is stopped in an orderly fashion.
4. When there are no application requests for the amount of time defined
by the SessionTimeout variable.
Correct Answer : 3
Your Answer :
QuestionID : 10387 Subject Name HTML
Q14. The _____ is used as a template for defining the user interface for your
web class.
1. HTML page
2. browser
3. internet
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10394 Subject Name HTML
Q15. "< %=" is the same as ______________
1. Document.Write
2. < %
3. Response.Write
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 4/10
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10396 Subject Name HTML
Q16. Abandon is an ASP ________ object method.
1. server
2. session
3. response
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10400 Subject Name HTML
Q17. Text files are useful for storing small amounts of information such as
the top ten visited pages in your website. What is the limitation of using this
method?
1. a. Cannot password protect a text file.
2. b. Not recommended if the information constantly changes.
3. c. Not very efficient in allowing multiple users accessing it at the same
time.
4. d. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10406 Subject Name HTML
Q18. How does a "for" loop start?
1. for (i = 0; i <= 5)
2. for (i <= 5; i++)
3. for i = 1 to 5
4. for (i = 0; i <= 5; i++)
Correct Answer : 4
Your Answer :
QuestionID : 10407 Subject Name HTML
Q19. ________of these page extensions WILL NOT recognize and execute
an include file
1. .stm
2. .html
3. .asp
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10412 Subject Name HTML
Q20. What is the correct JavaScript syntax to insert a comment that has more
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 5/10
than one line?
1. //This comment has
more than one line//
2. < !--This comment has
more than one line-->
3. /*This comment has
more than one line*/
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10413 Subject Name HTML
Q21. The user must enable __________ for Sessions to work
1. A Microsoft Passport account
2. JavaScript
3. Cookies
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10414 Subject Name HTML
Q22. ActiveX Data Objects (ADO) comes installed with ASP and allows
your pages to easily connect to databases. Which two ADO objects are used
to open a connection and interact with the database?
1. Connection object, RecordingSet object
2. Connection object, Recordset object
3. Connect object, RecordingSet object
4. Connect object, Recordset object
Correct Answer : 2
Your Answer :
QuestionID : 10415 Subject Name HTML
Q23. MapPath is an ASP ________ object method.
1. session
2. request
3. server
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10416 Subject Name HTML
Q24. What is the correct way to write a JavaScript array?
1. var txt = new Array:1=("tim")2=("kim")3=("jim")
2. var txt = new Array="tim","kim","jim"
3. var txt = new Array(1:"tim",2:"kim",3:"jim")
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 6/10
4. var txt = new Array("tim","kim","jim")
Correct Answer : 4
Your Answer :
QuestionID : 10422 Subject Name HTML
Q25. Server-Side Includes (also known as SSI) allows you to do what?
1. Allows you to include server executed code into any ASP application.
2. Allows you to use one file in several different web pages.
3. Allows you to use a piece of code more than once.
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10429 Subject Name HTML
Q26. The following snippet of code is an example of ______ type of
connection
MyConn.Open "MailingList"
1. DSN
2. DSN-less
3. Neither
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10430 Subject Name HTML
Q27. How do you put a message in the browser`s status bar?
1. statusbar = "put your message here"
2. window.status("put your message here")
3. window.status = "put your message here"
4. status("put your message here")
Correct Answer : 3
Your Answer :
QuestionID : 11635 Subject Name HTML
Q28. The ___________ color is the default color of a hyperlink.
1. green
2. blue
3. red
4. yellow
Correct Answer : 2
Your Answer :
QuestionID : 11647 Subject Name HTML
Q29. HTML supports 6 different levels of headings.
Correct Answer : T
Your Answer :
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 7/10
QuestionID : 11651 Subject Name HTML
Q30. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11655 Subject Name HTML
Q31. START alters the numbering sequence in the middle of an Ordered list.
Correct Answer : F
Your Answer :
QuestionID : 11659 Subject Name HTML
Q32. Once the screen is divided into different sections, each section can be
loaded with a different HTML document using the _____________tag.
1. Frame tag
2. Body tag
3. Anchor tag
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11665 Subject Name HTML
Q33. Methods are used to read or modify the data contained in an object.
Correct Answer : T
Your Answer :
QuestionID : 11671 Subject Name HTML
Q34. A filename always has to be mentioned before the # symbol in the
HREF attribute of a link.
Correct Answer : F
Your Answer :
QuestionID : 11672 Subject Name HTML
Q35. The ______________ attribute of the < FORM> tag points to the URL
of a program on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 11682 Subject Name HTML
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 8/10
Q36. The name Cookie has a special significance with respect to object
oriented programming language.
Correct Answer : F
Your Answer :
QuestionID : 14249 Subject Name HTML
Q37. ________ and ________attributes are used to control the size of the
image on the web page.
1. Height ……width
2. Height……length
3. Size and width
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14250 Subject Name HTML
Q38. The___________attribute takes text to be displayed in case the Browser
is unable to display the image specified in the SRC attribute.
1. Title
2. Alt
3. Src
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14251 Subject Name HTML
Q39. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14252 Subject Name HTML
Q40. The distance between the data in a cell and the boundaries of the cell is
controlled by __________attribute.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14254 Subject Name HTML
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 9/10
Q41. The form tag has two properties namely ____________ and
____________.
1. Method, Action
2. SRC, Link
3. Submit, post
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14259 Subject Name HTML
Q42. HTML tags are of two types:
Paired Tags
Singular Tags
Correct Answer : T
Your Answer :
QuestionID : 14262 Subject Name HTML
Q43. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14266 Subject Name HTML
Q44. START alters the numbering sequence in the middle of an Ordered list.
Correct Answer : F
Your Answer :
QuestionID : 14267 Subject Name HTML
Q45. ___________ enable a Web page to be broken into different sections.
1. pages
2. Frames
3. Sections
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14277 Subject Name HTML
Q46. The vertical or the horizontal alignment for every cell in a given row is
controlled by using the VALIGN and ALIGN attributes in the row`s < TR>
tag.
Correct Answer : T
Your Answer :
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/1.htm 10/10
QuestionID : 14283 Subject Name HTML
Q47. The ______________ attribute of the < FORM> tag points to the URL
of a program on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 14287 Subject Name HTML
Q48. The Post method sends data captured by the form elements to the web
server, encoded as part of the URL that points to the web server.
Correct Answer : F
Your Answer :
QuestionID : 14289 Subject Name HTML
Q49. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 14291 Subject Name HTML
Q50. As Soon as the < FORM >< /FORM > tags are encountered by the
browser, the browse creates an array called form 1
in the absence of a Form name being specified in the HTML code.
Correct Answer : T
Your Answer QuestionID : 9990 Subject Name HTML
Q1. What is the correct way to include the file "time.inc"?
1. < % #include file="time.inc" %>
2. < !--#include file="time.inc"-->
3. < include file="time.inc">
4. < % include file="time.inc" %>
Correct Answer : 2
Your Answer :
QuestionID : 10329 Subject Name HTML
Q2. Most search engines give serious importance to meta tags when ranking
websites in
their listings
Correct Answer : T
Your Answer :
QuestionID : 10333 Subject Name HTML
Q3. To keep the browser from performing a script as soon as it is loaded you
need to write the script as a _______
1. delay
2. performance
3. function
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10335 Subject Name HTML
Q4. How do you create a FileSystemObject?
1. Server.CreateObject("FileSystemObject")
2. Server.CreateObject("Scripting.FileSystemObject")
3. Create("FileSystemObject")
4. Create Object:"Scripting.FileSystemObject"
Correct Answer : 2
Your Answer :
QuestionID : 10336 Subject Name HTML
Q5. Which type of internet address is unique?
1. DNS
Close this Window Hi dac10, You have scored : 0
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm 2/9
2. Default Gateway
3. ISP
4. IP
Correct Answer : 4
Your Answer :
QuestionID : 10346 Subject Name HTML
Q6. The major difference between the <br> and <p> tag is that <br> forces a
break with a white space, whereas <p> is essentially just a line return.
Correct Answer : T
Your Answer :
QuestionID : 10353 Subject Name HTML
Q7. Hex-colors are the only way to define colors on the web?
Correct Answer : F
Your Answer :
QuestionID : 10354 Subject Name HTML
Q8. Settings for columns (<td> tag) have higher priority than settings for
rows (<tr> tag)
Correct Answer : T
Your Answer :
QuestionID : 10361 Subject Name HTML
Q9. Adding _top to a link within a frameset does what ?
1. cancels all frames, loads in full browser window
2. loads page in parent frame
3. loads the page into the current window loads the page into the current
window
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10369 Subject Name HTML
Q10. What is the correct HTML for referring to an external style sheet?
1. < stylesheet>mystyle.css
2. < link rel="stylesheet" type="text/css" href="mystyle.css">
3. < style src="mystyle.css">
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10370 Subject Name HTML
Q11. How to display hyperlinks without an underline?
1. a {underline:none}
2. a {text-decoration:no underline}
3. a {text-decoration:none}
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm 3/9
4. a {decoration:no underline}
Correct Answer : 3
Your Answer :
QuestionID : 10374 Subject Name HTML
Q12. CSS lets you separate the layout from _______
1. Selectors
2. Content
3. Tables
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10377 Subject Name HTML
Q13. CSS can be added to a page on how many levels?
1. 4 - Tag, Head, External file and Meta tag
2. 2 - Head and External file
3. 3 - Tag, Head and External file
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10378 Subject Name HTML
Q14. ________ is NOT a valid CSS selector
1. ID selectors
2. HEAD selectors
3. TAG selectors
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10383 Subject Name HTML
Q15. What is the correct syntax for referring to an external script called
"xxx.js"?
1. <script src="xxx.js">
2. <script href="xxx.js">
3. <script name="xxx.js">
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 10384 Subject Name HTML
Q16. When does the application OnEnd event handler fire?
1. After every request for an application document, since web servers are
stateless servers.
2. As soon as there are no open connections to any application document.
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm
4
/
9
3. When the web server is stopped in an orderly fashion.
4. When there are no application requests for the amount of time defined
by the SessionTimeout variable.
Correct Answer : 3
Your Answer :
QuestionID : 10385 Subject Name HTML
Q17. In a URL, the "http" is considered ________.
1. a scripting language
2. a protocol
3. a server
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10388 Subject Name HTML
Q18. How do you create a function?
1. function=myFunction()
2. function:myFunction()
3. function myFunction()
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10404 Subject Name HTML
Q19. IsClientConnected is a property of ________ ASP object
1. Server
2. Response
3. Session
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10406 Subject Name HTML
Q20. How does a "for" loop start?
1. for (i = 0; i <= 5)
2. for (i <= 5; i++)
3. for i = 1 to 5
4. for (i = 0; i <= 5; i++)
Correct Answer : 4
Your Answer :
QuestionID : 10422 Subject Name HTML
Q21. Server-Side Includes (also known as SSI) allows you to do what?
1. Allows you to include server executed code into any ASP application.
2. Allows you to use one file in several different web pages.
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm 5/9
3. Allows you to use a piece of code more than once.
4. All of the above
Correct Answer : 4
Your Answer :
QuestionID : 10425 Subject Name HTML
Q22. How do you find the largest number of 2 and 4?
1. Math.ceil(2,4)
2. top(2,4)
3. ceil(2,4)
4. Math.max(2,4)
Correct Answer : 4
Your Answer :
QuestionID : 10434 Subject Name HTML
Q23. How can you make an e-mail link?
1. < a href="xxx@yyy">
2. < mail href="xxx@yyy">
3. < a href="mailto:xxx@yyy">
4. < mail>xxx@yyy
Correct Answer : 3
Your Answer :
QuestionID : 10952 Subject Name HTML
Q24. HTML elements must always properly nest.
Correct Answer : F
Your Answer :
QuestionID : 10957 Subject Name HTML
Q25. Do not include the XHTML namespace when including XHTML in an
XML document.
Correct Answer : F
Your Answer :
QuestionID : 11630 Subject Name HTML
Q26. An HTML document is divided into_________ _________ and
the________ ________ sections
1. Head and body
2. Head and tag
3. Images and hyperlinks
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11636 Subject Name HTML
Q27. An Image can be inserted into the HTML page using _________ tag
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm 6/9
that takes the name of the image file as an attribute.
1. IMG
2. SRC
3. GIF
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11640 Subject Name HTML
Q28. The horizontal alignment of the table on the page is controlled by the
_____________attribute.
1. align
2. map
3. position
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 11642 Subject Name HTML
Q29. CELLSPACING controls the distance between the data in a cell and the
boundaries of the cell.
Correct Answer : F
Your Answer :
QuestionID : 11660 Subject Name HTML
Q30. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11663 Subject Name HTML
Q31. HTML allows only static text to be displayed on the page.
Correct Answer : T
Your Answer :
QuestionID : 11672 Subject Name HTML
Q32. The ______________ attribute of the < FORM> tag points to the URL
of a program on the web server that will process the form data.
1. Action
2. Name
3. Method
4. All of the above
Correct Answer : 1
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm 7/9
Your Answer :
QuestionID : 11674 Subject Name HTML
Q33. The ___________button sends the current information held in each field
of the form to the web server for further processing.
1. Reset
2. Submit
3. Command button
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 11677 Subject Name HTML
Q34. Information can be stored locally in the browser which can be sent to
the server whenever required by using____________.
1. Variables
2. Local variables
3. Cookies
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 11678 Subject Name HTML
Q35. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 11679 Subject Name HTML
Q36. The Select object allows multiple choices from a list of choices that are
offered.
Correct Answer : T
Your Answer :
QuestionID : 11684 Subject Name HTML
Q37. External Style Sheets can be saved as file using _____________
extensions, which can link to web pages by the _____________tag.
1. JS , anchor
2. CSS, link
3. VBS, link
4. All of the above
Correct Answer : 2
Your Answer :
QuestionID : 14242 Subject Name HTML
Q38. The tag used for inserting spaces in HTML documents is < MARKER
>.
Correct Answer : F
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm
8
/
9
Your Answer :
QuestionID : 14243 Subject Name HTML
Q39. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14244 Subject Name HTML
Q40. Ordered lists are used for Bullets.
Correct Answer : F
Your Answer :
QuestionID : 14249 Subject Name HTML
Q41. ________ and ________attributes are used to control the size of the
image on the web page.
1. Height ……width
2. Height……length
3. Size and width
4. None of the above
Correct Answer : 1
Your Answer :
QuestionID : 14256 Subject Name HTML
Q42. The default HTML page that is delivered to a client connected to a Web
Server is____________.
1. Main Page
2.
Template
3. Home Page
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 14259 Subject Name HTML
Q43. HTML tags are of two types:
Paired Tags
Singular Tags
Correct Answer : T
Your Answer :
QuestionID : 14271 Subject Name HTML
Q44. __________ controls the spacing between adjacent cells in the table.
1. cellpadding
2. cellspacing
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/HTML/2.htm 9/9
3. border
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 14275 Subject Name HTML
Q45. ALlGN=LEFT indicates the image is aligned to the left with respect to
the screen.
Correct Answer : F
Your Answer :
QuestionID : 14282 Subject Name HTML
Q46. A filename always has to be mentioned before the # symbol in the
HREF attribute of a link.
Correct Answer : F
Your Answer :
QuestionID : 14284 Subject Name HTML
Q47. Various form elements can be specified as attributes of the
_______________ tag.
1. Input tag
2. Name tag
3. Anchor tag
4. Body tag
Correct Answer : 1
Your Answer :
QuestionID : 14286 Subject Name HTML
Q48. ________________ is the only property of the string object.
1. Name
2. Value
3. Length
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 14289 Subject Name HTML
Q49. Text fields accept a single line of text entry.
Correct Answer : T
Your Answer :
QuestionID : 14292 Subject Name HTML
Q50. Date object enables the creation of an object that contains information
about a particular date.
Correct Answer : 1.Which one of the following is not the input type in HTML5?
A: button
B: checkbox
C: email
D: box
2. The __________ attribute specifies the HTTP method (GET or POST) to be used when
submitting the form data:
A: method
B: action
C: http
D: data
3. Which one of the following list type is not available in HTML5?
A: unorderd list
B: table list
C: ordered list
D: None of the above
4. Which one of the following HTML5 tag is used to embed video in webpage?
A: audio
B: video
C: multimedia
D: media
5. Which one of the following is correct CSS syntax?
A: selector { property= value }
B: selector [ property: value ]
C: selector { property: value }
D: selector ( property: value )
6. Which one the follwing CSS property is used to create the rounded border of any
Div
section?
A: border-radius
B: border-round
C: border-tranform
D: border-type
7. Which one of the following is correct about javascript?
A: All JavaScript code for a web page is executed by the web server.
B: All web pages must include JavaScript code in order to work.
C: Javascript is used to create static web page
D: JavaScript and Java are the same thing.
8. How many alert dialogs will be displayed by following javascript code?
var x = "10";
function f(){var x = "4";
alert(this.x);
function g(){alert(x);}
g();}
f();
A: 6
B: 7
C: 3
D: 2
9. ________________function is used to convert string value to integer value in
Javascript?
A: Number()
B: ParseInt()
C: to String()
D: ParseFloat()
10. Which one of the following denotes the value which is not a number in
Javascript?
A: NaN
B: infinity
C: -infinity
D: isNaN()
11. The special method placed inside a classhaving the name of the class itself as
the
function name is____________________.
A: constructor
B: encapsulation
C: abstraction
D: polymorphism
12. Which one of the following property is used to get the length of array?
A: length
B: size
C: width
D: height
13. Which one of the following property is provided by HTML element in DOM?
A: innerHTML
B: attribute
C: setAttribute(attrib,val)
D: all of them
14. Which one of the following code is used to hide the p tag on click event using
jquery?
A: $(document).ready(function(){
$("p").click(function(){
$(this).hide();
});});
B:$(document).ready(function(){
$("#p").click(function(){
$(p).hide();
});});
C:$(document).ready(function(){
$(".p").click(function(){
$(this).hide();
});});
D:$(document).ready(function(){
$(p).click(function(){
$(p).hide();
});});
15. Which one of the following is correct about jquery callback functions?
A: A callback function must be called by user from code
B: A callback function is executed after the current effect is 100% finished.
C: A callback can be used to only hide and show the HTML element
D: B: A callback function is executed before the current effect is finished.
16. Which one of the following is not the jquery event?
A: blur
B: change
C: click
D: search
17. Which one of the following function returns all the direct children of the
selected
element?
A: child()
B: children()
C: DirectChildren()
D: node()
18. Which one of the following is false about package.json?
A: package.json is present in the root directory of any Node application/module.
B: package.json is used to define the properties of a package.
C: package.json can be used to update dependencies of a Node application.
D: None of the above.
19. Which one of the following is not the type of stream in Nodejs?
A: Readable
B: Executable
C: Writable
D: Duplex
20. Which one of the following syntax is correct to open a file in asynchronous
mode using
fs module?
A: fs.open(callback)
B: fs.open(path,flags[, mode], callback)
C:fs.open(path)
D:fs.open(path, flags[, mode])
21. _____________________ function is used to add a listener at the end of the
listeners
array for the specified event.
A: addListener(listener)
B: add(event, listener)
C: addListener(event, listener)
D: addListener(event)
22. Which one of the following is the correct method to create event emitter object
in
nodejs?
A: var events = require('events');
var eventEmitter = new events.EventEmitter();
B: var events = require('events');
var eventEmitter = generateEventEmitter();
C: var events = require('events');
var eventEmitter = new Emitter();
D: var events = require('events');
var eventEmitter = createEventEmitter(new MyEvent());
23. Which one of the following will load the middleware in ExpressJS?
A: app.add
B: app.use
C: app.set
D: Any of the above
24. Which one of the following option is correct for the below code?
var http = require('http');
var server = http.createServer(function(req,res){
var path = req.url.replace(/\/?(?:\?.*)?$/, '').toLowerCase();
switch(path) {
case '' :
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>Home Page</h1>');
break;
case '/about' :
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>About us</h1>');
break;
default:
res.writeHead(404, { 'Content-Type': 'text/plain' });
res.end('Not Found');
break;
}
});
server.listen(3000);
A: It will run the server on port number 3000
B: url http://localhost:3000/about will display About us
C: url http://localhost:3000/ will display Home Page
D: All of the above
25. What url.parse() does?
A: This method, and it will return a URL object with each part of the address as
properties.
B: This method, and it will return a URL in list form.
C: This method will print the URL
D: This method is invalid
26. Which one of the following method converts a JavaScript object or value to a
JSON
string?
A: JSON.tostring()
B: JSON.stringify()
C: json.stringify()
D: Json.stringify()
27. Http methods used in express.js are ___________ to create Rest services.
A: Get, Post, Put, Delete
B: Get, Post. Update, Delete
C: Get, Post, Update, Remove
D: Get, Post, Update
28. Which among the following is not a built in module in Node Js?
A: OS
B: PATH
C: HTTP
D: EXPRESS
29 . Which of the following options best describe the markup given below?
<div class="row">
<div class="col-md-1">.col-md-1</div>
<div class="col-md-5">.col-md-5</div>
<div class="col-md-6">.col-md-6</div>
</div>
A: generates three equal-width columns starting at tablets and scaling to large
desktops.
Not supported in mobiles
B: generates three columns with 1,5,6-width respectively, starting at tablets and
scaling to
large desktops. On mobile phones, the columns will automatically stack
C: generates three columns with width 5,1,6 starting at mobiles and scaling to
large
desktops
D: generates three columns with 6,5,1-width respectively columns starting at
desktops. On
mobile phones, the columns will automatically stack
30. Which one of the following syntax can be used to access value of ‘id’?
A: req.param[0]
B: req.params.id
C: req.body.id
D: req.id
31. _______________ plugin is used to cycle through elements, like a slideshow.
A: SlideShow
B: Orbit
C: Carousel
D: Scrollspy
32. ________________ class is used to create a badge.
A: .label
B: .tag
C: .badge
D: .flag
33. How many columns are in bootstrap grid system?
A: 12
B: 9
C: 3
D: 6
34. ___________error send by server in HTTP protocol when requested resource not
found.
A: 503
B: 404
C: 545
D: 304
35. Which one is correct about HTTP?
A: It is a stateless protocol
B: It is a statefull protocol
C: Both of the above
D: not a protocol
36. Which one of the following is correct about domain name?
A: A domain name is the address where Internet users can access your website
B: it is difficult for humans to remember ip address. Because of this, domain names
were
developed and used to identify entities on the Internet rather than using IP
addresses.
C: A domain name can be any combination of letters and numbers, and it can be used
in
combination of the various domain name extensions, such as .com, .net and more.
D: All of the above
37. Which one of the following is used to set state in react ?
A: this.state()
B: this.setState()
C: this.getState()
D: this.showState()
38. Which one of the following function is used to perform rest api request?
A: api()
B: fetch()
C: request()
D: rest()
39. In react component we can return only _______________ element.
A: 1
B: 2
C: 3
D: 4
40. As soon as the state of react component is changed, component will
___________________________.
A: Does nothing , you have to call render method to render the component again
B: re-renders the component
C: be created again from scratch
D: None of above
41. Which one of the following prevents any changes to an object?
A: Object.freeze(object)
B: Object.froze(object)
C: froze(object)
D: Object.isfreeze(object)
42. Which one of the following selects the first <li> element of the first <ul>?
A: $("ul li:first")
B: $(" li:first")
C: $("ul first")
D: $(":first")
43. Which one of the following selects all elements?
A: $("all")
B: $(*)
C: $(“*")
D: Not possible
44. Which one of the following is used to create HTTP module instance?
A: var http = require("http");
B: var http = new require("http");
C: var http = new http();
D: None of the above
45. How many number of callback functions can be attached to handle a request?
A: 1
B: unlimited
C: None
D: 255
46. ______________________module is used to perform the file system related
operation.
A: fileStream
B: file
C: fs
D: fileSystem
47. Which one of the following is the core features of the express.js?
A: Allows to set up middlewares to respond to HTTP Requests.
B: Defines a routing table which is used to perform different actions based on HTTP
Method and URL.
C: Defines a routing table which is used to perform different actions based on HTTP
Method and URL.
D: All of the above
48. Which one of the following built-in middleware provided by express.js to serve
static
files, such as images, CSS, JavaScript, etc.?
A: express.static
B: expressStatic
C: static
D: None of the above
49. Which one of the following is not true about react-redux?
A: It is state management library
B: It gives access to store through provider
C: We can also pass data above provider using redux
D: All of the above
50. _________________is used to load the middleware in ExpressJS.
A: app.add
B: app.use
C: app.set
D: Any of the above
51. The _______________ attribute adds video controls, like play, pause, and
volume.
A: controls
B: control
C: option
D: attribute
52. Which one of the following value of type attribute of input tag is invalid?
A: text
B: url
C: call
D: number
53. The ______________ attribute provides an alternate text for an image.
A: alt
B: option
C: controls
D: placeholder
54. In CSS,_____________ is the range of opacity property.
A: 0.0-10.0
B: 1-10
C: 0.0-1.0
D: 1-100
55. What are the two ways that data gets handled in React?
A: state & props
B: services and component
C: state
D: props
56. ReactJS uses ______________________ to increase performance.
A: Original DOM
B: Virtual DOM
C: Both A and B
D: None of the above
57. ___________________ used to pass data to a component from outside.
A: setState
B: render and arguments
C: props
D: propType
58. Everything in react is a _____________________.
A: Module
B: Component
C: Package
D: Class
59. What function allows you to render React content in an HTML page?
A: React.mount()
B: ReactDOM.start()
C: ReactDOM.render()
D: React.render()
60. What is state in React?
A: A persistent storage
B: An internal data store of a component
C: It’s a data transfer mechanism
D: None of the aboveQuestionID : 10521 Subject Name XML
Q1. Which of the following XSLT pattrens is used to match any descendand
nodes?
1. /
2. //
3. .
4. ..
Correct Answer : 2
Your Answer :
QuestionID : 10523 Subject Name XML
Q2. In simple type built into XML schema boolean type holds
1. true,false
2. 1,0
3. both 1 and 2
4. true/false and any number except 0
Correct Answer : 3
Your Answer :
QuestionID : 10524 Subject Name XML
Q3. What is the correct syntax of declaration which defines the XML
version?
1. < xml version="1.0" / >
2. < ?xml version="1.0"? >
3. < ?xml version="1.0"/ >
4. none
Correct Answer : 2
Your Answer :
QuestionID : 10536 Subject Name XML
Q4. A hexadecimal value representing an RGB triplet can be expressed in
three or six digits.
Correct Answer : T
Your Answer :
QuestionID : 10543 Subject Name XML
Q5. Valid XML must be welformed.
Correct Answer : T
Close this Window Hi dac46, You have scored : 0
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm 2/10
Your Answer :
QuestionID : 10548 Subject Name XML
Q6. The transformation of XML document into another type of the document
by XSLT
can be done by
1) in the server
2) in the client
3) With a separate program
1. only 1,2
2. only 2,3
3. all are correct
4. only 1,3
Correct Answer : 3
Your Answer :
QuestionID : 10556 Subject Name XML
Q7. The attribute used to define a new namespace is _______
1. XMLNS
2. XmlNameSpace
3. Xmlns
4. XmlNs
Correct Answer : 3
Your Answer :
QuestionID : 10564 Subject Name XML
Q8. To use the external DTD we have the syntax:
1. < ?xml version="1.0" standalone="no"? >
< !DOCTYPE DOCUMENT SYSTEM "order.dtd"? >
2. < ?xml version="1.0" standalone="yes"? >
< !DOCTYPE DOCUMENT SYSTEM "order.dtd"? >
3. < ?xml version="1.0" standalone="no"? >
< !DOCTYPE DOCUMENT "order.dtd"? >
4. < ?xml version="1.0" standalone="yes"? >
< !DOCTYPE DOCUMENT SYSTEM "order.dtd"? >
Correct Answer : 1
Your Answer :
QuestionID : 10571 Subject Name XML
Q9. Namespaces in XML cause regretable naming collisions.
Correct Answer : F
Your Answer :
QuestionID : 10581 Subject Name XML
Q10. <choice> is used for grouping elements.
Correct Answer : T
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm
3
/10
Your Answer :
QuestionID : 10597 Subject Name XML
Q11. A valid value for maxOccurs is unbounded.
Correct Answer : T
Your Answer :
QuestionID : 10601 Subject Name XML
Q12. InXSLT style sheet we have syntax tt5o match elements wit id as (if id
is "change")
1. < xsl:template match= id( change )
>
2. < xsl:template match= (change) >
3. < xsl:template match= change
>
4. < xsl:template match-id= change >
Correct Answer : 1
Your Answer :
QuestionID : 10605 Subject Name XML
Q13. Whats so great about XML?
1. Easy data exchange
2. high speed on network
3. only (2)is correct
4. both (1)and(2) correct
Correct Answer : 4
Your Answer :
QuestionID : 10610 Subject Name XML
Q14. an internal subset requires a SYSTEM identifer.
Correct Answer : F
Your Answer :
QuestionID : 10613 Subject Name XML
Q15. To match the text node(in XSLT) the syntax will be
1. < xsl:template match="text" >
2. < xsl:template match-text="text" >
3. < xsl:template match=text() >
4. < xsl:template match="text()" >
Correct Answer : 4
Your Answer :
QuestionID : 10620 Subject Name XML
Q16. Certain attribute are permissible in end-tags.
Correct Answer : F
Your Answer :
QuestionID : 10643 Subject Name XML
Q17. A parameter entity is only legal in DTD.
Correct Answer : T
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm 4/10
Your Answer :
QuestionID : 10649 Subject Name XML
Q18. Child element and mixed content models must be enclosed in quotes.
Correct Answer : F
Your Answer :
QuestionID : 10654 Subject Name XML
Q19. How can we make attributes have multiple values
1. < myElement myAttribute=
" value1 value2 " / >
2. < myElement myAttribute=
" value1 " myAttribute=
" value2 " / >
3. < myElement myAttribute=
" value1,value2 " / >
4. attributes can not have multiple values
Correct Answer : 4
Your Answer :
QuestionID : 10655 Subject Name XML
Q20. The correct priority for implementing xml base IETMs is .
1. Develop DTD ,conduct a pilot project , create a modular library ,train
staff.
2. Train staff , convert legacy documents,develop DTD, create a modular
library .
3. Conduct a pilot programme , train staff,create modular library ,develop
DTD.
4. conduct a pilot programme,train staff,Develop DTD ,convert
documents,purchase XML tools.
Correct Answer : 3
Your Answer :
QuestionID : 10671 Subject Name XML
Q21. A schema describes
1. Grammer
2. Vocabulary
3. Structure
4. Datatype of XML document
which is/are correct?
1. 1,2
2. 1,3
3. 3,4
4. 1,2,3,4
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm 5/10
Correct Answer : 4
Your Answer :
QuestionID : 10677 Subject Name XML
Q22. Which of following is used to specify attribute list of an elements?
1. ATLIST
2. ?ATLIST
3. !ATLIST
4. #ATLIST
Correct Answer : 3
Your Answer :
QuestionID : 10682 Subject Name XML
Q23. Valid XML must be welformed.
Correct Answer : T
Your Answer :
QuestionID : 10696 Subject Name XML
Q24. Which of the following strings are a correct XML name?
1. _myElement
2. myElement
3. #myElement
4. None of the above
Correct Answer : 4
Your Answer :
QuestionID : 10701 Subject Name XML
Q25. Which statement correctly describes the capabilities of the XSLT
language?
1. 1. XSLT uses the DTD to determine how XML documents will be
translated.
2. XSLT specifies how a hirerarchial trees,representable by an XML
document may be translated into non-hirerarchial formats.
3. XSLT specifies how a hirerarchial tree,representable by an XML
document, may be translated into another hirerarchial tree, also representable
by an XML document.
4. XSLT specifies the formatting style to be used to render an XML
document.
Correct Answer : 3
Your Answer :
QuestionID : 10713 Subject Name XML
Q26. What does DTD stands for?
1. Direct Type Defination
2. Document Type Defination
3. Do The Dance
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm
6
/10
4. Dynamic Type Defination
Correct Answer : 2
Your Answer :
QuestionID : 10718 Subject Name XML
Q27. To create a coise in XML Schemas,we use the
1. < Xsd:Select>element
2. < Xsd: multi>element
3. < Xsd: choise>element
4. < Xsd: single>element
Correct Answer : 3
Your Answer :
QuestionID : 10719 Subject Name XML
Q28. Which of the following XML fragments are well-formed?
1. < myElement myAttribute="value1 <= value2"/ >
2. < myElement myAttribute="value1 & value2"/ >
3. < myElement myAttribute="value1 > value2"/ >
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 10732 Subject Name XML
Q29. XSL has formatting object "block".
1. is not supported in XSL
2. generates a block level reference area
3. create a display block
4. groups global declarations for a style sheet
Correct Answer : 2
Your Answer :
QuestionID : 10738 Subject Name XML
Q30. A DTD has richer datatypes than XML Schema.
Correct Answer : F
Your Answer :
QuestionID : 10747 Subject Name XML
Q31. which of the following instruct the broswer which stylesheet to use
1. <xml-stylesheet type=``text/xsl``href=``cd.xsl``>
2. <xml-stylesheet type=``text/xsl``xsl=``cd.xsl``>
3. <xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
4. <?xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
Correct Answer : 3
Your Answer :
QuestionID : 10769 Subject Name XML
Q32. Which of the following programs support XML or XML application?
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm 7/10
1. Internet Explorer 5.5
2. Netscape 4.7
3. Realplayer
4. Both 1 & 2
Correct Answer : 4
Your Answer :
QuestionID : 10773 Subject Name XML
Q33. The XSL formatting object use to hold the contents of the body of a
list item is
1. list-block
2. list-item-body
3. list-item
4. list-item-label
Correct Answer : 2
Your Answer :
QuestionID : 10775 Subject Name XML
Q34. What is a qualified name ?
1. Any name conforming to XML name specification
2. A name having prefix and local name separeted by colon
3. A name appliying only to qualified elements and attributes
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10776 Subject Name XML
Q35. The XSL formatting object which formats the data in a table is....
1. table
2. table-body
3. title
4. table-content
Correct Answer : 1
Your Answer :
QuestionID : 10792 Subject Name XML
Q36. Decimal is a built-in data type.
Correct Answer : T
Your Answer :
QuestionID : 10797 Subject Name XML
Q37. Which of the following statement is true.
1. XML is a direct subset of SGML.
2. SGML is an application of HTML.
3. XML is a kind of dynamic HTML.
4. SGML and XML both are same.
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm 8/10
Correct Answer : 1
Your Answer :
QuestionID : 10814 Subject Name XML
Q38. In simple type built into XML schema boolean type holds
1. true,false
2. 1,0
3. both 1 and 2
4. true/false and any number except 0
Correct Answer : 3
Your Answer :
QuestionID : 10819 Subject Name XML
Q39. A semicolon is a delimits elements names in a sequence list
Correct Answer : F
Your Answer :
QuestionID : 10843 Subject Name XML
Q40. Attribute standalone ="no" should be included in XML
declaration if a document:
1. is linked to an external XSL style sheet
2. has external general reference
3. has processing instructions
4. has an external DTD
Correct Answer : 4
Your Answer :
QuestionID : 10850 Subject Name XML
Q41. What is XML namespace?
1. Set of name applied to specific name wihin XML document such as
head and body
2. Set of names representing XML vocabulary
3. NOne of above
4. All of above
Correct Answer : 2
Your Answer :
QuestionID : 10855 Subject Name XML
Q42. To use the external DTD we have the syntax:
1. < ?xml version="1.0" standalone="no"? >
< !DOCTYPE DOCUMENT SYSTEM "order.dtd"? >
2. < ?xml version="1.0" standalone="yes"? >
< !DOCTYPE DOCUMENT SYSTEM "order.dtd"? >
3. < ?xml version="1.0" standalone="no"? >
< !DOCTYPE DOCUMENT "order.dtd"? >
4. < ?xml version="1.0" standalone="yes"? >
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm 9/10
< !DOCTYPE DOCUMENT SYSTEM "order.dtd"? >
Correct Answer : 1
Your Answer :
QuestionID : 10868 Subject Name XML
Q43. There is a way of Describing XML data,how?
1. XML uses a DTD to Describe the data
2. XML uses XSL to Describe Data
3. XML uses a Description node to describe data
4. Both 1&3
Correct Answer : 4
Your Answer :
QuestionID : 10874 Subject Name XML
Q44. Location paths comes from x-path standard .
Correct Answer : T
Your Answer :
QuestionID : 10883 Subject Name XML
Q45. DOM provides API-based access to tree models.
Correct Answer : T
Your Answer :
QuestionID : 10890 Subject Name XML
Q46. A DTD has richer datatypes than XML Schema.
Correct Answer : F
Your Answer :
QuestionID : 10899 Subject Name XML
Q47. which of the following instruct the broswer which stylesheet to use
1. <xml-stylesheet type=``text/xsl``href=``cd.xsl``>
2. <xml-stylesheet type=``text/xsl``xsl=``cd.xsl``>
3. <xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
4. <?xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
Correct Answer : 3
Your Answer :
QuestionID : 10934 Subject Name XML
Q48. A parameter entity is only legal in DTD.
Correct Answer : T
Your Answer :
QuestionID : 10944 Subject Name XML
Q49. Decimal is a built-in data type.
Correct Answer : T
Your Answer :
QuestionID : 10951 Subject Name XML
Q50. From what set of nammes do NCNames derive?
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/3.htm 10/10
1. Any combination of characters allowable in XML.
2. Any names confirming to XML Names,minus the colon.
3. Any names for elements and attributes within the DTD to which the
namespace refers.
4. None of the above.
Correct Answer : 2
Your Answer QuestionID : 10524 Subject Name XML
Q1. What is the correct syntax of declaration which defines the XML
version?
1. < xml version="1.0" / >
2. < ?xml version="1.0"? >
3. < ?xml version="1.0"/ >
4. none
Correct Answer : 2
Your Answer :
QuestionID : 10526 Subject Name XML
Q2. XML uses feature of
1. HTML
2. XHTML
3. VML
4. SGML
Correct Answer : 4
Your Answer :
QuestionID : 10529 Subject Name XML
Q3. The syntax for parameter entity is
1. < ! ENTITY % NAME DEFINATION >
2. < ENTITY % NAME DEFINATION >
3. < ! ENTITY $ NAME DEFINATION >
4. < ENTITY % NAME DEFINATION >
Correct Answer : 1
Your Answer :
QuestionID : 10533 Subject Name XML
Q4. What is the default namespace
1. the namespace used by default when no namespace is declared.
2. the namespace used when two or more namespaces are referenced.
3. The namespace that is referenced with the xmlns attribute,but without a
prefix.
4. none of above.
Correct Answer : 3
Your Answer :
Close this Window Hi dac46, You have scored : 0
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm 2/10
QuestionID : 10537 Subject Name XML
Q5. Valid XML document means (most appropriate)
1. the document has root element
2. the document contain at least one or more root element
3. the XML document has DTD ssociated with it & it complies with that
DTD
4. Each element must nest inside any enclosing element property
Correct Answer : 3
Your Answer :
QuestionID : 10544 Subject Name XML
Q6. what are the predefined attributes
1. xml:lang
2. xml:space
3. both
4. none
Correct Answer : 3
Your Answer :
QuestionID : 10561 Subject Name XML
Q7. XML Document can be viewed in
1. IE 3.0
2. IE 2.0
3. IE 6.0
4. IE x.0
Correct Answer : 3
Your Answer :
QuestionID : 10563 Subject Name XML
Q8. To use XML you must pay a small licinse fee to Sun Micorsystems.
Correct Answer : F
Your Answer :
QuestionID : 10572 Subject Name XML
Q9. XML namespaces are not associated with objects.
Correct Answer : T
Your Answer :
QuestionID : 10608 Subject Name XML
Q10. which of the following instruct the broswer which stylesheet to use
1. <xml-stylesheet type=``text/xsl``href=``cd.xsl``>
2. <xml-stylesheet type=``text/xsl``xsl=``cd.xsl``>
3. <xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
4. <?xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
Correct Answer : 3
Your Answer :
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm
3
/10
QuestionID : 10639 Subject Name XML
Q11. For XML document to be valid
1. Document need to be well formed also
2. Document need to be well formed
3. Document need to be well formed and valid
4. Document validity has no relationship with well formedness
Correct Answer : 3
Your Answer :
QuestionID : 10654 Subject Name XML
Q12. How can we make attributes have multiple values
1. < myElement myAttribute=
" value1 value2 " / >
2. < myElement myAttribute=
" value1 " myAttribute=
" value2 " / >
3. < myElement myAttribute=
" value1,value2 " / >
4. attributes can not have multiple values
Correct Answer : 4
Your Answer :
QuestionID : 10662 Subject Name XML
Q13. In simple type built into XML schema boolean type holds
1. true,false
2. 1,0
3. both 1 and 2
4. true/false and any number except 0
Correct Answer : 3
Your Answer :
QuestionID : 10681 Subject Name XML
Q14. To use XSLT in an XML systems
1. The input and output of the XSLT processor must be unparsed XML
documents
2. The input and output of the XSLT processor must be hierarchical tree
representing an XML document
3. the XSLT processor must be called from a web agent
4. the XSLT processor must be given the DTD as well as the XML
document instance
Correct Answer : 2
Your Answer :
QuestionID : 10695 Subject Name XML
Q15. The attribute used to define a new namespace is _______
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm 4/10
1. XMLNS
2. XmlNameSpace
3. Xmlns
4. XmlNs
Correct Answer : 3
Your Answer :
QuestionID : 10710 Subject Name XML
Q16. Namespaces in XML cause regretable naming collisions.
Correct Answer : F
Your Answer :
QuestionID : 10731 Subject Name XML
Q17. DOM provides API-based access to tree models.
Correct Answer : T
Your Answer :
QuestionID : 10739 Subject Name XML
Q18. XML Schema unfortunately did not inherit the attribute types from
XML 1.0.
Correct Answer : F
Your Answer :
QuestionID : 10755 Subject Name XML
Q19. When processing an output XML, "new line" symbols
1. are copied into output "as is", i.e. "CR+LF" for Windows,CR fpr
macintosh,LF for UNIX
2. are converted to single LF symbol
3. are converted to single CR symbol
4. are discarded
Correct Answer : 2
Your Answer :
QuestionID : 10761 Subject Name XML
Q20. Which of the following strings are a correct XML name?
1. xmlExtension
2. xmlNewElement
3. XMLElement#123
4. All
Correct Answer : 2
Your Answer :
QuestionID : 10773 Subject Name XML
Q21. The XSL formatting object use to hold the contents of the body of a
list item is
1. list-block
2. list-item-body
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm 5/10
3. list-item
4. list-item-label
Correct Answer : 2
Your Answer :
QuestionID : 10776 Subject Name XML
Q22. The XSL formatting object which formats the data in a table is....
1. table
2. table-body
3. title
4. table-content
Correct Answer : 1
Your Answer :
QuestionID : 10788 Subject Name XML
Q23. Child element and mixed content models must be enclosed in quotes.
Correct Answer : F
Your Answer :
QuestionID : 10797 Subject Name XML
Q24. Which of the following statement is true.
1. XML is a direct subset of SGML.
2. SGML is an application of HTML.
3. XML is a kind of dynamic HTML.
4. SGML and XML both are same.
Correct Answer : 1
Your Answer :
QuestionID : 10813 Subject Name XML
Q25. The XSL formatting object which formats the data in a tavble is
1. table
2. table-body
3. title
4. table-content
Correct Answer : 1
Your Answer :
QuestionID : 10819 Subject Name XML
Q26. A semicolon is a delimits elements names in a sequence list
Correct Answer : F
Your Answer :
QuestionID : 10823 Subject Name XML
Q27. A schema describes
1. Grammer
2. Vocabulary
3. Structure
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm 6/10
4. Datatype of XML document
which is/are correct?
1. 1,2
2. 1,3
3. 3,4
4. 1,2,3,4
Correct Answer : 4
Your Answer :
QuestionID : 10824 Subject Name XML
Q28. What is the default namespace
1. the namespace used by default when no namespace is declared.
2. the namespace used when two or more namespaces are referenced.
3. The namespace that is referenced with the xmlns attribute,but without a
prefix.
4. none of above.
Correct Answer : 3
Your Answer :
QuestionID : 10826 Subject Name XML
Q29. Which of the following xml fragment are well-formed ?
1. < ?xml? >
2. < ?xml version ="1.0? >
3. < ?xml encoding="JIS"? >
4. < ?xml encoding="JIS" version="1.0"? >
Correct Answer : 2
Your Answer :
QuestionID : 10833 Subject Name XML
Q30. To use XSLT in an XML systems
1. The input and output of the XSLT processor must be unparsed XML
documents
2. The input and output of the XSLT processor must be hierarchical tree
representing an XML document
3. the XSLT processor must be called from a web agent
4. the XSLT processor must be given the DTD as well as the XML
document instance
Correct Answer : 2
Your Answer :
QuestionID : 10845 Subject Name XML
Q31. It is permissible,but not mandatory to quote XML attribute value.
Correct Answer : F
Your Answer :
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm 7/10
QuestionID : 10847 Subject Name XML
Q32. The attribute used to define a new namespace is _______
1. XMLNS
2. XmlNameSpace
3. Xmlns
4. XmlNs
Correct Answer : 3
Your Answer :
QuestionID : 10851 Subject Name XML
Q33. Which of the following is a valid XSLT iteration command ?
1. for
2. for-all
3. for-each
4. in-turn
Correct Answer : 3
Your Answer :
QuestionID : 10853 Subject Name XML
Q34. Which statement correctly describes the capabilities of the XSLT
language?
1. 1. XSLT uses the DTD to determine how XML documents will be
translated.
2. XSLT specifies how a hirerarchial trees,representable by an XML
document may be translated into non-hirerarchial formats.
3. XSLT specifies how a hirerarchial tree,representable by an XML
document, may be translated into another hirerarchial tree, also representable
by an XML document.
4. XSLT specifies the formatting style to be used to render an XML
document.
Correct Answer : 3
Your Answer :
QuestionID : 10860 Subject Name XML
Q35. To match specific XML element child like < name > of parent element
is
< PLANET > the syntax will be
1. < xsl:template mach="PLANET_NAME" >
2. < xsl:template mach="PLANET/NAME" >
3. < xsl:template mach="/NAME" >
4. < xls:template match="//" >
Correct Answer : 4
Your Answer :
QuestionID : 10862 Subject Name XML
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm
8
/10
Q36. Namespaces in XML cause regretable naming collisions.
Correct Answer : F
Your Answer :
QuestionID : 10872 Subject Name XML
Q37. <choice> is used for grouping elements.
Correct Answer : T
Your Answer :
QuestionID : 10878 Subject Name XML
Q38. XML forms comments differently than SGML and HTML.
Correct Answer : F
Your Answer :
QuestionID : 10882 Subject Name XML
Q39. What is the roll of XPATH language in XSL processing?
1. XPATH identifies the order or path of processing to be followed as the
XSL language is processed.
2. XPATH identifies the location in the XML data to be transformed in the
source tree and the location to be geneated in the output tree specified in XSL
transaction prescription.
3. XPATH identifies the path of processing to be followed in execution of
XSL transaction prescription
4. XPATH specifies which XSL transform file use tobe usedin transaction
of XML
Correct Answer : 2
Your Answer :
QuestionID : 10883 Subject Name XML
Q40. DOM provides API-based access to tree models.
Correct Answer : T
Your Answer :
QuestionID : 10891 Subject Name XML
Q41. XML Schema unfortunately did not inherit the attribute types from
XML 1.0.
Correct Answer : F
Your Answer :
QuestionID : 10899 Subject Name XML
Q42. which of the following instruct the broswer which stylesheet to use
1. <xml-stylesheet type=``text/xsl``href=``cd.xsl``>
2. <xml-stylesheet type=``text/xsl``xsl=``cd.xsl``>
3. <xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
4. <?xml-stylesheet type=``text/xsl``href=``cd.xsl``?>
Correct Answer : 3
Your Answer :
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm 9/10
QuestionID : 10905 Subject Name XML
Q43. PI in XML specification stands for
1. 3.14
2. priceless instruction
3. processing instruction
4. polymorphic instriction
Correct Answer : 3
Your Answer :
QuestionID : 10907 Subject Name XML
Q44. When processing an output XML, "new line" symbols
1. are copied into output "as is", i.e. "CR+LF" for Windows,CR fpr
macintosh,LF for UNIX
2. are converted to single LF symbol
3. are converted to single CR symbol
4. are discarded
Correct Answer : 2
Your Answer :
QuestionID : 10911 Subject Name XML
Q45. Certain attribute are permissible in end-tags.
Correct Answer : F
Your Answer :
QuestionID : 10913 Subject Name XML
Q46. Which of the following strings are a correct XML name?
1. xmlExtension
2. xmlNewElement
3. XMLElement#123
4. All
Correct Answer : 2
Your Answer :
QuestionID : 10927 Subject Name XML
Q47. What is a qualified name ?
1. Any name conforming to XML name specification
2. A name having prefix and local name separeted by colon
3. A name appliying only to qualified elements and attributes
4. None of the above
Correct Answer : 2
Your Answer :
QuestionID : 10928 Subject Name XML
Q48. The XSL formatting object which formats the data in a table is....
1. table
2. table-body
12/14/2018 Result:- SunBeam Infotech Pvt LTD, Pune
file:///D:/STUDY%20MATERIAL/sample%20paper/cdac%20dumps/cdac%20dumps/
imp_multiple_question/imp%20multiple%20question/XML/1.htm 10/10
3. title
4. table-content
Correct Answer : 1
Your Answer :
QuestionID : 10938 Subject Name XML
Q49. The < xsl:output > instruction is required in every XSL stylesheet.
Correct Answer : F
Your Answer :
QuestionID : 11050 Subject Name XML
Q50. XML elements cannot be empty.
Correct Answer : F
Your AnsweACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 1 of 1
Q.1 Fill in the Blanks: (1 Mark each)
1. With XML, you can create your own __elements__, also called tags.
2. The beginning or first element in XML is called the __root (document)__ element.
3. Jon Bosak is known as the __father__ of XML.
4. HTML is an application of __SGML _.
5. The XML linking language is called __XLink__.
6. The CSS property __font-weight__ allows you to control text boldness.
7. A child element has a direct relationship to a __parent__ element.
8. A __[prefix with]__ colon in an element or attribute name must be associated
with a namespace
identifier.
9. An __attribute__ modifies an element by associating information with it.
10. Element names are __case__ sensitive.
11. External DTDs can reference both SYSTEM and __PUBLIC__ identifiers.
12. A valid XML document has a __DTD__ associated with it.
13. An XML document can have both an __internal__ and external subset.
14. <!ATTLIST ...> declares one or more __attributes__.
15. A content __model__ defines what elements may be contained within another
element.
16. Element names must begin with a letter or an __underscore__.
17.An __empty__ element contains no content.
18. A __?__ repetition operator mean zero or one instance of the element.
19. Content models are defined with either a __sequence__ list or a choice list.
20. In the functional notation rgb( ), you can use numbers or __percentages__
21. Attribute names must begin with a __letter__ or underscore.
22. The keyword for an optional attribute is __#IMPLIED__ .
23. The __ID__ attribute type defines an attribute value as a unique identifier.
24. The __xml:lang__ attribute is a built-in XML attribute for specifying
languages.
25. A __NOTATION__ declaration is needed for this type of enumerated attribute..
26. An internal entity is declared locally in a DTD while an __external__ entity is
declared in a
separate document.
27. A __parameter__ entity is legal only in a DTD.
28. A general entity reference begins with an __ampersand (&)__ and ends with a
semicolon.
29. Any parsed entity consists of legal __XML__ text.
30. One tool you can use to test a DTD is with a __conditional__ section.
31. A namespace definition without a prefix is known as a __default__ namespace.
32. Namespaces are declared with an __xmlns declaration__ in an element start-tag.
33. The namespace __myth__ refers to a belief that namespaces are associated with,
or validated by,
schemas.
34. You can declare __multiple__ namespaces with multiple instances of the xmlns
__declaration__ within a start-tag.
35. Namespaces are often declared within the start-tag of a __root__ element.
36. Unnamed definitions of simple or complex types are known as __anonymous__.
37. With <complexType>, you can define content of both __complex__ and mixed type.
38. minOccurs specifies the minimum times an element may occur while __maxOccurs__
determines the maximum times it may occur
39. The __ref__ attribute can reference other element and attribute definitions in
a schema.
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 2 of 2
40. The <attribute> element must be declared with either a named or anonymous
__complexType__
41. The original XML document or byte stream is referred to as a source tree and
the output is called
the __result__ tree.
42. Location paths can be either abbreviated or __unabbreviated__.
43. A synonym for <xsl:stylesheet> is __<xsl:transform>__.
44. The instruction <xsl:element> is an example of an __XSLT__ element.
45. Both <xsl:if> and <xsl:choose> help perform __conditional__ processing.
46. The root element for XHTML is __html__.
47. The root element must contain a __namespace__ declaration.
48. In XHTML, always use a __CDATA__ section inside the <script> element.
49. The forthcoming recommendation for small devices is called XHTML __Basic__.
50. __Document__ profiles defines the elements, etc. that are appropriate for a
certain class of
document, without a formal recommendation.
Q.2 Select True or False: (1 Mark each)
1. XML will replace HTML as the leading language for the Web. (False)
2. To use XML you must pay a small license fee to Sun Microsystems. (False)
3. A URL is a subset of the URI naming scheme. (True)
4. Namespaces in XML cause regrettable naming collisions. (False)
5. Every XML document should have a prolog or XML declaration. (False)
6. XML forms comments differently than SGML and HTML. (False)
7. HTML elements must always properly nest. (False)
8. Valid XML must also be well formed. (True)
9. It is permissible, but not mandatory, to quote XML attribute values. (False)
10. An internal subset requires a SYSTEM identifier. (False)
11. An external subset requires a URI. (True)
12. A validity error is always fatal. (False)
13. XML does not necessarily have to be well-formed, but it must be valid. (False)
14. An element name can begin with any character that is legal in an element.
(False)
15. Child element and mixed content models must be enclosed in quotes. (False)
16. A semicolon delimits element names in a sequence list. (False)
17. A hexadecimal value representing an RGB triplet can be expressed in three or
six digits. (True)
18. You can skip quotation marks around an attribute value. (False)
19. If you reuse a unique ID, it should generate a validity error. (True)
20. An unparsed entity is a non-XML data type. (True)
21. Certain attributes are permissible in end-tags. (False)
22. CSS/2’s attribute selector is fully implemented in the Netscape and Microsoft
browsers. (False)
23. An unparsed entity may require a helper application to render it. (True)
24. Predefined entities represent special markup characters. (True)
25. Parameter entity references begin with an ampersand. (False)
26. Unicode characters can be represented by hexadecimal numbers. (True)
27. Conditional sections are legal in XML documents as well as DTDs. (False)
28. Namespaces can be associated with schemas by a URI. (True)
29. A URI can be either a URL or a URN. (True)
30. Default namespaces apply to attributes. (False)
31. XML namespaces are not associated with objects. (True)
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 3 of 3
32. <choice> is used for grouping elements. (True)
33. <string> is a built-in simple datatype. (True)
34. A valid value for maxOccurs is unbounded. (True)
35. A DTD has richer datatypes than XML Schema. (False)
36. XML Schema unfortunately did not inherit the attribute types from XML 1.0.
(False)
37. Location paths come from the XPath standard. (True)
38. You cannot embed an XSL stylesheet as you can CSS in HTML. (False)
39. XSLFO does not completely replace CSS. (True)
40. The <xsl:output> instruction is required in every XSL stylesheet. (False)
41. XSLT is a W3C recommendation while XSLFO is not (yet). (True)
42. Attribute values must be surrounded by double quotes. (False)
43. XHTML is moving towards modularization. (True)
44. It is good practice to nest <a> elements within <a> elements. (False)
45. Do not include the XHTML namespace when including XHTML in an XML document.
(False)
46. The content or MIME type for XHTML is text/xhtml. (False)
Q.3 Select the correct answer: (1 Mark each)
1. What does XML stand for?
1. eXtra Modern Link
2. eXtensible Markup Language
3. Example Markup Language
4. X-Markup Language
Level: Easy
2. What is the correct syntax of the declaration which defines the XML version?:
1. <xml version="1.0" />
2. <?xml version="1.0"?>
3. <?xml version="1.0" />
4. None of the above
Level: Easy
3. Which statement is true?
1. All the statements are true
2. All XML elements must have a closing tag
3. All XML elements must be lower case
4. All XML documents must have a DTD
Level: Easy
4. Is it easier to process XML than HTML?
1. Yes
2. No
3. Somtimes
4. Cant say
Level: Easy
5. Which of the following programs support XML or XML applications?:
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 4 of 4
1. Internet Explorer 5.5
2. Netscape 4.7
3. RealPlayer.
4. both 1 and 2
Level: Easy
6. Kind of Parsers are
1. well-formed
2. well-documented
3. non-validating and validating
4. none of the above
Level: Easy
7. Well formed XML document means
1. it contains a root element
2. it contain an element
3. it contains one or more elements
4. must contain one or more elements and root element must contain all
other elements
Level: Easy
8. Comment in XML document is given by
1. <?-- -->
2. <!-- --!>
3. <!-- -->
4. </-- -- >
Level: Easy
9. When processing an output XML, "new line" symbols
1. are copied into output "as is", i.e. "CR+LF" for Windows, CR for Macintosh, LF
for Unix.
2. are converted to single LF symbol
3. are converted to single CR symbol
4. are discarded
Level: Easy
10. Which of the following strings are a correct XML name?
1. _myElement
2. my Element
3. #myElement
4. None of the above
Level: Easy
11. Which of the following strings are a correct XML name?
1. xmlExtension
2. xslNewElement
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 5 of 5
3. XMLElement#123
4. All
Level: Easy
12. Which of the following XML fragments are well-formed?
1. <?xml?>
2. <?xml version="1.0"?>
3. <?xml encoding="JIS"?>
4. <?xml encoding="JIS" version="1.0"?>
Level: Easy
13. What are the predefined attributes
1. xml:lang
2. xml:space
3. both
4. none.
Level: Easy
14. Kind of Parsers are
1. well-formed
2. validating
3. non-validating
4. Both 2 & 3
Level: Easy
15. Valid XML document means (most appropriate)
(1) the document has root element
(2) the document contains atleast one or more root element
(3) the XML document has DTD associated with it & it complies with that DTD
(4) Each element must nest inside any enclosing element property
16. XML uses the features of
(1) HTML
(2) XHTML
(3) VML
(4) SGML
Level: Easy
17. XML document can be viewed in
(1) IE 3.0
(2) IE 2.0
(3) IE 6.0
(4) IE X.0
Level: Medium
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 6 of 6
Topic: DTD
18. There is a way of describing XML data, how?
1. XML uses a DTD to describe the data
2. XML uses XSL to describe data
3. XML uses a description node to describe data
4. Both 1and 3
Level: Medium
19. What does DTD stand for?
1. Direct Type Definition
2. Document Type Definition
3. Do The Dance
4. Dynamic Type Definition
Level: Medium
20. DTD includes the specifications about the markup that can be used within the
document, the
specifications consists of all EXCEPT
1. the browser name
2. the size of element name
3. entity declarations
4. element declarations
Level: Medium
21. Which of the following XML documents are well-formed?
1. <firstElement>some text goes here
<secondElement>another text goes here</secondElement>
</firstElement>
2. <firstElement>some text goes here</firstElement>
<secondElement> another text goes here</secondElement>
3. <firstElement>some text goes here
<secondElement> another text goes here</firstElement>
</secondElement>
4. </firstElement>some text goes here
</secondElement>another text goes here<secondElement>
<firstElement>
Level: Medium
22. Which of the following XML fragments are well-formed?
1. <myElement myAttribute="someValue"/>
2. <myElement myAttribute=someValue/>
3. <myElement myAttribute=’someValue’>
4. <myElement myAttribute="someValue’/>
Level: Medium
23. How can we make attributes have multiple values:
1. <myElement myAttribute="value1 value2"/>
2. <myElement myAttribute="value1" myAttribute="value2"/>
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 7 of 7
3. <myElement myAttribute="value1, value2"/>
4. attributes cannot have multiple values
Level: Medium
24. Which of the following XML fragments are well-formed?
1. <myElement myAttribute="value1 <= value2"/>
2. <myElement myAttribute="value1 & value2"/>
3. <myElement myAttribute="value1 > value2"/>
4. None of the above
Level: Medium
25. The use of a DTD in XML development is:
1. required when validating XML documents
2. no longer necessary after the XML editor has been customized
3. used to direct conversion using an XSLT processor
4. a good guide to populating a templates to be filled in when generating an XML
document automatically
Level: Medium
26. Parameter entities can appear in
1. xml file
2. dtd file
3. xsl file
4. Both 1 and 2
Level: Medium
27. Attribute standalone="no" should be included in XML declaration if a document:
1. is linked to an external XSL stylesheet
2. has external general references
3. has processing instructions
4. has an external DTD
Level: Medium
28. In XML
(1) the internal DTD subset is read before the external DTD
(2) the external DTD subset is read before the internal DTD
(3) there is no external type of DTD
(4) there is no internal type of DTD
Level Easy
29. Disadvantages of DTD are
(i)DTDs are not extensible
(ii)DTDs are not in to support for namespaces
(iii)there is no provision for inheritance from one DTDs to another
(1) (i) is correct
(2) (i),(ii) are correct
(3) (ii),(iii) are correct
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 8 of 8
(4) (i),(ii),(iii) are correct
Level: Medium
30. To use the external DTD we have the syntax
(1) <?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
(2) <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
(3 )<?xml version=”1.0” standalone=”no”?>
<! DOCTYPE DOCUMENT “order.dtd”?>
(4) <?xml version=”1.0” standalone=”yes”?>
<! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>
Level: Medium
31. To add the attribute named Type to the <customer> tag the syntax will be
(1) <customer attribute Type=”exelent”>
(2) <customer Type attribute =”exelent”>
(3) <customer Type attribute_type=”exelent”>
(4) <customer Type=” exelent” >
Level: Medium
32. The syntax for parameter entity is
(1) <! ENTITY % NAME DEFINITION>
(2) < ENTITY % NAME DEFINITION>
(3) <! ENTITY $ NAME DEFINITION>
(4) < ENTITY % NAME DEFINITION>
Level: Medium
Topic: Schema
33. You can name the schema using the name attribute like
1. <schema attribute=”schema1”>
2. <schema nameattribute=”schema1”>
3. <schema nameattri=”schema1”>
4. <schema name=”schema1”>
Level: Medium
34. The default model for complex type, in XML schemas for element is
1. textOnly
2. elementOnly
3. no default type
4. both 1 & 2
Level: Medium
35. Microsoft XML Schema Data types for Hexadecimal digits representating octates
1. UID
2. UXID
3. UUID
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 9 of 9
4. XXID
Level: Medium
36. A schema describes
(i) grammer
(ii) vocabulary
(iii) structure
(iv) datatype of XML document
(1) (i) & (ii) are correct
(2) (i),(iii) ,(iv) are correct
(3) (i),(ii),(iv) are correct
(4) (i),(ii),(iii),(iv) are correct
Level: Medium
37. Microsoft XML Schema Data Type “ boolean” has values
(1) True ,False
(2) True ,False or 1,0
(3) 1,0
(4) any number other then zero and zero
Level: Difficult
38. Simple type Built into Schema “ data’ represent a data in
(1) MM-DD-YY
(2) Dd-MM-YY
(3) YY-MM-DD
(4) YYYY-MM-DD
Level: Medium
39. In simple Type Built into XML schema Boolean type holds
(1) True, False
(2) 1,0
(3) both (1) & (2)
(4) True/False and any number except 0
Level: Medium
40. In simple type built into XML schema type flat has single precision of ________
floating point
(1) 16 bit
(2) 32 bit
(3) 8 bit
(4) 4 bit
Level: Medium
Topic: Misc.
41. The XML DOM object is
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 10 of 10
1. Entity
2. Entity Reference
3. Comment Reference
4. Comment Data
Level: Medium
42.Attribute of the document interface in DOM is/are
(i)doctype
(ii)implementation
(iii)documentElement
which are read only attributes
(1) (i) only
(2) (ii) only
(3) (ii),(iii) only
(4) all
Level: Medium
43. The default model for complex type, in XML schemas for element is
(1) textOnly
(2) elementOnly
(3) no default type
(4) both a & b
Level: Easy
44. To create a choise in XML schemas, we use the
(1) <xsd:select> element
(2) <xsd:multi> element
(3) <xsd:choise> element
(4) <xsd:single> element
Level: Medium
45. The XML DOM object is
(1) Entity
(2) Entity Reference
(3) Comment Reference
(4) Comment Data
Level: Medium
46. To create a data island we use the _____________HTML element
(1) <XML>
(2) <dataisland>
(3) <Island>
(4) <XMLIsland>
Level: Medium
47. To Bind the HTML elements with DSO we use _________ attribute
(1) DATASOURCE
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 11 of 11
(2) DATAFIELD
(3) DATASRC
(4) DATAFLD
Level: Medium
48. To bind the HTML element <INPUT> Type in text with the datasource “
dsoCustomer” we
use
(1) <INPUT TYPE=”TEXT” DATAFIELD=”#dsoCustomer”>
(2) <INPUT TYPE=”TEXT” DATASRC=” dsoCustomer”>
(3) <INPUT TYPE=”TEXT” DATASRC=” #dsoCustomer” >
(4) <INPUT TYPE=”TEXT” DATAFLD=” #dsoCustomer”>
Level: Medium
49. XML DSOs has the property for the number of pages of data the recordset
contains
(1) count
(2) number
(3) pageCount
(4) pageNumber
Level: Medium
50. Whats so great about XML?
(1) Easy data exchange
(2) High speed on network
(3) Only (2)is correct
(4) Both (1) & (2)
Level: Medium
51. For XML document to be valid
(1) document need to be well formed also
(2) document need not to be well formed
(3) document need to be well formed & valid
(4) document validity has no relationship with well formedness
Level: Medium
52. A textual object is a well formed XML document if
(i) Taken as a whole it matches the production labeled document.
(ii) Each of the parsed entity which is referenced directly or indirectly within
the
document can be well formed
(1) (i) is correct
(2) (ii)is correct
(3) both are correct
Level: Medium
53. <?xml version=” 1.0” standalone=” yes” encoding=”UTF-8” ?>
(1) it shows that the version is 1.0
(2) shows thatit is standalone
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 12 of 12
(3) the standalone is wrong
(4) version attribute is not in XML
Level: Medium
54. The attribute used to define a new namespace is
(1) XMLNS
(2) XmlNameSpace
(3) Xmlns
(4) XmlNs
Level: Medium
Topic: Templates
55. To match the root node in XMLT transform the syntax will be
1. <xsl:template match=”Document”>
2. <xsl:template match=”Root”>
3. <xsl:template match=”RootNode”>
4. <xsl:template match=”/”>
Level: Medium
56. To match the specific XML elements child like <NAME> of parent element is
<PLANET> the syntax will
be
1. <xsl:template match=”PLANET_NAME”>
2. <xsl:template match=”PLANET/NAME”>
3. <xsl:template match=”/NAME”>
4. <xsl:template match=”//”>
Level: Medium
57. PI in XML specification stands for
1. 3.14
2. priceless instruction
3. processing instruction
4. polymorphic inheritance
Level: Medium
58. A validating XML application should be used when:
1. the design demands that all elements use both start and end tags
2. missing or out-of-place elements could cause application errors
3. attribute values cannot refer to external entity references
4. High performance is an important architectural constraint
Level: Medium
59. A DSO operates like
(a) data simulation object at server side
(b) dynamic source object at client side
(c) data source object at client side
(d) data simulation object at client side
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 13 of 13
Ans: ( c)
Topic: XSL
60. The XSL formating object use to format a list is
1. list-block
2. list-item
3. list-item-body
4. list-item-label
Level: Difficult
61. The attribute used to define a new namespace is
1. XMLNS
2. XmlNameSpace
3. Xmlns
4. XmlNs
Level: Difficult
62. Identify the most accurate statement about the application of XML:
1. XML must be used to produce XML and HTML output.
2. XML cannot specify or contain presentation information.
3. XML is used to describe hierarchically organized information.
4. XML performs the conversion of information between different e-business
applications.
Level: Difficult
63. The XSl formatting object which formats the data and caption of a table is
(1) table
(2) table-content
(3) table-text
(4) none of the above
Level: Difficult
64. The XSL formating object which holds the content of the table body
(1) table
(2) table-body
(3) table-content
(4) table-footer
Level: Difficult
65. The XSL formatting object which formats the data in a table
(1) table
(2) table-body
(3) title
(4) table-content
Level: Difficult
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 14 of 14
66. The XSL formating object use to hold the content of the label of a list item is
(1) list-block
(2) list item
(3) list-item-body
(4) list-item-label
Level: Difficult
67. The XSL formating object use to hold the contents of the body of a list item is
(1) list-block
(2) list item
(3) list-item-body
(4) list-item-label
Level: Difficult
68. XSL has formatting object “ block”
(1) is not supported in XSL
(2) generates a block level reference area
(3) create a display block
(4) groups global declarations for a style sheet
Level: Difficult
69. XSL has “ block container” for formating the document
(1) to create a display block to format the titles
(2) to create a display block to format the paragraphes
(3) to create a display block to format the headlines & figures
(4) to create a block level reference area
Level: Difficult
70. The syntax for writing the minimum occurrence for an element is
(1) <xsd:element ref=” note” min=” 0”/>
(2) <xsd:elements ref=” note” min=” 0”/>
(3) <xsd:elements ref=” note” minOccur=”0”/>
(4) <xsd:elements ref=” note” minOccurs=” 0”/>
Level: Medium
71. The syntax for writing default values for element is
(1) <xsd:element name=”max” type=” xsd:integer” value=” 100”/>
(2) <xsd:element name=”max” type=” xsd:integer” fixValue=” 100”/>
(3) <xsd:element name=” max” type=” xsd:integer” default=” 100” />
(4) <xsd:element name=”max” type=” xsd:integer” defaultval=” 100”/>
Topic: XSLT , X-Pointers, XML
72. To use XSLT in an XML system:
1. the input and output of the XSLT processor must be unparsed XML documents
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 15 of 15
2. the input and output of the XSLT processor must be a hierarchical tree
representing an XML document
3. the XSLT processor must be called from a web agent
4. the XSLT processor must be given the DTD as well as the XML document
instance
Level: Difficult
73. What is the role of the XPath language in XSL processing?
1. XPath identifies the order or path of processing to be followed as the XSL
language is processed
2. XPath identifies locations in XML data to be transformed in the source tree
and the locations to be generated in output tree specified in XSL
translation prescriptions
3. XPath identifies the path to be followed in the execution of XSL translation
prescriptions
4. XPath specifies which XSL transform files are to be used in the translation of
XML
Level: Difficult
74. Which statement correctly describes the capabilities of the XSLT language?
1. XSLT uses the DTD to determine how XML documents will be translated
2. XSLT specifies how a hierarchical trees, representable by an XML document
may be translated into non-hierarchical formats
3. XSLT specifies how a hierarchical tree, representable by an XML
document, may be translated into another hierarchical tree, also
representable by an XML document
4. XSLT specifies the formatting style to be used to render an XML document
Level: Difficult
75. XSLT processors accept as input:
1. an XML conforming document file and an XSLT specification file
2. only an XML document
3. only an XSLT specification
4. either an XML document or an XSLT specification
Level: Difficult
76. The transformation of XML document in to another type of document by XSLT can
be done
by
(i)In the server
(ii)In the client
(iii)With a separate program
(1) only(i) & (ii)
(2) only (ii) & (iii)
(3) all are correct
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 16 of 16
(4) only (i) & (iii)
Level: Difficult
77: To match the root node in XMLT transform the syntax will be
(1) <xsl:template match=”Document”>
(2) <xsl:template match=”Root”>
(3) <xsl:template match=”RootNode”>
(4) <xsl:template match=” /” >
Level: Difficult
78: To match the specific XML elements in XMLT the syntax for given name “rootnode”
is
(1) <xsl:template match=”root”>
(2) <xsl:template match=”/”>
(3) <xsl:template match=” rootnode” >
(4) <xsl:template match=”//”>
Level: Difficult
79 To match the specific XML elements child like <NAME> of parent element is
<PLANET>
the syntax will be
(1) <xsl:template match=”PLANET_NAME”>
(2) <xsl:template match=” PLANET/NAME” >
(3) <xsl:template match=”/NAME”>
(4) <xsl:template match=”//”>
Level: Difficult
80. InXSLT style sheet we have syntax to match elements with id as (if id is “
change”)
(1) <xsl:template match=” id(‘change’)” >
(2) <xsl:template match=”(change)”>
(3) <xsl:template match=” change”>
(4) <xsl:template match-id=”Change”>
Level: Difficult
81. To match the text node (in XSLT) the syntax will be
(1) <xsl:template match=”text”>
(2) <xsl:template match-text=”text”>
(3) <xsl:template match=text( )>
(4) <xsl:template match=” text( )” >
Level: Difficult
82. An element declaration specifies
1. a single markup element
2. zmarkup elements
3. markup data
4. the document data
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 17 of 17
Level: Easy
83. Well formed XML document means(most appropriate)
1. it contains a root element
2. it contain an element
3. it contains one or more elements
4. must contain one or more elements and root element must contain all other
elements
Level: Easy
84: Which of the following specify that the order and content of "membership" is
not important
1. <!ELEMENT membership NORULE>
2. <!ELEMENT membership EMPTY>
3. <!ELEMENT membership ALL>
4. <!ELEMENT membership ANY>
Level: Easy
85: Which of the following is used to specify the attribute list of an element
1. ATTLIST
2. ?ATTLIST
3. !ATTLIST
4. #ATTLIST
Level: Medium
86: Which of the following instruct the browser which stylesheet to use
1. <xml-stylesheet type="text/xsl" href="cd.xsl">
2. <xml-stylesheet type="text/xsl" xsl="cd.xsl">
3. <?xml-stylesheet type="text/xsl" href="cd.xsl"?>
4. <?xml-stylesheet type="text/xsl" xsl="cd.xsl"?>
Level: Difficult
88: Which of the following XSLT Patterns is used to match any descendant nodes
1) /
2) //
3) .
4) ..
Level: Medium
89: Which of the following XSLT Patterns is used to match the parent node
1) /
2) //
3) .
4) ..
Level: Medium
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 18 of 18
90: Which of the following is a valid XSLT iteration command
1) for
2) for-all
3) for-each
4) in-turn
Level: Medium
91.What is an advantage of XML compared to HTML?
1) XML works on more platforms.
2) XML is suited to using Web pages as front ends to databases.
3) XML was designed for portable phones.
4) XML is simpler to learn than HTML.
Level: Difficult
92.The following best describes the development of XML.
1. XML developed from HTML because WEB browsers became more powerful.
2. XML is designed as a replacement because SGML can not be used for document
development.
3. XML builds on HTMLs ability to provide content to virtually any audience by
adding the power
of intelligent content.
4. XML is the modern replacement for HTML and SGML, taking the good points from
each,
making both of those languages obsolete.
Level: Medium
93) The correct priority for implementing XML based IETMs is :
1. Develop DTD, conduct a pilot project, create a modular library, train staff.
2. Train staff, convert legacy documents, develop DTD, create modular library.
3. Conduct pilot program, train staff, create modular library, develop DTD
4. Conduct pilot program, train staff, develop DTD, convert documents, purchace XML
tools.
Level: Difficult
94. Which of the following statements is true:
1. XML is a direct subset of SGML
2. SGML is an application of HTML
3. XML is a kind of dynamic HTML
4. XHTML is XML rewritten in HTML
5. SGML and XML are the same thing
Level: Difficult
95. What is a qualified name?
1. Any name conforming to the XML Names specification
2. A name having prefix and local name separated by a colon
3. A name applying only to qualified elements and attributes
4. None of the above
Level: Dfficult
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 19 of 19
96. What is a NCName
1. A Non-Common Name
2. A Non-Conforming Name
3. A Non-Colonized Name
4. None of the above
Level:Difficult
97. If a namespace is attached to an element by prefix, what is the effect on non-
prefixed child
elements
1. Nothing
2. The namespace affects the immediate nonprefixed child elements, but no others
3. The namespace affects all child elements of the element to which the namespace
is
attached no matter what level.
4. None of the above
Level:Difficult
98. What is the default namespace
1. The namespace used by default when no namespace is declared
2. The namespace used when two or more namespaces are referenced
3. A namespace that is referenced with the xmlns attribute, but without a prefix
4. None of the above
Level:Difficult
99.What is an XML namespace?
1. A set of names applied to specific spaces within an XML document, such as the
head
and body
2. A set of names representing a specific XML vocabulary
3. A set of names for XML documents pertaining to a particular vocabulary
4. None of the above.
Level:Difficult
100. From what set of names do NCNames derive?
1. Any combination of characters allowable in XML
2. Any names conforming to XML Names, minus the colon
3. Any names for elements and attributes within the DTD to which the namespace
refers
4. None of the above.
Level:Difficult
Q.4. Match the following
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 20 of 20
1.
c
1. Inventor of the Web and HTML
a. James Clark
d
2. Marries HTML and XML
b. Goldfarb
e
3. First line in an XML document
c. Berners-Lee
a
4. Came up with the name XML
d. XHTML
b
5. GML and SGML author
e. XML declaration
2.
d 1. Generated if XML is not well formed a. selector
e 2. Value for display property b. points
f 3. Element that contains no content c. DTD
b 4. 72 in an inch d. fatal error
a 5. Indicates element to apply style to e. inline
c 6. Document Type Definition
f. empty
element
3.
d 1. Document type declaration a. PCDATA
e 2. Children of a parent element b. CDATA section
f 3. Element declaration c. <
c 4. Built-in XML entity d. <!DOCTYPE…
a 5. Parsed character data e. siblings
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 21 of 21
b
6. Hides markup from an XML
processor
a. <!ELEMENT…
4.
C 1. CSS visibility property a. base16
d 2. generic font name b. rgb(0,0,0)
f 3. zero or more instance repetition operator c. hidden
b 4. functional notation d. sans-serif
a 5. Hexadecimal e. or
e 6. Vertical bar (|) f. asterisk (*)
5.
d 1. attribute declaration a. CDATA
e 2. a tokenized attribute type b. NOTATION
a 3. string attribute type c. #FIXED
c
4. attribute and default value must always
be provided
d. <!ATTLIST>
b 5. an enumerated attribute type e. IDREF
6.
d 1. unparsed entity a. A
e 2. conditional section b. <
b 3. built-in or predefined entity c. %name;
a 4. character reference d. Word file
C 5. parameter entity e. <![IGNORE[
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 22 of 22
7.
e 1. urn:wyeast-comm:db a. #FIXED
d
2. Can share the same name if in different
elements
b. prefix
f 3. For declaring a namespace c. URL
c 4. http://wyeast.net/tack d. attribute
b 5. db: e. URN
a 6. Used to declare a default in a DTD f. xmlns
8.
d 1. XML Schema predecessor a. simple type
c 2. part of an annotation b. decimal
e 3. immediate child of <schema> c. <appinfo>
b 4. a built-in datatype d. DTD
a 5. no attributes, other elements as content e. global
9.
D
1. instructions for transforming an XML
document
a. @*
e 2. formats XML documents b. XSLT
b 3. transforms XML documents c. <xsl:text>
a 4. location path for all attribute nodes d. template
c 5. XSLT element e. XSLFO
ACTS National Resource Center, Pune
Question Bank – XML (Solved/Unsolved)
Page 23 of 23
10.
c 1. Marriage of XML and HTML a. whitespace
e 2. Contains deprecated elements and attributes
b. XHTML
namespace
d
3. All XHTML elements and attributes must be
in this form
c. XHTML
a 4. Avoid in attribute values d. lowercase
b 5. http://www.w3.org/1999/xhtml
e. transitional
DTD
Q.4. Answers the following questions: (3 Mark each)
1) Describe the role that XSL can play when dynamically generating HTML pages from
a relational database.
2) Give a few examples of types of applications that can benefit from using XML.
3) What is DOM and how does it relate to XML?
4) What is SOAP and how does it relate to XML?
5) Can you walk us through the steps necessary to parse XML documents?
6) Give some examples of XML DTDs or schemas that you have worked with.
7) Using XSLT, how would you extract a specific attribute from an element in an XML
document?
8) When constructing an XML DTD, how do you create an external entity reference in
an attribute value?
9) How would you build a search engine for large volumes of XML data?
10) Describe the differences between XML and HTML.