MockQuestions

Web Developer Mock Interview

30 Questions Created By

To help you prepare for your Web Developer interview, here are 30 interview questions and answer examples.

First Question

30 Web Developer Interview Questions

25 Interview Questions With Sample Answers

1.   Using jQuery, if you wanted to make a div move along the screen, what function would you most likely use?

How to Answer

This is another specific technical question. As was mentioned earlier, the majority of your interview will involve specific technical questions. Researching the company, its products, and the technology that it uses is the best way to be prepared to answer these types of questions. It will also help you frame your answers to address the technical and business issues the company is hiring you to help them resolve.

Written by William Swansen on August 5th, 2021

Answer Example

"The easiest way to make a div move along the screen is to use the jQuery animate feature. The standard way of doing this is to position the element as absolute and then animate it left or right. You can also accomplish those by increasing or decreasing either the left or right margin."

Written by William Swansen on August 5th, 2021

Experienced

"A div element can be made to move along the screen in several ways. The easiest of these is first to position the element absolutely and then animate the left or right CSS property of the element. Another workaround to this is to increase or decrease the margins of the page in which the element is displayed. When doing this, you can anticipate a drop in the performance of the web page with the animation lasts more than a few seconds."

Written by William Swansen on August 5th, 2021

2.   What are the differences between JPEG and PNG compression, and when would you use each of these?

How to Answer

You probably already recognized this as another technical question. As the interview progresses, the questions will become more specific and more difficult. This indicates that the interviewer is gaining confidence in your qualifications and is willing to explore more topics in depth. Continue to answer technical questions in the same manner you have used throughout the interview.

Written by William Swansen on August 5th, 2021

Answer Example

"I use both JPEG and PNG compression in my web designs. JPEG works best for photos, drawings, illustrations, and other color-rich elements. PNG is a less aggressive compression methodology and results and slightly larger file sizes. PNG is more appropriate for web design elements, including text, logos, icons, and screenshots."

Written by William Swansen on August 5th, 2021

3.   Can you review this code and identify any errors you see?

How to Answer

During the interview for a web developer's position, you may be asked to perform practical tasks such as this one. This provides the interviewer with a live demonstration of your skills. The tasks may be presented to you as written code which you need to debug or discuss, or the interviewer may provide you with a description of a function of the page then ask you to write the code for it. Practicing your coding skills for common tasks before the interview will help you be prepared for this.

Written by William Swansen on August 5th, 2021

Answer Example

"After reviewing this code, I can see several different errors and it. Some of these are syntax, and others relate to the commands and functions called by the code. To thoroughly analyze the code, I would typically use a common debugging tool such as GDB. However, without the tool, the specific problems I found are... (then describe each issue you found and how you would fix it)."

Written by William Swansen on August 5th, 2021

4.   Can you discuss the use of namespacing in JavaScript?

How to Answer

This technical question asks you to discuss a term used in a web developer's job. The interviewer will ask many different questions similar to this throughout the interview. These questions help them understand your technical expertise and provide them with a demonstration of your communication skills. Technical questions are best answered concisely and directly, with little embellishment. The interviewer will ask a follow-up question if they need additional information about the topic.

Written by William Swansen on August 5th, 2021

Answer Example

"In the context of JavaScript, a namespace is a global object with a unique name that holds methods, properties, and other objects. Its purpose is to increase the modularity and reuse of code in web applications. It also hopes to prevent naming conflicts within the code."

Written by William Swansen on August 5th, 2021

5.   When developing a web application, do you prioritize SEO, maintainability, UX, performance, or security?

How to Answer

The interviewer will always ask some version of this question to determine your core competency as a web developer. Your response will also indicate which factors you prioritize when coding. For example, if you have experience in the finance industry, you may favor security over SEO. If you have developed an online e-commerce site, performance and SEO will be more important to you. Researching the organization and understanding its business model will give you a clue about which factors are more important and enable you to structure your answer appropriately.

Written by William Swansen on August 5th, 2021

Answer Example

"When creating a website, I prioritize the characteristics which have the greatest impact on the site's performance and functionality. Since your organization handles large online financial transactions, my priority would be security. However, I'd also emphasize the UX and performance features to make the website easy to use and highly functional. Maintainability is always important. SEO would be my last priority since your marketing strategy focuses on traditional promotion techniques, client referrals, and direct sales."

