P2Pprogrammer 2 programmer

Home > Interview Question and Answer > Web Development and Scripting

Web Development, HTML, CSS, JavaScript Interview Question and Answer

Interview questions and Answers for Web Development, HTML, CSS, JavaScript, Web Hosting

Interview question and answers for HTML, CSS, Scripting including Interview question and answers for Java Script, VB Script and interview question answers for IIS. In this section you can find interview questions and answers for basic of web development tools.

Interview questions and answers for HTML, Interview question and answers for Interview question and answer for CSS, Interview question and answer for JavaScript and Visual Basic Script.

Interview question and answers for fresheners, experienced software engineer, topic like IISS, Web Hosting, Web Security, Scripts.

HTML, CSS, JavaScript Interview Question and Answer

1. What is HTML and HTML5?

HTML - Hypertext Markup Language is the standard markup language for creating web pages and web applications. HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and current major version of the HTML standard.

2. Features of HTML5 ?

  1. Semantics: allowing you to describe more precisely what your content is.
  2. Connectivity: allowing you to communicate with the server in new and innovative ways.
  3. Offline and storage: allowing webpages to store data on the client-side locally and operate offline more efficiently.
  4. Multimedia: making video and audio first-class citizens in the Open Web.
  5. 2D/3D graphics and effects: allowing a much more diverse range of presentation options.
  6. Performance and integration: providing greater speed optimization and better usage of computer hardware.
  7. Device access: allowing for the usage of various input and output devices.
  8. Styling: letting authors write more sophisticated themes.

3. What is a virtual root and how do you create one?

A virtual root is essentially a new web site in IIS. You’d create one in the MMC by either selecting “New Virtual Site” from the site context menu, or clicking “Create” in the Home Directory tab in the properties for any existing folder. Using the first method, you can also create a virtual root that points to a logical directory outside the current web root. The new virtual root is largely, although not completely, as configurable as a new web site.

4. How would you remotely administer IIS?

Windows Server comes with a limited terminal services server built in for remote administration of the server. Set it up as remote client and use the TS client or Remote Desktop Connection on the client to login. From there, use MMC as if you were logged on locally.

5. How would you go about securing IIS and MS-SQL Server?

  1. Stay up to date on patches and keep security software (AV, firewall, IDS, maybe even packet logging, etc.) running.
  2. IIS authenticates against domain users (even if the domain is “Local Machine”). Make sure you have no spurious users, and secure everyone’s passwords. If possible, segregate public web machines into different ACL segments (e.g. — a different domain).
  3. Be careful with security policies. The standard server install comes with hardened LSP templates, which you should consider if you’re not experienced enough to build your own. Non-front tiers should have tight security policies barring anyone outside the adjacent tiers (and maybe a test machine or two) from access.

6. How do I make a graphic a link in HTML?

by Including the “img” tag between the “a href” tag and the “a” closing tag

7. What scripts ship with IIS ?

iisweb.vsb to create, delete, start, stop, and list Web sites, iisftp.vsb to create, delete, start, stop, and list FTP sites, iisdir.vsb to create, delete, start, stop, and display virtual directories, iisftpdr.vsb to create, delete, start, stop, and display virtual directories under an FTP root, iiscnfg.vbs to export and import IIS configuration to an XML file

8. What’s the name of the user who connects to the Web site anonymously?


9. What secure authentication and encryption mechanisms are supported by IIS?

Basic authentication, Digest authentication, Advanced digest authentication, Certificate-based Web transactions that use PKCS #7/PKCS #10, Fortezza, SSL, Server-Gated Cryptography, Transport Layer Security

10. Where’s ASP cache located on latest IIS ?

On disk, as opposed to memory, as it used to be in older IIS

11. What is socket pooling?

Non-blocking socket usage, introduced in IIS 6.0. More than one application can use a given socket.

12. What are JavaScript types?

Number, String, Boolean, Function, Object, Null, Undefined

13. How do you convert numbers between different bases in JavaScript?

Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);

14. What boolean operators does JavaScript support?

