Online Web Development Test for Hiring and Recruitment – Set 1

This online test contains all questions regarding Web Development for Hiring and Recruitment. It covers different skills like HTML, CSS, JavaScript, PHP, jQuery, AJAX, XML, XHTML.

Note: More than one options may correct. So, read the questions carefully and analyze their options properly.

Practice Paper | Online Web Development Test for Hiring and Recruitment

Let’s start attempting all the questions carefully. Evaluate this test by yourself.

Online Web Development Test for Hiring and Recruitment – Set 1

Q1. What will be the output of the following code?

function sample() {
    throw "Catch it";
  }

try {
  console.log("Started..");
  sample();
  console.log("Finished:.");
 } catch(err) {
       console.log(err);
   } finally {
       console.log("Wrapping up...");
    }

a) Started.. Catch it Wrapping up..
b) Started.. Wrapping up.. Catch it
c) Catch it Started.. Wrapping up..
d) Error

Answer: a) Started.. Catch it Wrapping up..

Online Web Development Test for Hiring and Recruitment

Q2. In a client-server application, is it always recommended to compress data before transfer?

a) Yes. Compression is always good.
b) Only if compression reduces the size of data considerably.
c) Only if the network supports compressed data transfer.
d) Yes. CPUs are fast. Network are slow.

Answer: b), c)

Q3. In a contact form, to validate an email address and a phone number field, what can you use from the following options?

a) PHP
b) JavaScript
c) CSS
d) HTML

Answer: a), b)

Q4. In CSS, what value is given for the left margin in the following code snippet?

margin: 5px 10px 3px 8px;

a) 8px
b) 3px
c) 10px
d) 5px

Answer: a) 8px

Explanation:

In General margin is written as:
margin: top right bottom left

Online Web Development Test for Hiring and Recruitment

Q5. Queue can be used for?

a) Scheduling jobs/tasks
b) Recursion
c) To implement first in, last out data structure
d) To implement first in, first out data structure

Answer: a), c), d)

Online Web Development Test for Hiring and Recruitment

Q6. In CSS, what is the difference between margin and padding?

a) Margin is space out side the border-box and padding is space between the content and border.
b) Margin is used for width and padding is the height.
c) Margins can collapse but padding don’t collapse.
d) Margin is used for height and padding is for width.
e) They both are used to add space around elements. Can be used interchangeably.

Answer: a), c)

Q7. What is the relationship between XHTML and XML?

a) XHTML is subset of XML
b) XML is subset of XHTML
c) XML and XHTML are same
d) There is no such thing as XHTML

Answer: a) XHTML is subset of XML

Q8. In CSS, in the “Box Model”, a box consists of?

a) Actual content
b) Borders
c) Padding
d) Margins

Answer: a), b), c), d)

Online Web Development Test for Hiring and Recruitment

Q9. In CSS, what is the difference between visibility: hidden and display: none?

a) Neither will preserve the space
b) Both will preserve the space
c) The element will be hidden but still, affect the layout. display: none preserve the space, whereas visibility: hidden doesn’t preserve the space
d) The element will be hidden, but still, affect the layout. visibility: hidden preserve the space, whereas display: none doesn’t preserve the space.

Answer: d) The element will be hidden, but still, affect the layout. visibility: hidden preserve the space, whereas display: none doesn’t preserve the space.

Q10. Can we draw images using PHP?

a) Only if the server has a graphic card
b) Only if the PHP GD library is present
c) Yes. Some PHP libraries make the job easy but we can do it anyway.
d) Yes. Since PHP 7.

Answer: b) Only if the PHP GD library is present

Q11. Can we use MySQL in an application when not following the MVC design pattern?

a) No. M in MVC stands for MySQL,
b) No. You need Model from MVC to access MySQL.
c) Yes. As long as we use a PHP framework which handles MySQL connection.
d) Yes. Connecting to MySQL don’t depend on design patterns of applications.

Answer: d)

Q12. In CSS, what is the difference between float and text-align?

a) “float” and “text-align” are same thing
b) “text-align” applies to the content of a box, while “float” applies to the box itself.
c) “float” applies to the content of a box, while “text-align” applies to the box itself.
d) “float” is the opposite of “text-align”

Answer: b) “text-align” applies to the content of a box, while “float” applies to the box itself.

Q13. True or False? In PHP, the setcookie() function must appear BEFORE the <html> tag.

a) True
b) False
c) There is no setcookie() function in PHP
d) Does not matter

Answer: a) True

Online Web Development Test for Hiring and Recruitment

Q14. What technology a site like Facebook can use for a live chat feature?

a) Polling server for new messages
b) Message Protocol
c) Some kind of sockets
d) New TCP/IP version

Answer: a), b), c)

Online Web Development Test for Hiring and Recruitment

Q15. In CSS, which property controls the text size?

a) font-style
b) text-style
c) font-size
d) text-size

Answer: c) font-size

Q16. What is the purpose of making your design responsive?

