Website Developer Interview Preparation Guide
Download PDF

Website Developer related Frequently Asked Questions by expert members with professional career as Website Developer. These list of interview questions and answers will help you strengthen your technical skills, prepare for the new job interview and quickly revise your concepts

80 Website Developer Questions and Answers:

Table of Contents

Website Developer Interview Questions and Answers
Website Developer Interview Questions and Answers

1 :: Please 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.

2 :: Explain me 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.

3 :: Tell me 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

4 :: Do you know what Is SVG And Why Do You Use It?

SVG is an acronym for Scalable Vector Graphics as recommended by W3C.

☛ Its purpose is to display the vector-based graphics over the Web.
☛ The graphics use an XML format.
☛ SVG graphics are of higher quality and does not lose it even when resized.
☛ All elements and attributes of SVG support animation.

5 :: Tell me how Does CSS3 Support The Responsive Web Designing?

CSS3 has come up with a media query feature. It supports RWD (Responsive Web Design) and does help in making a website responsive.

6 :: Tell me what Are Child Selectors In CSS?

A child selector looks up for the child of some element. To form a child selector, we need two or more selectors separated by “greater than” symbol.

Let’s take an example. We have a <ul> tag inside a paragraph. Here, <ul> is the child of the paragraph element. So, to apply the CSS styles, we can use the following syntax.

p > ul { font-size:15px; }

7 :: Tell me what Is CSS Box Model And What Are Its Components?

It is common in HTML to term all of its elements as Boxes. Similarly, in CSS, Box Model refers to modeling the design and layout of its elements. It has primarily four core components.

☛ Margin – It refers to the top most layer of the box.
☛ Border – The padding and content options work around the Border. Changing the background color can also affect the Border.
☛ Padding – It defines spacing around the box.
☛ Content – It represents the actual content to be shown.

8 :: Tell us how Do You Add Comments In CSS?

It is just the same in CSS as we do in JavaScript. Place the comments inside the enclosing /* and */.

9 :: Tell me how Do You Change The Style/Class On Any Element From JavaScript?

Following JavaScript will modify the style/class of an HTML element.

document.getElementById(“input”).style.fontSize = “10”;
-or-
document.getElementById(“button”).className = “classname”;

10 :: Do you know what Is Scope In JavaScript?

The general meaning of scope is the accessibility of functions and variables in an application. Usually, we use them in two ways i.e. Local and Global.

A) Local Scope.
If we declare a function or variable inside a function, then we can access it only inside that function.

// code here can not use myLocalVar

function myFunction() {
var myLocalVar = "I'm Local";

// code here can use myLocalVar

}
B) Global Scope.
Declaring a variable anywhere on the page would mean that we can access it from any of the functions on that page.

var myGlobalVar = "I'm Global";

// code here can use myGlobalVar

function myFunction() {

// code here can use myGlobalVar

}

11 :: Tell me what Are == And === Operators In JavaScript And How Do They Differ?

The = (assigment operator) , == and === (relational operator) please explain the difference between these 3 operators in JavaScript; along with relevant examples. And what do we mean by type type conversion in===,please explain with example.And why does

3==='3'//false
3==="3"//false
"3"==3//true
3===3//true
also why does

3==3//true
"3"==3//true
3=='3'//true
1==true//true

12 :: Tell me what Are The Core Data Types Available In JavaScript?

Below is the list of data types available in JavaScript.

☛ Number
☛ Object
☛ String
☛ Boolean
☛ Function
☛ Null
☛ Undefined

13 :: Do you know what Is Webkit In CSS3? And Why Is It Used?

Webkit is a core software component which is responsible for rendering HTML and CSS in browsers like Safari and Chrome. There are other similar rendering engines like Gecko for Mozilla, Presto for Opera, and Edge for IE.

To enable Webkit on a web page, it requires prefixing the <-webkit> keyword with CSS values.