&&, || and !

15. What looping structures are there in JavaScript?

for, while, do-while loops, but no foreach.

16. How do you assign object properties?

obj["age"] = 17 or obj.age = 17.

17. What’s a way to append a value to an array?

arr[arr.length] = value;

18. What is THIS keyword?

It refers to the current object

19. What does isNaN function do?

Return true if the argument is not a number.

20. What is negative infinity?

It’s a number in JavaScript, derived by dividing negative number by zero.

21. How to detect the operating system on the client machine?

In order to detect the operating system on the client machine, the navigator.appVersion

22. Where are cookies actually stored on the hard disk?

This depends on the user's browser and OS.
In the case of Netscape with Windows OS,all the cookies are stored in a single file called cookies.txt
c:\Program Files\Netscape\Users\username\cookies.txt

23. What can javascript programs do?

Generation of HTML pages on-the-fly without accessing the Web server. The user can be given control over the browser like User input validation Simple computations can be performed on the client's machine The user's browser, OS, screen size, etc. can be detected Date and Time Handling

24. How to set a HTML document's background color?

document.bgcolor property can be set to any appropriate color.

25. What does the "Access is Denied" IE error mean?

The "Access Denied" error in any browser is due to the following reason.A javascript in one window or frame is tries to access another window or frame whose document's domain is different from the document containing the script.

26. Is a javascript script faster than an ASP script?

Yes. Since javascript is a client-side script it does require the web server's help for its computation,so it is always faster than any server-side script like ASP,PHP,etc..

27. Are Java and JavaScript the Same?

No. java and javascript are two different languages.
Java is a powerful object - oriented programming language like C++,C whereas Javascript is a client-side scripting language with some limitations.

28. How to embed javascript in a web page?

javascript code can be embedded in a web page between

<script langugage="javascript"> </script> tags

29. How to access an external javascript file that is stored externally and not embedded?

This can be achieved by using the following tag between head tags or between body tags. <script src="abc.js"></script> where abc.js is the external javscript file to be accessed.

30. What is the difference between an alert box and a confirmation box?

An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.

31. What is a prompt box?

A prompt box allows the user to enter input by providing a text box.

32. Can javascript code be broken in different lines?

Breaking is possible within a string statement by using a backslash \ at the end but not within any other javascript statement. that is ,
document.write("Hello \
is possible but not
document.write \
("hello world");

33. How to hide javascript code from old browsers that dont run it?

Use the below specified style of comments

<script language=javascript>

javascript code goes here

// -->

34. How to comment javascript code?

Use // for line comments and


*/ for block comments

35. Name the numeric constants representing max,min values


36. What does javascript null mean?

The null value is a unique value representing no value or no object. It implies no object, or null string,no valid Boolean value, no number and no array object.

37. What does undefined value mean in javascript?

Undefined value means the variable used in the code doesnt exist or is not assigned any value or the property doesn't exist.

39. What is the difference between undefined value and null value?

  1. Undefined value cannot be explicitly stated that is there is no keyword called undefined whereas null value has keyword called null
  2. typeof undefined variable or property returns undefined whereas typeof null value returns object

40. Does javascript have the concept level scope?

No. JavaScript does not have block level scope,all the variables declared inside a function possess the same level of scope unlike c,c++,java.

41. What are undefined and undeclared variables?

Undeclared variables are those that are not declared in the program (do not exist at all), trying to read their values gives runtime error.But if undeclared variables are assigned then implicit declaration is done . Undefined variables are those that are not assigned any value but are declared in the program. Trying to read such variables gives special value called undefined value.

42. What is === operator ?

==== is strict equality operator ,it returns true only when the two operands are having the same value without any type conversion.

43. What does the delete operator do?

The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with var keyword.

44. What does break and continue statements do?

Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop.

45. How to create a function using function constructor?

The following example illustrates this
It creates a function called square with argument x and returns x multiplied by itself.

var square = new Function ("x","return x*x");

Home > Interview Question and Answer > Web Development and Scripting