a) There is no such thing as responsive design.
b) To collect user response.
c) To adjust web design based on device width.
d) To make website response to touch events on mobile devices.

Answer: c) To adjust web design based on device width.

Q17. Which statement(s) is/are true about MySQL indexes?

a) INSERT queries will be faster
b) SELECT queries will be faster
c) INSERT queries will be slower
d) SELECT queries will be slower

Answer: a), b)

Q18. JavaScript can be used in?

a) Client-side scripting
b) Machine Learning
c) Desktop applications
d) Mobile applications
e) Server-side programming
f) Command-line applications

Answer: a), d), e)

Online Web Development Test for Hiring and Recruitment

Q19. In HTML, are width=”100″ and width=”100%” the same things?

a) Depends on the HTML version
b) Depends on browser
c) No
d) Yes

Answer: c) No

Online Web Development Test for Hiring and Recruitment

Q20. What does the below statement evaluate to in JavaScript?

4 + 3 + 2 + "1"

a) Error
b) 10
c) 4321
d) 91

Answer: d) 91

Q21. Which statement(s) is/are true for domain names and IP addresses mapping?

a) One domain name can point to multiple IP addresses.
b) One IP address can be used by multiple domain names.
c) One IP address can be used only one domain name.
d) One domain name can point to only one IP address only.

Answer: a), b)

Q22. Difference between HTML id and class?

a) In the CSS, a class selector is preceded by a full stop(.) and an ID selector is preceded by a hash character(#)
b) ID and class can be used interchangeably
c) ID is numeric, the class can contain letters
d) ID will refer to a single element, the class can refer to multiple elements
e) ID is for unique ids and class is used for objects

Answer: a), d)

Q23. In PHP, which superglobal variable holds information about headers, paths, and script locations?

a) $_INFO
b) $_GET
c) $_POST
d) $_SERVER

Answer: d) $_SERVER

Online Web Development Test for Hiring and Recruitment

Q24. Whenever a user uploads a video to YouTube. YouTube sends them an email once their video gets converted. While waiting for the CPU to get free, what data structure likely holds the data for video conversion requests?

a) Array
b) Linked List
c) Stack
d) Queue

Answer: d) Queue

Q25. Can we use PHP to write command-line scripts?

a) Yes
b) Only from PHP version 5.6. It’s a new feature.
c) No. PHP is used on servers only.
d) No. PHP is used for websites only.

Answer: a) Yes

Q26. Complete the sentence: “Sanitizing user-submitted data in PHP, before inserting into MySQL….”

a) is compulsory as that is why we process data in PHP.
b) there is no such thing called sanitization.
c) is not compulsory but highly recommended.
d) is not required if we have JavaScript validation.
e) is required if JavaScript is disabled.

Answer: a) is compulsory as that is why we process data in PHP.

Q27. How can you access an HTML element with an id attribute, using JavaScript?

a) No, not possible at all
b) Using getElementbyId method
c) Using named access on window object
d) Only possible using jQuery, not possible using plain JavaScript

Answer: b) Using getElementbyId method

Online Web Development Test for Hiring and Recruitment

Q28. Is it compulsory to have a MySQL database when building websites with PHP?

a) Yes. Because PHP works with MySQL only.
b) Yes. Because we need a database.
c) PHP can’t use MySQL
d) No. It is not compulsory

Answer: d) No. It is not compulsory

Explanation:

PHP supports many database management systems including MySQL, MariaDB, Db2, MongoDB, Oracle, PostgreSQL, and SQLite. So, it’s not compulsory to have a MySQL database as we can use another database as well.

Online Web Development Test for Hiring and Recruitment

Q29. In CSS, what is the purpose of float: center?

a) To center image
b) To center entire page
c) float doesn’t have “center” value
d) To center text

Answer: c) float doesn’t have “center” value

Explanation:

The float property specifies whether an element should float to the left, right, or not at all.

Syntax for CSS float is:

float: none | left | right | initial | inherit;

Q30. Stack can be used for?

a) To implement first in, first out data structure
b) Function Calls/Return mechanism
c) Recursion
d) To implement first in, last out data structure

Answer: b), c), d)

Explanation:

Stack is a LIFO/FILO data structure and hence it is used to implement recursion.

Online Web Development Test for Hiring and Recruitment


Few more questions are left for Online Web Development Test for Hiring and Recruitment. Don’t forget to cover them. Go through below link to attempt remaining questions of Online Web Development Test for Hiring and Recruitment.

Any doubt? Discuss in the comments. ☺

For Questions 31 to 75 Click HERE!


Explore! Artificial Intelligence Foundations Exams answers – SkillUp

NPTEL answers: NPTEL Operating System Fundamentals Assignment solutions

The above question set contains all the correct answers. But in any case, you find any typographical, grammatical or any other error then kindly inform us.

Thanks in advance.

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.

Leave a Comment

Your email address will not be published. Required fields are marked *