Contents
1. What is the difference between SOAP and REST? .............................. 4
2. What is the use of a namespace in Web Development? ...................... 4
3. What are the newly introduced input types in HTML5? ........................ 4
4. What are the five elements that support media content in HTML5? ... 4
5. What is SVG and why is it used? ............................................................. 5
6. What is the use of Canvas in HTML? ...................................................... 5
7. What is the difference between Canvas and SVG? .............................. 5
8. How can page loading time be reduced? ................................................ 6
9. What is the use of CORS? ........................................................................ 6
10. What is the difference between localStorage and sessionStorage
objects?............................................................................................................. 6
11. What are some of the new features that are introduced in CSS3?... 6
12. What is Responsive Web Design (RWD) in HTML and CSS? .......... 7
13. What are some of the types of CSS that are used? ............................ 7
14. What is the use of a selector in CSS? ................................................... 7
15. Can you give an example of using an ID selector in CSS? ............... 8
16. What is the use of grouping in CSS3? .................................................. 8
17. What is the use of a class selector in CSS?......................................... 8
18. What is the use of Webkit in CSS3? ...................................................... 9
19. What are the uses of child selectors in CSS? ...................................... 9
Intermediate Interview Questions ................................................................... 10
20. How does CSS3 help in implementing rounded borders easily? .... 10
21. What is pagination? How can pagination be implemented? ............ 10
22. What are the components of the CSS box model? ........................... 11
23. What are some of the properties of transitions in CSS3? ................ 11
24. What is the use of pseudo-classes in CSS? ...................................... 11
25. What is the use of media queries in CSS3? ....................................... 12
26. Why is float used in CSS? ..................................................................... 12
27. What is z-index in CSS? ........................................................................ 13
28. Why are external style sheets preferred? ........................................... 13
29. What is the meaning of long polling in Web Development? ............ 13
30. What are some of the Web Development technologies that you
know? .............................................................................................................. 14
31. What is the difference between cookies and local storage? ............ 14
32. What is the difference between XHTML and HTML?........................ 14
33. What are the various data types present in JavaScript? .................. 15
34. How can styles or classes be changed in elements using JavaScript?
......................................................................................................................... 15
Advanced Interview Questions........................................................................ 16
35. What are the types of popup boxes present in JavaScript? ............ 16
36. What is the difference between <window.onload> and
<onDocumentReady>? ................................................................................ 16
37. How is type conversion handled in JavaScript? ................................ 16
38. What is the meaning of the scope of a variable in JavaScript? ....... 17
39. How are comments used in JavaScript?............................................. 17
40. What are undefined and undeclared variables in JavaScript? ........ 18
41. What is the method used to submit forms in JavaScript? ................ 18
42. Why is <this> keyword used a lot in JavaScript? .............................. 19
43. What is the use of the <defer> attribute in JavaScript? .................... 19
44. How can you prioritize SEO, maintainability, performance, and
security in a web application? ..................................................................... 19
45. What is the result if a jQuery Event Handler returns false? ............. 20
46. What is the use of the each() function in jQuery?.............................. 20
47. What is Pair Programming? .................................................................. 20
48. What is the use of the $() function in jQuery? .................................... 20
49. What are the advantages of using a Content Delivery Network
(CDN) in jQuery? ........................................................................................... 20
50. What are the types of CDNs supported in jQuery? ........................... 21
1. What is the difference between SOAP and REST?
SOAP REST
A Web Development protocol An architectural platform
Works with XML Works with XML, HTML, and plain
text
SOAP cannot use REST REST can make use of SOAP
2. What is the use of a namespace in Web Development?
A namespace is a simple global object that is used to hold methods,
properties, and other objects in them. It adds ease of use via
modularity, thereby, providing users with the ability to reuse the code
and avoid naming conflicts.
3. What are the newly introduced input types in HTML5?
HTML5 has had multiple revamps in the past years, and the addition
of input types has made it very easy to work with. Some of these input
types are as follows:
color
date
Datetime-local
email
month
number range
4. What are the five elements that support media content in
HTML5?
There are five main elements in HTML5 that support media:
<audio>
<video>
<source>
<embed>
<track>
5. What is SVG and why is it used?
SVG stands for Scalable Vector Graphics. It is used to display vector-
based graphics over the web. The graphical content it can render is
based on an XML format. With SVG, the graphical content is of
superior quality thereby providing the user with the ability to furnish
high-quality images.
6. What is the use of Canvas in HTML?
Canvas was added onto HTML5 to give users the ability to draw
graphics on the go, using JavaScript. There are a variety of methods
in <canvas> to allow for the drawing of paths, circles, boxes, images,
and more.
Next up on this top Web Developer interview questions and answers,
let us understand the difference between canvas and SVG. !
7. What is the difference between Canvas and SVG?
Canvas SVG
Resolution dependant Resolution independent
Does not support event handlers Supports event handlers
Works well for small-scale Performs better for large-scale
rendering applications rendering applications
8. How can page loading time be reduced?
There are many factors that affect the page loading time of a website.
However, some methods can be implemented to reduce it drastically.
They are given below:
Reduction in the image size
Removal of unnecessary widgets
HTTP compression
Reduction in lookups
Minimal redirection and caching
9. What is the use of CORS?
CORS stands for Cross-origin Resource Sharing. It is a mechanism
that allows a variety of resources to be requested at a time from a
domain that is outside the current request domain.
The next web application interview question comprises an important
difference. Check it out below.
10. What is the difference between localStorage and
sessionStorage objects?
localStorage sessionStorage
No expiry is there for stored data The object is valid for only a single
session
Data is not deleted upon the The object is immediately deleted
closure of the window upon closing the window
11. What are some of the new features that are introduced in
CSS3?
CSS3 has brought about a lot of changes, making the overall
framework more user-friendly and powerful. Some of the features that
were added and are very popularly used now are:
Rounded corners
Animation
Custom layout
Media queries
12. What is Responsive Web Design (RWD) in HTML and
CSS?
Responsive Web Design is a concept that is used to create web
pages that can scale across multiple resolutions without any loss of
information or screen tearing.
It automatically adjusts the structure of the web page based on the
device it is viewed on to provide optimal viewing experience.
13. What are some of the types of CSS that are used?
There are three main types of CSS present:
Inline CSS: Supports the addition of CSS inline, alongside HTML
elements
External CSS: Used to import an external CSS file to the HTML
document
Embedded CSS: Used to add CSS styles by making use of the
<style> attribute
14. What is the use of a selector in CSS?
A CSS selector is used with a rule in the inline elements, which
require styling. With the help of selectors, it is easy to find and select
HTML elements based on factors, such as name, ID, attribute, etc.
15. Can you give an example of using an ID selector in CSS?
The ID selector is used in CSS to point to a target element for usage.
It is denoted in the following example:
#example {padding: 20px;}
<p id="SelectorExample">
...
</p>
16. What is the use of grouping in CSS3?
Grouping is used in CSS3 to give users the ability to reuse and apply
the same CSS style element to multiple HTML entities, using just one
single declaration statement.
A simple example of grouping is as shown below:
#grouped g, ul { padding-top: 20px; margin: 1; }
17. What is the use of a class selector in CSS?
Class selectors in CSS begin with a “.” (period) key and are followed
by the name of the class. It is used to select a statement and modify
the style of that element in the corresponding part of the HTML tag.
Consider the following example:
.exampleclass {font-family: TimesNewRomanl; font-size:
20; background: red;}
<div class="sampleclass">
...
</div>
Next up on these web technologies interview questions, let us
understand a little about the use of Webkit.
18. What is the use of Webkit in CSS3?
Webkit is an important software component in CSS that allows for the
easy rendering of HTML and CSS elements in a variety of browsers,
such as Chrome, Firefox, and Safari.
There are many engines for browsers such as:
Gecko for Mozilla
Presto for Opera
Edge for Internet Explorer
19. What are the uses of child selectors in CSS?
Child selectors are primarily used in CSS to look up the „child‟
component of an element in CSS.
Consider an example where the <ul> tag is used in a paragraph.
Then, the „ul‟ tag becomes a child of the paragraph element. To
implement this in CSS, the following syntax is used:
p > ul { font-size:20px; }
Are you ready to learn more about Web Development? Read our
comprehensive guide on Web Development Tutorial now!
Next up on this top Web Developer interview questions and answers
blog, let us take a look at the intermediate set of questions.
Intermediate Interview Questions
20. How does CSS3 help in implementing rounded borders
easily?
CSS3 has the <border-radius> property that allows elements to be
created with nice-looking rounded corners. This can easily be applied
to all four sides or as per requirement.
The <border-radius> property has four attributes for four corners:
<border-top-left-radius>
<border-top-right-radius>
<border-bottom-left-radius>
<border-bottom-right-radius>
21. What is pagination? How can pagination be implemented?
Pagination is a simple sequence of pages on a website. These pages
are interconnected and have similar content to display to the users.
A simple example is the page selector on an e-commerce site that
allows the users to browse through the products present on multiple
pages rather than scrolling up and down on one single page.
It can easily be implemented in CSS3 using the following code:
<div class="main_container">
<div class="pagination">
<ul>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li class="active"><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
</div>
</div>
22. What are the components of the CSS box model?
The CSS box model is used to represent an entity that encloses all of
the HTML content into a box or a button element.
There are four components:
1. Border: Denotes the padding and content around the border
2. Content: Refers to the actual content to be displayed
3. Margin: Refers to the top layer of the box element
4. Padding: Defines the empty space around the element
23. What are some of the properties of transitions in CSS3?
Transitions in CSS3 are easy to use, and they provide users with
rapid and efficient animation effects.
The four main properties present in the transitions are:
transition-delay
transition-duration
transition-property
transition-timing-function
24. What is the use of pseudo-classes in CSS?
Pseudo-classes are used as a popular technique in CSS to change
the style of an element when this element changes its state.
There are numerous examples of when you use a pseudo-class:
For the style change when the mouse moves over the element
For out-of-focus animations
For providing styles for external links
We have to understand media queries in the next set of interview
questions for web developers. Let‟s check it out.
25. What is the use of media queries in CSS3?
Media queries are used to define styles in CSS, which are responsive
based on a variety of shapes and sizes of the viewing window.
They are used to adjust the following entities:
Height
Width
Viewport
Resolution
Orientation
If you are looking forward to becoming proficient in Web Development,
make sure to check out Intellipaat‟s latest offerings for Full Stack
Developer Course.
26. Why is float used in CSS?
Float is a popular property in CSS to control the layout and position of
an element on a web page.
Any element can be placed on the web page as per requirement.
Consider the following example:
div { float: right; }
Here, the contents of div will be placed on the right side of the screen.
27. What is z-index in CSS?
Z-index is a property in CSS that is used to define the order of
elements on a web page. It works on the basis of order indices, where
a higher-order element will appear before a lower-order element.
It only applies to elements that are positioned, i.e., those elements
having the position attribute compulsorily.
Consider the following example:
div {
position: fixed;
left: 15px;
top: 20px;
z-index: -1;
}
28. Why are external style sheets preferred?
External style sheets provide an ample amount of advantages to
developers. Some of the benefits are as follows:
Classes can be reused any number of times.
They allow for the style control of multiple documents through a
single file.
Selectors and grouping can be used to apply styles easily.
29. What is the meaning of long polling in Web Development?
Long polling is a development pattern that is used to emulate a data
push operation from a server to a client machine.
When long polling is operational, the client sends in a request to the
server, and the data is pushed. The connection will timeout only when
the data is sent to the client or after the timeout criteria are met.
30. What are some of the Web Development technologies
that you know?
This question is very common in a Web Development interview. The
answer is based on your learning, experience, and proficiency in this
field. However, a good Web Developer will have profound working
skills in any of the following technologies:
HTML
CSS
JavaScript
SQL
Python
PHP
31. What is the difference between cookies and local storage?
Cookies Local Storage
Cookie data is accessible for both Data is stored only on the local
the client and the server browser in the client-side machine
Cookies have an expiry time, and There is no expiry in local storage
data gets deleted post expiration unless the data is manually
deleted
In the next set of interview questions for web developers, we have a
very important question regarding HTML and XHTML.
32. What is the difference between XHTML and HTML?
XHTML HTML
Tags should be in lowercase It is not case sensitive
Tags should be closed once Open-ended tags can be used
opened
Attributes must be enclosed in Attributes can be used without
double quotes quotation marks
33. What are the various data types present in JavaScript?
JavaScript supports the following data types:
Boolean
Number
Object
Undefined
Null
String
Function
34. How can styles or classes be changed in elements using
JavaScript?
JavaScript can be used to easily modify classes and styles in an
element by making use of the following syntax:
Modify styles:
document.getElementById(“input”).style.fontSize = “10”;
Modify class:
document.getElementById(“button”).className =
“classname”;
Next up on this top Web Development interview questions and
answers blog, let us take a look at the advanced set of questions.
Advanced Interview Questions
The following will cover the senior web developer interview questions
but we suggest you go through them even if you are a fresher or an
intermediate web developer candidate.
35. What are the types of popup boxes present in JavaScript?
There are three types of dialog boxes, which are used in JavaScript:
Alert: Presents users with a message and an „Ok‟ button
Confirm: Gives the users a window with „Ok‟ and „Cancel‟ buttons
Prompt: Shows the user input, alongside „Ok‟ and „Cancel‟
buttons
36. What is the difference between <window.onload> and
<onDocumentReady>?
The <window.onload> event is not called until a page is completely
loaded with the entire styling from CSS and images. The event does
add a bit of delay when rendering a web page. With the
<onDocumentReady> event, it will wait only till the DOM is initialized
and will begin the event action. This ensures to reduce any delays in
actions.
37. How is type conversion handled in JavaScript?
JavaScript supports automatic type conversion. Since it is weakly
typed, you can pass a function as an argument into another function
easily.
This ensures that there are no errors or data type-associated
warnings as values get converted to the required data type
automatically.
38. What is the meaning of the scope of a variable in
JavaScript?
Scope refers to the accessibility of functions and underlying variables
in the running environment. There are two scopes supported in
JavaScript:
Local scope: Here, values and functions declared inside the
same function can only be accessed within that function and not
outside it. Consider the following example:
// Code present here cannot use localVariable
function myFunction() {
var localVariable = "This is a local variable";
// Code present here can use localVariable
}
Global scope: If a variable is declared as global, it can be
accessed from anywhere in the application. Consider the
following example:
var globalVariable = "This is a Global variable";
// Code present here can use globalVariable
function myFunction() {
// Code present here can also use globalVariable
}
39. How are comments used in JavaScript?
JavaScript supports two types of comment insertion in the code.
Single-line comments and multi-line comments.
Single-line comment: “//” is used for single-line comment insertion
Example:
//This is a single-line comment
Multi-line comment: “/* */” is used to add multi-line comments
Example:
/* This
is a
multi-line
comment*/
Coming to the next set of interview questions for web developers,
here is a common question for JavaScript.
40. What are undefined and undeclared variables in
JavaScript?
Variables that have been declared already but not initialized are
known as undefined variables.
On the other hand, if a variable is being used in a program without
being declared, then it is considered an undeclared variable.
Consider the following example:
var undefVar;
alert(undefVar); // undefined variable
alert(notDeclared); // accessing an undeclared variable
41. What is the method used to submit forms in JavaScript?
Forms can be submitted easily in JavaScript by calling the following
method:
document.forms[0].submit();
Here, the „0‟ denotes the index of the form.
42. Why is <this> keyword used a lot in JavaScript?
The <this> keyword is used to access the current object present in a
program. This object resides inside a method, and the keyword is
used for referencing the corresponding variable or the object.
43. What is the use of the <defer> attribute in JavaScript?
The <defer> attribute is used as a boolean type attribute. It is used to
delay the execution of the JavaScript code on a web page until the
parser completely loads and initializes the page.
For example:
<script src="/example.js" defer></script>
44. How can you prioritize SEO, maintainability, performance,
and security in a web application?
This is a commonly asked question in a Web Development interview.
Here, the interviewer is trying to assess your understanding of the
working environment in the firm you‟ve applied for.
If it is a large firm, then security will get higher priority over SEO.
Whereas, if it is a publication firm, SEO gets the preference. A little
groundwork about the company should help you answer this question.
The next web developer interview question we will look at is regarding
jQuery. Let‟s check it out.
45. What is the result if a jQuery Event Handler returns false?
If the jQuery Event Handler returns a boolean false value, it simply
means that the event will not execute further and will halt the
execution for the particular action it is associated with.
46. What is the use of the each() function in jQuery?
The each() function in jQuery is used to iterate over a set of elements.
A function can be passed to each() method. This will result in the
execution of each of the events for which the object has been called.
47. What is Pair Programming?
Pair programming is a scenario where you will be working closely with
a colleague on the project, and this is done to help solve the problems
at hand. If the development scenario is fast-paced, Agile development
might not work efficiently. The interviewer asks this question to see
whether you can work with other people easily and effectively.
48. What is the use of the $() function in jQuery?
The $() function is used as a wrapper to wrap objects into their jQuery
counterparts. This is done to give users the ability to call any method
that is defined for the jQuery object.
Note: Selectors can also be passed to the $() function, resulting in the
output of a jQuery object that contains matched DOM elements.
49. What are the advantages of using a Content Delivery
Network (CDN) in jQuery?
CDNs are widely used in jQuery as they offer an ample number of
advantages for users.
CDNs cause a significant reduction in the load for the server.
They provide large amounts of savings in the bandwidth.
jQuery frameworks load faster due to optimizations.
CDNs have a caching ability that adds to quicker load times.
50. What are the types of CDNs supported in jQuery?
There are two widely used CDNs with jQuery:
Microsoft: Used to load from jQuery AJAX CDN
Google: Used to load jQuery from the Google Libraries API