Written by William Swansen on August 5th, 2021

6.   How do you organize your JavaScript code?

How to Answer

There is no right or wrong way to organize JavaScript code. The interviewer will ask this question to better understand your web development methodologies and how you do your job. This will confirm your experience and let them know if your work is compatible with how their team currently performs similar tasks. They are also interested in seeing if you have work systems that will help improve their web development team's operations. Answering this question accurately is important for these reasons.

Written by William Swansen on August 5th, 2021

Answer Example

"There are several different ways I organize my JavaScript code. The first is I keep my JavaScript separate from my HTML code. This makes it easy to identify and retrieve when I need it. I also organize my JavaScript into logical groups and keep them in separate files. Sometimes I will concatenate these files into a single bundle if the code I need is similar to what I used in a previous project. Another technique I use is to create JavaScript namespaces which help avoid cluttering up the global namespace."

Written by William Swansen on August 5th, 2021

7.   Can you explain what a RESTful web service is and the purpose of each HTTP request method?

How to Answer

RESTful is a common web technology that relies on HTTP. Each RESTful request performs a specific action. The interviewer will ask you about these to confirm your technical expertise and ability to use this technology. They are also interested in how you describe complex technical concepts using simple, easy-to-understand language. You will need this skill when collaborating with website project stakeholders from outside of the technical organization.

Written by William Swansen on August 5th, 2021

Answer Example

"There are several RESTful requests which use HTTP to perform their job. The benefit of using this technology in a web design is that the requests inform the clients about their success or failure. Specific RESTful requests include GET, which retrieves data from a server, POST, which creates an entity without an ID, PUT, which is similar to POST but is used to update an existing entity, and DELETE, which removes the resource from the server."

Written by William Swansen on August 5th, 2021

8.   What do you know about CORS?

How to Answer

During the interview for the web developer's position, you will be asked many different questions about the technology used in your field. While you can't know about all the available technologies, you should be familiar with the most common ones. Additionally, the interviewer will be interested if you are up to date on some of the more recently released technologies. Reviewing these before the interview will increase your awareness and ability to at least identify what they do.

Written by William Swansen on August 5th, 2021

Answer Example

"CORS, which stands for Cross-Origin Resource Sharing, is an HTML5 technology that allows users to request different resources from a domain outside of the domain from which the resource came. Essentially, it enables two different websites to share resources. Normally this is not allowed due to security concerns, especially if the website uses a script to request the resource. CORS overcomes this by using code to identify the requesting domain, so the receiving domain understands that the request is valid."

Written by William Swansen on August 5th, 2021

9.   What frameworks and tools do you use to identify and fix a performance bug?

How to Answer

An interviewer will be very interested in your ability to use debugging tools to optimize a website's performance. Having an appealing website that attracts visitors is only the first step in the process. If the website underperforms or doesn't provide the information the visitors are interested in, they will stop using it. The interviewer wants to make sure that you are familiar with the debugging tools and have a structured framework to analyze and optimize a website's performance.

Written by William Swansen on August 5th, 2021

Answer Example

"Even the best-designed websites have performance issues from time to time. Identifying the root cause of these and resolving them is critical to my work as a web developer. When I notice that the website's performance is degrading, I first identify the underperforming elements. I then inspect them visually to see if I can spot any obvious errors in the code. Once this step is complete, I use standard debugging tools to identify errors that I cannot see. I typically use some of the common ones, including Angular.JS, Sass, Grunt, Sentry, GDB, and NPM."

Written by William Swansen on August 5th, 2021

10.   Can you describe the workflow you use when developing a website or app?

How to Answer

The interviewer will ask this question to determine how you approach a web development project, your methodologies, and your steps to develop a website. This will tell them that you have experience in this area and provide them information about whether your workflow is compatible with the rest of their team. A good way to respond to this question is to describe your workflow step by step in simple, easy-to-understand language.

Written by William Swansen on August 5th, 2021

Answer Example

