Web Developer Interview Questions i

Web Developer Interview Questions Web Developer Interview Questions ii

Contents

1 Introduction 1

2 General Questions 2

3 HTML & HTML5 Questions 4

4 CSS Questions 6

5 Javascript Questions 11

6 jQuery Questions 13

7 PHP Questions 15

8 Conclusion 18 Web Developer Interview Questions iii

Copyright(c) Exelixis MediaP.C., 2016

All rights reserved. Without limiting the rights under copyright reserved above, no part of this publication may be reproduced, stored or introduced intoa retrieval system, or transmitted, in any form or by any means(electronic, mechanical, photocopying, recording or otherwise), without the prior written permission of the copyright owner. Web Developer Interview Questions iv

Preface

Web development is a broad term for the work involved in developing a web site for the Internet () or an intranet (a private network). can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services. A more comprehensive list of tasks to which web development commonly refers, may include web engineering, web design, development, client liaison, client-side/server-side scripting, web server and network security configuration, and e- commerce development. Among web professionals, "web development" usually refers to the main non-design aspects of building web sites: writing markup and coding. Most recently Web development has come to mean the creation of content management systems or CMS. (Source: https://en.wikipedia.org/wiki/Web_development) The aim of this article is to provide a wide range of questions that a web developer can be asked during a job interview. Preparing for a job interview can be a daunting process if the scope of what is to be asked is so large. Web development includes a considerable set of skills and langauges, and an interview of this scale is sure to be all inclusive regarding the various web technologies. Web Developer Interview Questions v

About the Author

Fabio is a passionate student in web tehnologies including front-end (HTML/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and . Web Developer Interview Questions 1 / 18

Chapter 1

Introduction

Web developers are responsible for managing the way content appears to the users on a particular . The field includes working with programming languages to create web applications that combine and other tools to create company’s web managment systems. However, apart from the complex part, it can also be about creating static pages and designing stuff. As big data is more and more part of systems, its manipulation and maintenance may as well come with errors, which then will have to be debugged by members of the web development team in companies. In a general viewpoint, web developers are the ones who work behind the scenes to provide not just sites, but services people use everyday. While there are a lot to be asked in such interviews, let us have a look at what most of these questions might be. Web Developer Interview Questions 2 / 18

Chapter 2

General Questions

1. How would you use persistent storage on browsers? What options would you use? For HTML browsers, a good choice would be local storage and persistent storage. For non-HTML ones, cookies are the best bet. 2. What is W3C? W3C stands for World Wide Web Consortium which is the international standard for World Wide Web. W3C is constantly busy trying to standardize the web and to make it accessible to all users. The company was created in 1994. 3. What are two common ways in which you can reduce the load time of a web application? There are quite a lot of ways you can reduce load time:

• Enable browser caching • Optimize images

• Minify resources • Minimize HTTP Requests • Reduce redirects

4. What is graceful degradation? Graceful degradation refers to the property that enables a system to function properly even in the event of failure of either the system or a component of it. 5. What is DTD? DTD stands for Document Type Declaration and it tells the browser which version of either HTML or XHTML is being used. 6. What is the difference between "Web development" and "Web design". Web development includes a lot of processes, and Web Design is part of it. Web design is used to represent page layouts and graphical user interface. Web development is a wider term to mean planning, coding, testing, debugging etc. 7. What is CORS? How does it work? Cross-origin resource sharing (CORS) is a mechanism that allows many restricted resources (e.g. fonts, js etc.) on a web page to be requested from another domain outside the domain from which the resource originated. It’s a mechanism supported in HTML5 that manages XMLHttpRequest access to a domain different. 8. Describe the key advantages of HTTP/2 as compared with HTTP 1.1. HTTP/2 among other improvements, provides decreased latency to improve page load speed by supporting:

• Server push technologies Web Developer Interview Questions 3 / 18

• Prioritization of requests • Data compression of HTTP headers • An important operational benefit of HTTP/2 is that it avoids the head-of-line blocking problem in HTTP 1.

• Loading of page elements in parallel over a single TCP connection

9. How do you optimize a website’s assets? There are several ways to do this, for example: file concatenation, file compression, CDN Hosting, offloading assets, refining code etc. 10. What web browser do you use? Because web developers should be familiar with all browsers in terms of testing their web projects the best answer here is: All of them. 11. What’s the difference between standards mode and quirks mode? Quirks mode is a default compatibility mode and may be different from browser to browser, which may result to a lack of consistency in appearance from browser to browser. 12. Explain what is long polling? Long polling is a web application development pattern used to emulate pushing data from the server to the client. With long polling, the client requests information from the server in a similar way to a normal poll. However, if the server does not have any information available for the client, instead of sending an empty response, the server holds the request and waits for some information to be available. Web Developer Interview Questions 4 / 18

Chapter 3

HTML & HTML5 Questions

13. What is HTML? HTML stands for HyperText Markup Language. It is the most popular markup language for creating that can be viewed in a web browser. 14. What is the difference between HTML elements and tags? HTML elements communicate to the browser how to render text. When surrounded by angular brackets <> they form HTML tags, which come in pairs and surround text. 15. What does DOCTYPE mean? The term DOCTYPE means Document Type Definition and tells the browser which type of HTML is used on a webpage. Browsers use DOCTYPE to determine how to render a page. Failing to use DOCTYPE will load your page in Quirks Mode. 16. What are the limitations when serving XHTML pages? The main limitation is the poor browser support of XHTML. Internet Explorer and other user agents cannot parse XHTML as XML. Thus, it is not that extensible language as one might think. 17. What is the syntax difference between a bulleted list and numbered list? Bulleted lists use the

    tag, which stands for “unordered,” whereas
      is used to create an ordered list. 18. What is the difference between a
      and a ? A
      is a container element for grouping and styling, whereas a creates divisions within a web page and should be used within the tag. The use of and are no longer popular and are now being replaced with the more flexible