Here is an example CSS using the Webkit feature.

.box_shadow {
-webkit-box-shadow: 0px 0px 5px 0px #ffffff;
box-shadow: 0px 0px 5px 0px #ffffff;
}

14 :: Do you know what Is A CSS Selector?

CSS selector is an expression following the CSS rules and used to select the element we want to style. And CSS selector syntax means how we write or use those selectors in the CSS editor.

Please note that a CSS selector can help you find or select HTML elements based on their name, id, class, attribute, and more.

15 :: Explain me what Are The Various Elements HTML5 Has Added For Media Content?

Following HTML5 elements supports media content.

☛ <audio> – It specifies sound content.
☛ <video> – It links to a video.
☛ <source> – This tag specified the source of video and audio links.
☛ <embed> – It acts as a container for external applications.
☛ <track> – This element defines tracks for video and audio.

16 :: Do you know 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 :: Do you know 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).

18 :: Tell me 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

19 :: I just pulled up the website you built and the browser is displaying a blank page. Walk me through the steps you'd take to troubleshoot the problem?

This is a great question to determine how well rounded their abilites are. It tests everything from basic support skills all the way up to troubleshooting the webserver itself.

20 :: Tell us what are a few of your favorite development tools and why?

If they say notepad you've obviously got the wrong person for the job. Not only can this help you gauge their level of competence, but it'll also see if they match the tools everyone else uses in-house.

21 :: Tell us what industry sites and blogs do you read regularly?

This question can give you an idea of how in-tune they are with the latest industry trends and technologies, as well as how passionate they are about webdev. It'll help separate the people who do it as a career AS WELL as a hobby from those who might simply be in it for the big developer paychecks.

22 :: Explain me the basic structure of a MIME multipart message when used to transfer different content type parts. Provide a simple example?

A simple example of a MIME multipart message is as follows:

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=frontier

This is a message with multiple parts in MIME format.
--frontier
Content-Type: text/plain

This is the body of the message.
--frontier
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64

PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
Ym9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
--frontier--
Each MIME message starts with a message header. This header contains information about the message content and boundary. In this case Content-Type: multipart/mixed; boundary=frontier means that message contains multiple parts where each part is of different content type and they are separated by --frontier as their boundary.

Each part consists of its own content header (zero or more Content- header fields) and a body. Multipart content can be nested. The content-transfer-encoding of a multipart type must always be 7bit, 8bit, or binary to avoid the complications that would be posed by multiple levels of decoding. The multipart block as a whole does not have a charset; non-ASCII characters in the part headers are handled by the Encoded-Word system, and the part bodies can have charsets specified if appropriate for their content-type.

23 :: Tell me what is CORS? How does it work?

Cross-origin resource sharing (CORS) is a mechanism that allows many resources (e.g., fonts, JavaScript, 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.

CORS adds new HTTP headers that provide access to permitted origin domains. For HTTP methods other than GET (or POST with certain MIME types), the specification mandates that browsers first use an HTTP OPTIONS request header to solicit a list of supported (and available) methods from the server. The actual request can then be submitted. Servers can also notify clients whether “credentials” (including Cookies and HTTP Authentication data) should be sent with requests.

24 :: Tell me how Do You Distinguish Between An Undefined And Undeclared Variable?

Undefined refers to a variable which has declaration but not initialized yet. However, an undeclared variable is one which has a reference in the code without being declared.

Example.

var iExistButUndefined;
alert(iExistButUndefined); // undefined
alert(iMNotDeclared); // accessing an undeclared variable

25 :: Tell me what Is The Difference Between Undefined Value And Null Value?

<undefined> Vs. <null> value.

1. A variable will have <undefined> value if it has declaration but not assigned any value.

2. A variable will yield a <null> value if assigned with null.

3. <undefined> is a type itself whreeas <null> is an object.

4. <undefined> value is set via JavaScript engine whereas null value is set directly in the code.