"I have a very well-defined workflow for developing websites or applications. It begins with information gathering, so I clearly understand the objective of the project. I then move through the planning and design phases which results in a basic layout of the website. Next, I move to content writing, assembling, and coding to produce the actual website or application. The next phase is testing, review, and launch. Once the website is up and running, the maintenance and optimization phase begins and is ongoing."

Written by William Swansen on August 5th, 2021

11.   Have you ever done pair programming, and if so, what do you think of it?

How to Answer

Pair programming is a relatively new development within the website development and design field. This involves two people working together to code a project. Pair programming is an Agile development technique that not all web developers have experience with or prefer. The interviewer is interested in assessing whether you would be willing to sit down with a colleague and sort through your code. If you have experience with this, you can state this and describe your preferences for designing a website using this methodology. If you haven't, you can express your familiarity with the practice and describe whether you would be inclined to use it in the future.

Written by William Swansen on August 5th, 2021

Answer Example

"While I have never used pair programming to design a website, I am familiar with the practice. I understand its benefits by including two different perspectives, backgrounds, and knowledge to quickly and accurately design a website. However, I do my best work in isolation and would prefer to work alone whenever possible. I am open to peer review and often use this to increase the quality of my designs and to identify anything I may have missed."

Written by William Swansen on August 5th, 2021

12.   What do you do when an application stops working?

How to Answer

By asking this question, the interviewer is trying to understand your ability to debug a program. Troubleshooting and debugging are key skills web developers must possess. The best way to respond to this question is generally stating the techniques you use to solve problems within a program you developed. Don't get mired in the details. The interviewer will ask follow-up questions if they need more information.

Written by William Swansen on August 5th, 2021

Answer Example

"It is almost impossible to write code or develop applications without any errors occurring. The key is to have methods and techniques you use to find and resolve the errors. When a program stops working, my first response is to do a quick visual scan of the code to see if anything jumps out at me. If this doesn't work, I then use debugging tools to find the errors."

Written by William Swansen on August 5th, 2021

13.   Pretend I'm a tech novice. Can you explain what Namespacing in JavaScript is in plain English?

How to Answer

This is a fundamental JavaScript question that should be easy for its experienced web developers to answer. The key here is using plain English as though you were speaking with somebody who had no technical background. This requires you not to use acronyms or any jargon somebody from outside the industry would not understand.

Written by William Swansen on August 5th, 2021

Answer Example

"When programming in JavaScript, which is a common language used by web developers, namespace is known as a global object. This is an element within the webpage. Its purpose is to identify specific properties and objects displayed on the webpage. It helps developers to reuse some of the code they've already developed and also prevents conflicts from occurring within the webpage."

Written by William Swansen on August 5th, 2021

Experienced

"Namespacing is used not only in JavaScript but in many other programming languages. It is a technique web developers use to avoid conflicts with other objects or variable elements within a webpage. It also is useful for helping organize blocks of code within the application. These blocks can then be managed as groups or reused as needed."

Written by William Swansen on August 5th, 2021

14.   What's the difference between SOAP and REST?

How to Answer

Yet another technical question asking you to define the difference between two web service protocols. The purpose of this question is to determine if you know both of these protocols and to understand which one you prefer. Your research should tell you which protocol the company prefers. Whether you prefer the same one or not, you should be able to explain your answer and your rationale for your preference.

Written by William Swansen on August 5th, 2021

Entry Level

"The main difference between REST and SOAP is that REST allows the programmer to use a greater variety of data formats, whereas SOAP restricts you to XML. When using these protocols with JSON, REST is generally easier to work with. It also is faster and uses less bandwidth."

Written by William Swansen on August 5th, 2021

Answer Example

"The key difference between SOAP and REST is that SOAP uses XML while REST also supports text, JSON and other formats. I noticed that your developers tend to prefer REST as do I due to its flexibility and its support for several different formats."

Written by William Swansen on August 5th, 2021

15.   Which Content Management Systems (CMS) have you worked with?

How to Answer

This was a relatively general question which the interviewer will ask early in the interview. The purpose of this is to understand your experience and skills and to ease you into the interview. It also provides the interviewer with the information they can use to formulate other questions.

Written by William Swansen on August 5th, 2021

Answer Example

