Top 17 Web Developer Interview Questions and Answers

Web Development Interview Questions

Here are Web Development interview questions and answers for freshers as well as experienced Web Developer candidates to get their dream job.


1) Explain what are the key responsibilities of a Web Developer?

  • Program test and debug all web applications
  • Design, develop, test and deploy web applications
  • Uploading sites onto server and registering it with different search engines
  • Coordinate with other designers and programmers to develop web projects
  • Fix bugs, troubleshoot and resolve problems
  • In case of system failure initiate periodic testing and implement contingency plans
  • Develop appropriate code structures to solve specific tasks
  • Support and assist in the upkeep and maintenance of websites
  • Assume ownership of code throughout staging, development, testing and production

Free PDF Download: Web Developer Interview Questions


2) What web developer should know?

A good web developer should know


3) Explain what is CORS? How does it work?

(CORS) Cross-Origin Resource Sharing is a mechanism that enables many resources (e.g., JavaScript, fonts etc.) on a web page to be requested from another domain outside the domain from which the resource originated.  It is a mechanism supported in HTML5 that manages XMLHttpRequest access to a domain different.


4) List out the advantage of HTTP/2 as compared with HTTP 1.1?

The advantage of HTTP/2 compared to HTTP/1.1 is

  • HTTP headers data compression
  • Server push technologies
  • Over a single TCP connection parallel loading of page elements
  • Prioritization of request

5) Explain what is an ETag and how does it work?

An ETag is an opaque identifier allocated by a web server to a specific version of a resource found at a URL.  The ETag is a part of HTTP, the protocol for the world wide web and when the server reads the ETag from client request, the server can then tell whether to send the file (HTTP 200) or tell the client just to use their local copy (HTTP 304).

Web Developer Interview Questions
Web Developer Interview Questions

6) Explain what is long polling?

Long polling is a web application development pattern used to emulate pushing data from the server to the client.  When the long polling is used, the client sends a request to the server, and the connection remains intact until the server is ready to send data to the client. The connection will be closed only after the data is sent back to the client or connection timeout occurs.


7) Explain what is DTD (Document Type Declaration)? Mention what is the difference between CDATA and PCDATA in DTD?

A DTD means Document Type Definition (DTD) which defines the structure, legal elements and attributes of an XML document.

  • PCDATA: A PCDATA is a Parsed Character Data. XML parsers usually parse all the text in an XML document.
  • CDATA: While CDATA is an Unparsed Character Data, the term CDATA is used about text data that should not be parsed by the XML parser.

8) Mention some tips you can use to reduce the load time of a web application that you have written?

To decrease the load time of a web application you have to follow the following tips

  • Optimize images to no longer than screen resolution and save it as a compressed file
  • Eliminate all JavaScript files to reduce the amount of transferable data
  • Combine & Mininify all CSS and JS and call them in footer
  • Defer or Asynch JS Files

9) Mention what is the correct way to include JavaScript into your HTML?

The correct way to include JavaScript into your HTML is by using inline event handlers or inline code.

Web Development Interview Questions
Web Development Interview Questions

10) Explain in CSS, how can you make a form element’s background color change when the user is entering text? Does this work in all browsers?

Yes, you can change the default look of form elements by styling their HTML tags: input, select and text area but it won’t work for all browsers.


11) Explain what is the difference between cookies and local storage?

  Cookies Local Storage
Client Side/ Server Side Data accessible both at client side and server side. The data is sent to the serverside with every cookie request. Only at the local browser side data is accessible. Server cannot use local storage until deliberately sent a request to the server via POST or GET
Size Storage capacity of cookies is 4095 bytes/cookie Storage capacity of local storage is 5MB per domain
Expiration Cookies have expiration and cookie data gets deleted after some time There is no expiration and has to remove manually

12) In HTML what tag can be used for a multi-line text input control?

For multi-line text input control, you can use the “textarea tag”.


13) Explain how can you refer to CSS file in the web page?

You can refer to the .CSS file in the webpage by using the <link> tag.  It should be kept between <head></head>tag. For example <linkhref=”/css/mystyle.css” type=”text/css” rel=”stylesheet”/>


14) List out few ways you can reduce page load time?

You can do following things to reduce the page load time

  • Reduce image size
  • Remove unnecessary widgets
  • HTTP compression
  • Placing CSS at the top and script reference at the bottom or in external files
  • Reduce lookups
  • Minimize redirects
  • Caching,

15) In HTML mention the difference between <div> and <frame>?

The difference between <div> and <frame> is that a <div>

Frame Div
With frames, you can show more than one HTML document in the same browser window The <div> tag defines a division or a section in an HTML document
The frame tag declares one particular window within a frameset The <div> is used to group block-elements to format them with styles
Frames can load other resources using HTML On the other hand page, divisions can serve local content in the manner of the frames, but that content is not independent of the page though

16) How XHTML is different from HTML?

  • XHTML requires that all tags should be in lowercase
  • XHTML requires that all tags should be closed properly
  • XHTML requires that all attributes are enclosed in double quotes
  • XHTML forbids inline elements from containing block level elements

17) List out the new APIs provided by HTML 5 standard?

  • HTML 5 comes with number of new APIs
  • Media API
  • Text track API
  • Application Cache API
  • Data transfer API
  • User Interaction
  • Command API
  • Constraint Validation API
  • History API

These interview questions will also help in your viva(orals)

Share

9 Comments

  1. It’s good for fresher

  2. Avatar Kurt Hamm says:

    I am about to start a language learning site. I have 64 MP4 files (combined 577 MB) that I would like to allow the users to download for free. How much will this cost me as the site owner?

  3. Avatar Mohan prasanth M says:

    It’s Good

  4. Avatar Devify Solutions says:

    Web application development helps us in understanding hard matters. Thank you for sharing this wonderful post. keep sharing such blogs with us.

  5. Avatar Eugene Zhang says:

    It’s very useful. Thank you.

  6. Avatar Momanyi Caleb says:

    Thanks a lot my friend

Leave a Reply

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