What is JavaScript?

JavaScript is a platform-independent,event-driven, interpreted client-side scripting andprogramming language developed by Netscape Communications Corp. and Sun Microsystems. For a web development interview question asking, “What is JavaScript?” the correct answer would be: JavaScript is a high-level, interpreted programming language primarily used to add interactivity and dynamic behavior to web pages. Originally developed by Brendan Eich … Read more

How will you decide between using nested HTML table tags and a DIV tag with CSS?

Use DIV tags with CSS for laying out the web pages and use TABLE for representing data.Tabular data represented using html table tag. Div tags are generally used to layout web page elements without using tables, because tables are heavy wighted than div tags. The traditional way of laying out web pages was to place them inside invisible … Read more

Can you have a DIV element nested inside a SPAN element?

It is a bad practice to have a DIV element nested inside a SPAN element. You can have a SPAN inside a DIV. The reason being the DIV is a block element and SPAN is an inline element. So, why would you want to have a block element inside an inline element? SPAN is a like sub tag, which applies styles for the … Read more

Types of client-side validation

Following are 3 types of client-side validation: 1. Field cannot be empty. There must be any value. 2. Format must be valid. Like: age is numeric. 3. Values must be with in valid range. Like: age should not be negative and month should be between 1 to 12. Client-side validation refers to the validation of … Read more

Introduction to Javascript

It is a product of Netscape. Its competitors are VBScript and Jscript, which are the products of Microsoft. It is a scripting language. It I case sensitive. It provides in-built objects, which have fields and methods. User-defined functions can be created, which can be invoked on particular event. Java script is used with-in HTML web … Read more