"I have worked with most of the popular content management systems. The ones I use the most include WordPress, Joomla, and Drupal. Of these, I prefer WordPress. This is because it's easy to work with and has a large library of plugins I can use to create the webpage designs the client is looking for."

Written by William Swansen on August 5th, 2021

Experienced

"As you probably know, there are many open-sourced content management systems. While I prefer WordPress due to its popularity and the many plugins available, I have also worked with Drupal, Joomla, Magento, TYPO3, Ploe, MODX, and Mambo. Switching between CMS software is relatively easy since most of them are structured similarly."

Written by William Swansen on August 5th, 2021

16.   Tell me some considerations in selecting a font size for an adaptive web site.

How to Answer

This is a technical question for a web developer role. Interviewers ask technical questions to qualify your knowledge and skills for the position you are interviewing for. Technical questions are best answered using brief explanations of the term or concept, with little embellishment. The interviewer will request additional details if they require them.

Written by William Swansen on August 5th, 2021

Answer Example

"There are four considerations when selecting a font for an adaptable web page. The first is readability. The font must be clear and easy to read. The second criteria are mood and message. An example of this is using bold or all caps, which can be interpreted as shouting. A third consideration is font metrics. This refers to how the font interacts with itself and its surroundings. Finally, the web developer must consider how the font looks in various browsers and devices."

Written by William Swansen on August 5th, 2021

Experienced

"The four key elements web developers must consider when choosing a font are readability, mood and message, font metrics, and cross-browser and cross-device consideration. Each of these criteria will determine the appearance of the web page, its ease of reading, and its ability to look the same across multiple devices or browsers. This is important because it contributes to the impact of the page and the objective the developer is attempting to achieve with their design."

Written by William Swansen on August 5th, 2021

17.   Explain to me briefly what the hide function is actually doing in jQuery withi the CSS.

How to Answer

This is a specific technical question. The interviewer is asking you to define the function of a single command within the cascading style sheet, or CSS. As the interview progresses, the technical questions will become more specific and more difficult. This is a positive sign that the interviewer is gaining confidence in your skills and is willing to dig deeper to determine just how much you know. It is advisable to review the commands you typically use when developing a web page before the interview.

Written by William Swansen on August 5th, 2021

Answer Example

"The hide function within jQuery will first store the previously displayed image and then set the property to 'none' so the image is no longer displayed. Using hide keeps the image available in the cache in case it is needed again."

Written by William Swansen on August 5th, 2021

18.   Can you list some of the input types that are new to HTML5?

How to Answer

An interviewer will ask this type of question to determine if you stay abreast of new developments in the web development industry. Technology changes very quickly, and to be an effective web developer you need to stay current on evolving developments in this field. You should also be prepared to describe how you do this, such as reading blogs, attending training, watching videos, and working with your peers to improve your skills and knowledge.

Written by William Swansen on August 5th, 2021

Answer Example

"Since I've been working with HTML5 for several years now, I am very familiar with the input types which have been added to this programming language. Some of these include color, date, datetime, e-mail, month, and number."

Written by William Swansen on August 5th, 2021

Experienced

"As a web developer, it is important for me to stay abreast of evolving technology. I do this by several different means, including reading blogs and articles about the technology, attending industry conferences, taking advantage of in-house training opportunities, and working with my peers to share new things that we've learned. Some of the input types that were added to HTML5 recently include color, date, search, number range, and URL."

Written by William Swansen on August 5th, 2021

19.   Do you know the programming language we primarily use?

How to Answer

By asking this question, the interviewer is seeking to understand two things. The first is whether you are familiar with the tools and languages they currently use for their web development efforts. They also want to understand whether you took the time to research their company and learn about their processes. Interviews are often won or lost before you even arrive, based on the amount of research you do and what you learn about the job and the company. The better you understand their operations, the more successful your interview will be, and the more likely they will offer you the job. You can answer those in either a positive or negative manner.

Written by William Swansen on August 5th, 2021

1st Answer Example

"Before coming here today, I did quite a bit of research on your company and the development tools you use. First, I was very impressed with the level of technology and expertise you currently have in-house. Based on what I learned, I believe you use several languages, including JavaScript, Ruby, and HTM5. I'm very familiar with each of these and have used them in my prior positions. I'm confident I can begin immediately contributing to your development efforts starting on day one."

