Web Development Ninjas Interview Questions & Answers
Download PDF

Web Development Ninjas related Frequently Asked Questions in various Ninjas Web Developer job interviews by interviewer. The set of questions here ensures that you offer a perfect answer posed to you. So get preparation for your new job hunting

58 Ninjas Web Developer Questions and Answers:

Ninjas Web Developer Interview Questions Table of Contents:

Ninjas Web Developer Job Interview Questions and Answers
Ninjas Web Developer Job Interview Questions and Answers
HTML5 has strong support for media. There are now special <audio> and <video> tags. There are additional A/V support tags as well: <embed> is a container for 3rd party applications. <track> is for adding text tracks to media. <source> is useful for A/V media from multiple sources.

2 :: Tell me what is the syntax difference between a bulleted list and numbered list?

Bulleted lists use the <ul> tag, which stands for “unordered,” whereas <ol> is used to create an ordered list.

3 :: Explain me what is the difference in caching between HTML5 and the old HTML?

An important feature of HTML5 is the Application Cache. It creates an offline version of a web application. and stores website files such as HTML files, CSS, images, and JavaScript, locally. It is a feature that speeds up site performance.

4 :: Do you know what elements have disappeared?

As mentioned above, <frame> and <frameset> have been eliminated. Other elements that are no longer supported include: <noframe>, <applet>, <bigcenter> and <basefront>.

5 :: Tell me how do you add an HTML element in DOM tree?

You can use the jQuery method appendTo() to add an HTML element in DOM tree. This is one of the many DOM manipulation methods that jQuery provides. You can add an existing element or a new HTML element, appendTo() add that method in the end of a particular DOM element.

6 :: Tell me what is HTML?

HTML stands for HyperText Markup Language. It is the dominant markup language for creating websites and anything that can be viewed in a web browser. If you want to get some extra bonus points

7 :: Please explain difference between $(this) and this keyword in jQuery?

This could be a tricky question for many jQuery beginners, but indeed it’s a simple one. $(this) returns a jQuery object, on which you can call several jQuery methods e.g. text() to retrieve text, val() to retrieve value etc, while this represent current element, and it’s one of the JavaScript keyword to denote current DOM element in a context. You can not call jQuery method on this, until it’s wrapped using $() function i.e. $(this).

8 :: Tell us how do you optimize a website’s assets?

File concatenation, file compression, CDN Hosting, offloading assets, re-organizing and refining code, etc. Have a few ready.

9 :: Tell me what is the difference between SVG and <Canvas>?

<Canvas> is an element that manipulates two-dimensional (2D) pixels while Scalable Vector Graphics works in 2D and three-dimensional (3D) vectors. Essentially, <Canvas> is to SVG as Photoshop is to Illustrator.

10 :: Explain me what is $(document).ready() function? Why should you use it?

This is one of the most important and frequently asked questions. The ready() function is used to execute code when document is ready for manipulation. jQuery allows you to execute code, when DOM is fully loaded i.e. HTML has been parsed and the DOM tree has been constructed. The main benefit of $(document).ready() function is that, it works in all browser, jQuery handles cross browser difficulties for you. For curious reader see answer link for more detailed discussion.

11 :: Explain me how do you set an attribute using jQuery?

One more follow-up question of previous jQuery question, attr() method is overload like many other methods in JQuery. If you call attr() method with value e.g. attr(name, value), where name is the name of attribute and value is the new value.

12 :: Explain me the difference between cookies, sessionStorage, and localStorage?

Cookies are small text files that websites place in a browser for tracking or login purposes. Meanwhile, localStorage and sessionStorage are new objects, both of which are storage specifications but vary in scope and duration. Of the two, localStorage is permanent and website-specific whereas sessionStorage only lasts as long as the duration of the longest open tab.

13 :: Tell me 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.

14 :: Do you know what are the new image elements in HTML5?

Canvas and WebGL. <Canvas> is a new element that acts as a container for graphical elements like images and graphics. Coupled with JavaScript, it supports 2D graphics. WebGL stands for Web Graphics Language, a free cross-platform API that is used for generating 3D graphics in web browsers.