Written by William Swansen on August 5th, 2021

2nd Answer Example

"Although I did some research before coming to the interview today, I was unable to learn which languages you use when developing websites. However, if you're like most companies I've been associated with, I would guess that you use some of the more popular languages, including JavaScript, Ruby, and HTM5. I am very familiar with each one of these as well as several other languages. I'm confident that you are either using the languages I'm familiar with or that I could quickly learn the languages you are using and become adept in them in a short amount of time."

Written by William Swansen on August 5th, 2021

20.   Which responsive frameworks do you work with or recommend?

How to Answer

When an interviewer asks this type of question, they seek to learn whether you are familiar with the tools and processes they already use in their operations. Additionally, they may want to see if you can recommend new tools or processes that they may consider adopting. One of the most desired soft skills employers look for is creativity. You can use your answer to this question to demonstrate your creativity and innovation skills.

Written by William Swansen on August 5th, 2021

1st Answer Example

"I have done quite a bit of research into HTML5 frameworks. The ones that I prefer include Foundation, Skeleton, HTML5 Boilerplate, KickStart, and Montage. These are very similar but have unique features that I use depending on the type of website I'm developing."

Written by William Swansen on August 5th, 2021

2nd Answer Example

"Using responsive frameworks when developing a web page helps to ensure that the page will be responsive and that the elements used to create the image are what I want to include on the page. The frameworks also help to reduce the amount of time required to develop the page. There are many frameworks available, but I prefer Montage, SproutCore, Zebra, and CreateJS. I use the framework that will produce the best results for the type of web page I'm working on."

Written by William Swansen on August 5th, 2021

21.   What is the default value for the display attribute for the image element?

How to Answer

An interviewer will ask this technical question to confirm your web development skills and ensure that you know some of the basic commands used in this profession. By reviewing these questions, you should be prepared for this as well as any related questions. The best way to be ready for an interview is to review these questions and practice them aloud. If possible, record yourself to hear how you sound and make any improvements you feel are necessary.

Written by William Swansen on August 5th, 2021

Answer Example

"The display property will specify how an element is displayed within a web page. Every HTML element has a default display value, which depends on the type of element it is. The two most common display values are block or inline."

Written by William Swansen on August 5th, 2021

Experienced

"There are two common default values for an image element within a web page. These depend on the type of element. The two most common default values are block and inline. Examples of block-level elements include div, form, header, footer, and section. Inline elements include span, a, and img."

Written by William Swansen on August 5th, 2021

22.   What are the five possible values for position for elements in a web page?

How to Answer

This technical question is similar to the previous one. Interviewers will often ask about topics in several different ways to confirm your understanding of the topic they are curious about. You may also encounter multiple interviews or group interviews in which each person you speak with will ask you the same question but in a different manner. If this occurs, it indicates that the topic they are asking about is important to the job you will be doing. This also gives you clues as to follow-up or subsequent questions you can expect.

Written by William Swansen on August 5th, 2021

Answer Example

"The position properties in CSS dictate how the browser arranges the elements on a webpage. Five different values dictate the page layout. These are static, relative, fixed, absolute, and inherit. Some of the values allow the elements to reposition themselves depending on changes within the web page or different browsers or platforms. These fix their positions relative to the borders of the page."

Written by William Swansen on August 5th, 2021

Experienced

"Elements are placed within a web page using the position command within CSS. The values used by position are relative, fixed, inherent, static, and absolute. All but fixed and static use the borders of the page to move the element's position if changes occur in the page and depend on which browser and which platform the viewer is using."

Written by William Swansen on August 5th, 2021

23.   How does the browser determine where to place positioned elements?

How to Answer

This is another technical question the interviewer will ask to determine your knowledge of web development technologies and practices. As we've mentioned before, technical questions are best answered straightforwardly and succinctly. There's no need to embellish or provide detailed answers. The interviewer will follow up if they require additional information.

Written by William Swansen on August 5th, 2021

1st Answer Example

"Browsers use the CSS property known as position to determine where to place elements on the web page. There are several position commands which CSS uses. These include static, relative, absolute, and sticky. Static refers to a position command where the element is in the same place regardless of the browser. Relative will position the element as an offset to one of the edges of the page. Absolute is similar to static but can be adjusted to more accurately position the element. Sticky is the command used to move an element relative to a single offset point within the page."

Written by William Swansen on August 5th, 2021

2nd Answer Example

"There are four CSS commands which establish the position of an element within a web page. These are static, relative, absolute, or sticky. The commands are somewhat self-explanatory. Static maintains an element's position in the webpage regardless of how it is rendered. Relative will move the element as an offset to one or more of the borders of the web page. Absolute maintains the element at the same spot regardless of how the web page is rendered or what browser the user is using. Finally, sticky moves an element within the webpage relative to a single offset point noted in the CSS command."

Written by William Swansen on August 5th, 2021

24.   Name several reasons why a website is not performing well or is slow to respond to user prompts.

How to Answer

During an interview, the hiring manager seeks to fully understand your competencies and abilities related to the position for which they are interviewing you. This particular question seeks to determine your ability to diagnose and address the poor performance of a website. Since the question is rather general, the best way to respond is by citing 2 to 3 examples of why a website is performing badly and what you would do to fix them.

Written by William Swansen on August 5th, 2021

Answer Example

"Poor performance of a web site may be due to several reasons, all of which can be addressed once they are diagnosed. For instance, one reason may be render-blocking by JavaScript, which is delaying page loads. This is caused by a browser waiting to fully load any JavaScript files before they display them. The problem can be solved by using asynchronous loading, removing external JavaScript files, or deferring the JavaScript loading until the rest of the page has become visible. Other issues that may impact the performance or speed include excessive overhead in your database, the site's CSS not being optimized, and OPcache not being enabled. Once any of these causes have been identified as the problem, solutions can be implemented similar to the example I've already provided."

Written by William Swansen on August 5th, 2021

Experienced

"There are many issues that could impact the speed and performance of a website. The challenge is identifying which ones you're encountering and then developing solutions to resolve them. For instance, poor performance may be due to large media files, which increase the loading times, poorly written scripts which are conflicting with the other elements of the site, or the site's code being too bulky. If the code is too bulky, you can minimize it by removing elements that aren't required. This can be accomplished by using a plugin, inlining CSS, or optimizing JavaScript files."

Written by William Swansen on August 5th, 2021

25.   Do you enjoy working long hours on projects?

How to Answer

An interviewer will ask this type of question to seek the information the question requests and test your integrity. While they may be genuinely interested in whether you enjoy working long hours were willing to do it, they also want to see how you respond to this question. Working long hours may or may not be a requirement for this job. You should respond with an honest answer, but more importantly, be able to justify your response.

Written by William Swansen on August 5th, 2021

1st Answer Example

"While I don't necessarily enjoy working long hours on a project, I am more than willing to do this if the situation requires it. I understand that sometimes it is necessary to put in extra time to complete a project on schedule. If I have to do this, I balance it out by taking some personal time off to make up for the additional time I had to work."

Written by William Swansen on August 5th, 2021

2nd Answer Example

"Working long hours on a project is part of this job. However, I try to avoid this by carefully planning the work before starting a new project. I stay very focused while working on a project to be as productive as possible. Proper planning and intense focus help me get the work done per the schedule created for the project. If I have to put in some extra time, I do this willingly, knowing that it's required. I then try to allocate some additional personal time to maintain my work-life balance."

Written by William Swansen on August 5th, 2021

More Interview Practice

Video Game Developer

Video Game Developer

Start Mock Interview

Robot Programmer

Robot Programmer

Start Mock Interview

Web Architect

Web Architect

Start Mock Interview

Amazon Logo

Amazon

Start Mock Interview

LinkedIn Logo

LinkedIn

Start Mock Interview

Facebook Logo

Facebook

Start Mock Interview

Target Logo

Target

Start Mock Interview

EBay Logo

EBay

Start Mock Interview

Microsoft Logo

Microsoft

Start Mock Interview

Pinterest Logo

Pinterest

Start Mock Interview

Apple Logo

Apple

Start Mock Interview

Google Logo

Google

Start Mock Interview