15 :: Tell me what is the difference between detach() and remove() methods in jQuery?

Though both detach() and remove() methods are used to remove a DOM element, the main difference between them is that detach() keeps track of the last element detached, so that it can be reattached, while the remove() method does keep a reference of the last removed method. You can also take a look at the appendTo() method for adding elements into DOM.

16 :: Tell me what purpose do Work Workers serve and what are some of their benefits?

Web Workers are background scripts that do not interfere with the user interface or user interactions on a webpage, allowing HTML to render uninterrupted while JavaScript works in the background.
It could be any number of things, but the most common mistakes are leaving out a tag bracket or quote missing for href, src, or alt text may be the issue. You should also verify the link itself.

18 :: Explain what is your preferred development environment?

This is your chance to talk shop and demonstrate some industry knowledge. Be prepared to talk about your favorite editor, browser, plug-ins, operating system, and other tools. Freshen up on your lingo.

19 :: Explain me what is the difference between <div> and <frame>?

A <div> is a generic container element for grouping and styling, whereas a <frame> creates divisions within a web page and should be used within the <frameset> tag. The use of <frame> and <frameset> are no longer popular and are now being replaced with the more flexible <iframe>, which has become popular for embedding foreign elements (ie. Youtube videos) into a page.

20 :: Tell me how do you find all the selected options of HTML select tag?

This is one of the tricky jQuery question on Interviews. This is a basic question, but don’t expect every jQuery beginner to know about this. You can use the following jQuery selector to retrieve all the selected options of <select> tag with multiple=true :

$('[name=NameOfSelectedTag] :selected')

This code uses the attribute selector in combination of :selected selector, which returns only selected options. You can tweak this and instead of name, you can even use id attribute to retrieve
<select> tag.

21 :: Do you know what is the difference between jQuery.get() and jQuery.ajax() method?

The ajax() method is more powerful and configurable, allows you to specify how long to wait and how to handle error. The get() method is a specialization to just retrieve some data.

22 :: Tell me how do you hide an image on a button click using jQuery?

This jQuery interview question is based on event handling. jQuery provides good support for handling events like button click. You can use following code to hide an image, found using Id or class. What you need to know is the hide() method and how to setup an even handler for button, to handle clicks, you can use following jQuery code to do that :

$('#ButtonToClick').click(function(){
$('#ImageToHide').hide();
});

I like this jQuery question, because it’s like a practical task and also code is not difficult to write.

23 :: Do you know the real difference between HTML and HTML5?

From a broader perspective, HTML was a simple language for laying out text and images on a webpage, whereas HTML5 can be viewed as an application development platform that does what HTML does that and more, including better support for audio, video, and interactive graphics. It has a number of new elements, supports offline data storage for applications, and has more robust exchange protocols. Thus, proprietary plug-in technologies like Adobe Flash, Microsoft Silverlight, Apache Pivot, and Sun JavaFX are no longer needed, because browsers can now process these elements without additional requirements.

24 :: Explain me what is “Semantic HTML?”?

Semantic HTML is a coding style where the tags embody what the text is meant to convey. In Semantic HTML, tags like <b></b> for bold, and <i></i> for italic should not be used, reason being they just represent formatting, and provide no indication of meaning or structure. The semantically correct thing to do is use <strong></strong> and <em></em>. These tags will have the same bold and italic effects, while demonstrating meaning and structure (emphasis in this case).

25 :: Explain me what is the main advantage of loading jQuery library using CDN?

This is a slightly advanced jQuery question. Well, apart from many advantages including reducing server bandwidth and faster download, one of the most important is that, if browser has already downloaded same jQuery version from the same CDN, then it won’t download it again. Since nowadays, many public websites use jQuery for user interaction and animation, there is a very good chance that the browser already has the jQuery library downloaded.
Ninjas Web Developer Interview Questions and Answers
58 Ninjas Web Developer Interview Questions and Answers