1. Define HTML (Hyper Text Markup Language)?

HTML ( Hyper Text Markup Language) is the language used to write Web pages. You are looking at a Web page right now.
You can view HTML pages in two ways:
► One view is their appearance on a Web browser, just like this page -- colors, different text sizes, graphics.
► The other view is called "HTML Code" -- this is the code that tells the browser what to do.

2. Write the simplest HTML page?

HTML Code:

<HTML>
<HEAD>
<TITLE>This is my page title! </TITLE>
</HEAD>
<BODY>
This is my message to the world!
</BODY>
</HTML>

3. How to include comments in HTML?

Technically, since HTML is an SGML application, HTML uses SGML comment syntax. However, the full syntax is complex, and browsers don't support it in its entirety anyway. Therefore, use the following simplified rule to create HTML comments that both have valid syntax and work in browsers:

An HTML comment begins with "<!--", ends with "-->", and does not contain "--" or ">" anywhere in the comment.
The following are examples of HTML comments:

► <!-- This is a comment. -->
► <!-- This is another comment,
and it continues onto a second line. -->
► <!---->

4. How you create arrays in JavaScript?

We can declare an array like this
var scripts = new Array()
We can add elements to this array like this

scripts[0] = " PHP"
scripts[1] = " ASP"
scripts[2] = " JavaScript"
scripts[3] = " HTML"

Now our array scripts have 4 elements inside it and we can print or access them by using their index number. Note that index number starts from 0. To get the third element of the array we have to use the index number 2. Here is the way to get the third element of an array.
document.write(scripts[2])
We also can create an array like this
var no_array = new Array(21, 22, 23, 24, 25)

5. How to submit a form using JavaScript?

Use document.forms[0].submit()
(0 refers to the index of the form - if we have more than one form in a page, then the first one has the index 0, second has index 1 and so on).

Assuming that you have defined the name attribute also for your form, you can write:
document.forms[""].submit();

6. Give example of using Regular Expressions for syntax checking in JavaScript?

var re = new RegExp(" ^(&[A-Za-z_0-9]{1,}=[A-Za-z_0-9]{1,})*$" )
var text = myWidget.value
var OK = re.test(text)
if( ! OK ) {
alert(" The extra parameters need some work. Should be something like: " &a=1&c=4" " )
}

7. How you read and write a file using JavaScript?

I/O operations like reading or writing a file is not possible with client-side JavaScript. However , this can be done by coding a Java applet that reads files for the script.

8. What is the relationship between JavaScript and ECMAScript?

ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3.

9. Define JavaScript?

JavaScript is a general-purpose programming language designed to let programmers of all skill levels control the behavior of software objects. The language is used most widely today in Web browsers whose software objects tend to represent a variety of HTML elements in a document and the document itself. But the language can be--and is--used with other kinds of objects in other environments. For example, Adobe Acrobat Forms uses JavaScript as its underlying scripting language to glue together objects that are unique to the forms generated by Adobe Acrobat. Therefore, it is important to distinguish JavaScript, the language, from the objects it can communicate with in any particular environment. When used for Web documents, the scripts go directly inside the HTML documents and are downloaded to the browser with the rest of the HTML tags and content.

JavaScript is a platform-independent, event-driven, interpreted client-side scripting and programming language developed by Netscape Communications Corp. and Sun Microsystems.

10. How you create border using images by CSS3?

By using border-image: property of css3 we can create a border using images like below
.roundpcds
{
border-image:url(borderpcds.png) 30 30 round;
-moz-border-image:url(borderpcds.png) 30 30 round; /* Firefox */
-webkit-border-image:url(borderpcds.png) 30 30 round; /* Safari and Chrome */
-o-border-image:url(borderpcds.png) 30 30 round; /* Opera */
}
.stretchPcds
{
-moz-border-image:url(borderpcds.png) 30 30 stretch; /* Firefox */
-webkit-border-image:url(borderpcds.png) 30 30 stretch; /* Safari and Chrome */
-o-border-image:url(borderpcds.png) 30 30 stretch; /* Opera */
border-image:url(borderpcds.png) 30 30 stretch;
}

Download Interview PDF

11. Which new futures added in CSS3 for Borders and how Browser Support it?

Following border futures added:
★ border-radius
★ box-shadow
★ border-image

and all modern Browser Support it like below:
★ Internet Explorer 9 supports border-radius and box-shadow
★ Firefox requires the prefix -moz- for border-image.
★ Chrome and Safari requires the prefix -webkit- for border-image.
★ Opera requires the prefix -o- for border-image.

12. How you can create rounded corners using css3?

We have to creat a class like below
<style>
.roundc{
border:2px solid #ff0000;
border-radius:25px;
background:#dddddd;
width:300px;
-moz-border-radius:25px; /* Firefox */
-webkit-border-radius:25px; /* Chrome and Safari */
-o-border-radius:25px; /* Opera */
}
</style>
and we have to add this class where we want the round corner like in below div
<div class="roundc" > this is the round corner by css3 </div>

13. What are the CSS3 modules?

Below are the listed major modules:
★ Selectors
★ Box Model
★ Backgrounds and Borders
★ Text Effects
★ 2D/3D Transformations
★ Animations
★ Multiple Column
★ User Interface

14. Can you please explain the difference between CSS and CSS3?

CSS3 is upgreaded version of CSS with new future like Selectors,Box Model, Backgrounds and Borders, Text Effects,2D/3D Transformations, Animations, Multiple Column Layout,User Interface etc.

15. How you can store CSS definitions in external files?

If you want to share a set of CSS definitions with multiple HTML documents, you should those CSS definitions in an external file, and link it to those HTML documents using the LINK tag in the HEAD tag as:

<HEAD>
...
<LINK REL=stylesheet TYPE="text/css" HREF="css_file_url"/>
...
</HEAD>

Below is a CSS file called, GlobalGuideLine.css, that stores the same CSS definitions used in the previous exercise:

BODY {background-color: black}
P {color: yellow}

If you modify the HTML document with the LINK tag instead of the STYLE tag, you can get the same result:

<html><head>
<title>CSS Linked</title>
<link rel=stylesheet type="text/css" href="GlobalGuideLine.css"/>
</head><body>
<p>Welcome to GlobalGuideLine.com.
You should see this text in yellow on black background.</p>
</body></html>

16. How I can include CSS inside the HEAD tag?

If you want to include CSS inside the HEAD tag and apply to the entire HMTL docuemnt, you can use the STYLE tag as <STYLE TYPE="text/css">css_definition</STYLE>. The following tutorial exercise shows you how to set body background to black and paragraph text to yellow:

<html><head>
<title>CSS Included</title>
<style type="text/css">
BODY {background-color: black}
P {color: yellow}
</style>
</head><body>
<p>Welcome to GlobalGuideLine.com.
You should see this text in yellow on black background.</p>
</body></html>

17. How I can include CSS inside a HTML tag?

If you want to include CSS inside a HTML tag, you can use the STYLE attribute as <TAG STYLE="css_definition" ...>. Of course, the CSS definition will only apply to this instance of this tag. The following tutorial exercise shows you how to set background to gray on a <PRE> tag:

<p>Map of commonly used colors:</p>
<pre style="background-color: gray">
black #000000
white #ffffff
gray #7f7f7f
red #ff0000
green #00ff00
blue #0000ff

18. How many ways to attach CSS to HTML documents?

There are 3 ways to attach CSS to HTML documents:
★ Included in the STYLE attribute of HTML tags.
★ Included in the STYLE tag inside the HEAD tag.
★ Included in an external file and specify it in the LINK tag inside the HEAD tag.

19. List the basic Unit of CSS?

The basic unit of CSS is a definition of a style property for a selected HTML tag written in the following syntax:
html_tag_name {style_property_name: style_property_value}

For example:
/* set background color to black for the <BODY> tag */
BODY {background-color: black}

/* set font size to 16pt for the <H1> tag */
H1 {font-size: 16pt}

/* set left margin to 0.5 inch for the <BLOCKQUOTE> tag */
BLOCKQUOTE {margin-left: 0.5in}

20. Define CSS (Cascading Style Sheets)?

CSS (Cascading Style Sheets) is a technical specification that allows HTML document authors to attach formatting style sheets to HTML documents. When HTML documents are viewed as Web pages through Web browsers, the attached style sheets will alter the default style sheets embedded in browsers.

One of the fundamental features of CSS is that style sheets cascade; authors can attach a preferred style sheet, while the reader may have a personal style sheet to adjust for human or technological handicaps. The rules for resolving conflicts between different style sheets are defined in CSS specification.

CSS specification is maintained by W3C. You can download a copy of the specification at http://www.w3.org/.
Tutorials below are based Cascading Style Sheets, level 1, which has been widely accepted as the current standard.

21. Which browsers support AJAX?

★ Internet Explorer 5.0 and up,
★ Opera 7.6 and up,
★ Netscape 7.1 and up,
★ Firefox 1.0 and up,
★ Safari 1.2 and up,
★ among others support AJAX.

22. Which kinds of applications is Ajax best suited for?

We don't know yet. Because this is a relatively new approach, our understanding of where Ajax can best be applied is still in its infancy. Sometimes the traditional web application model is the most appropriate solution to a problem.

23. Can you please explain the difference between proxied and proxyless calls in AJAX?

Proxied calls are made through stub objects that mimic your PHP classes on the JavaScript side in AJAX. E.g., the helloworld class from the Hello World example.
Proxyless calls are made using utility JavaScript functions like HTML_AJAX.replace() and HTML_AJAX.append() in AJAX.

24. What I need to know to create my own AJAX functionality?

If you plan not to reuse and existing AJAX component here are some of the things you will need to know.
Plan to learn Dynamic HTML (DHTML), the technology that is the foundation for AJAX. DHTML enables browser-base realtime interaction between a user and a web page. DHTML is the combination of JavaScript, the Document Object Model (DOM) and Cascading Style Sheets (CSS).
* JavaScript - JavaScript is a loosely typed object based scripting language supported by all major browsers and essential for AJAX interactions. JavaScript in a page is called when an event in a page occurs such as a page load, a mouse click, or a key press in a form element.
* DOM - An API for accessing and manipulating structured documents. In most cases DOM represent the structure of XML and HTML documents.
* CSS - Allows you to define the presentation of a page such as fonts, colors, sizes, and positioning. CSS allow for a clear separation of the presentation from the content and may be changed programmatically by JavaScript.
Understanding the basic request/response nature of HTTP is also important. Many subtle bugs can result if you ignore the differences between the GET and OIst methods when configuring an XMLHttpRequest and HTTP response codes when processing callbacks.
JavaScript is the client-side glue, in a sense. JavaScript is used to create the XMLHttpRequest Object and trigger the asynchronous call. JavaScript is used to parse the returned content.

25. What I do on the server to interact with an AJAX client?

The "Content-Type" header needs to be set to"text/xml". In servlets this may be done using the HttpServletResponse.setContentType()should be set to "text/xml" when the return type is XML. Many XMLHttpRequest implementations will result in an error if the "Content-Type" header is set The code below shows how to set the "Content-Type".

response.setContentType("text/xml");
response.getWriter().write("<response>invalid</response>");

You may also want to set whether or not to set the caches header for cases such as autocomplete where you may want to notify proxy servers/and browsers not to cache the results.

response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
response.getWriter().write("<response>invalid</response>");

Note to the developer: Internet Explorer will automatically use a cached result of any AJAX response from a HTTP GET if this header is not set which can make things difficult for a developer. During development mode you may want set this header. Where do I store state with an AJAX client.

Download Interview PDF

26. Which Browsers does HTML_AJAX work with?

As of 0.3.0, all the examples that ship with HTML_AJAX have been verified to work with
★ Firefox 1.0+
★ Internet Explorer 5.5+ (5.0 should work but it hasn't been tested)
Most things work with
★ Safari 2+
★ Opera 8.5+

27. Will my server-side framework provide me with AJAX?

You may be benefiting from AJAX already. Many existing Java based frameworks already have some level of AJAX interactions and new frameworks and component libraries are being developed to provide better AJAX support. I won't list all the Java frameworks that use AJAX here, out of fear of missing someone.

If you have not chosen a framework yet it is recommended you consider using JavaServer Faces or a JavaServer Faces based framework. JavaServer Faces components can be created and used to abstract many of the details of generating JavaScript, AJAX interactions, and DHTML processing and thus enable simple AJAX used by JSF application developer and as plug-ins in JSF compatible IDE's, such as Sun Java Studio Creator.

28. What is the biggest challenges in creating Ajax?

The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities.

29. How to do HTML_AJAX integrate with other Javascript AJAX libraries such as scriptaculous? How would this integration look like?

To do this you just need to register the library with your server and load add its flag to your include line.

<?php
$this->server->registerJSLibrary('scriptaculous',
array('prototype.js','scriptaculous.js','builder.js','
effects.js','dragdrop.js','controls.js','slider.js'),'/pathto/scriptaculous/');
?>

<script type="text/javascrpt" src="server.php?client=scriptaculous">
</script>

30. What will HTML_AJAX integrate with other Javascript AJAX libraries such as scriptaculous? How would this integration look like?

HTML_AJAX doesn't have specific plans to integrate with other JavaScript libraries. Part of this is because external dependencies make for a more complicated installation process. It might make sense to offer some optional dependencies on a library like scriptaculous automatically using its visual effects for the loading box or something, but there isn't a lot to gain from making default visuals like that flashier since they are designed to be easily replaceable.

Most integration would take place in higher level components. Its unclear whether higher level components like that should be part of HTML_AJAX delivered through PEAR or if they should just be supported by HTML_AJAX and made available from http://www.globalguideline.com or some other site. If your interested in building widgets or components based on HTML_AJAX please let me know.

HTML_AJAX does however offer the ability to use its library loading mechanism with any JavaScript library. I use scriptaculous in conjunction with HTML_AJAX and I load both libraries through the server.

31. Why does the HTML_AJAX hang on some server installs?

If you run into an HTML_AJAX problem only on some servers, chances are your running into a problem with output compression. If the output compression is handled in the PHP config we detect that and do the right thing, but if its done from an apache extension we have no way of knowing its going to compress the body. Some times setting HTML_AJAX::sendContentLength to false fixes the problem, but in other cases you'll need to disabled the extension for the AJAX pages.

I've also seen problems caused by debugging extensions like XDebug, disabling the extension on the server page usually fixes that. Questions dealing with Using HTML_AJAX, and general JavaScript development.

32. Who is Using Ajax?

Google is making a huge investment in developing the Ajax approach. All of the major products Google has introduced over the last year - Orkut, Gmail, the latest beta version of Google Groups, Google Suggest, and Google Maps - are Ajax applications. (For more on the technical nuts and bolts of these Ajax implementations, check out these excellent analyses of Gmail, Google Suggest, and Google Maps.) Others are following suit: many of the features that people love in Flickr depend on Ajax, and Amazon's A9.com search engine applies similar techniques.
These projects demonstrate that Ajax is not only technically sound, but also practical for real-world applications. This isn't another technology that only works in a laboratory. And Ajax applications can be any size, from the very simple, single-function Google Suggest to the very complex and sophisticated Google Maps.
At Adaptive Path, we've been doing our own work with Ajax over the last several months, and we're realizing we've only scratched the surface of the rich interaction and responsiveness that Ajax applications can provide. Ajax is an important development for Web applications, and its importance is only going to grow. And because there are so many developers out there who already know how to use these technologies, we expect to see many more organizations following Google's lead in reaping the competitive advantage Ajax provides.

33. Where should I start Ajax?

Assuming the framework you are using does not suffice your use cases and you would like to develop your own AJAX components or functionality I suggest you start with the article Asynchronous JavaScript Technology and XML (AJAX) With Java 2 Platform, Enterprise Edition.
If you would like to see a very basic example that includes source code you can check out the tech tip Using AJAX with Java Technology. For a more complete list of AJAX resources the Blueprints AJAX Home page.
Next, I would recommend spending some time investigating AJAX libraries and frameworks. If you choose to write your own AJAX clients-side script you are much better off not re-inventing the wheel.
AJAX in Action by Dave Crane and Eric Pascarello with Darren James is good resource. This book is helpful for the Java developer in that in contains an appendix for learning JavaScript for the Java developer.

34. When to use an Java applet instead of AJAX?

Many amazing things can be done with AJAX/DHTML but there are limitations. AJAX and applets can be used together in the same UIs with AJAX providing the basic structure and applets providing more advanced functionality. The Java can communicate to JavaScript using the Live-Connect APIs. The question should not be should framed as do I use AJAX or applets, but rather which technology makes the best sense for what you are doing. AJAX and applets do not have to be mutually exclusive.

35. Where to find examples of AJAX?

While components of AJAX have been around for some time (for instance, 1999 for XMLHttpRequest), it really didn't become that popular until Google took.
But Global Guide Line guide all of its viewers to learn AJAX from absolute beginner to advance level...

36. When will the HTML_AJAX have a stable release?

Once all the major features are complete and the API has been tested, the roadmap gives an idea of whats left to be done.

37. When to use a synchronous versus a asynchronous request?

Good question. They don't call it AJAX for nothing! A synchronous request would block in page event processing and I don't see many use cases where a synchronous request is preferable.

38. What with the -alpha in the install instructions?

HTML_AJAX hasn't had a stable release yet and the pear installer doesn't install non stable packages by default unless you specify a version.

39. Described Ajax?

The Document Object Model manipulated through JavaScript to dynamically display and interact with the information presented. The XMLHttpRequest object to exchange data asynchronously with the web server. In some Ajax frameworks and in some situations, an IFrame object is used instead of the XMLHttpRequest object to exchange data with the web server. Like DHTML, LAMP, or SPA, Ajax is not a technology in itself, but a term that refers to the use of a group of technologies together. In fact, derivative/composite technologies based substantially upon Ajax, such as AFLAX, are already appearing.
Ajax applications are mostly executed on the user's computer; they can perform a number of tasks without their performance being limited by the network.

40. AJAX stands for?

AJAX stands for Asynchronous JavaScript and XML.
Asynchronous JavaScript and XML, or Ajax (pronounced "Aye-Jacks"), is a web development technique for creating interactive web applications using a combination of: XHTML (or HTML) and CSS for marking up and styling information. (XML is commonly used, although any format will work, including preformatted HTML, plain text, JSON and even EBML).

Download Interview PDF

41. Which skills and technologies are you the most interested in improving upon or learning?

Find out if their future interests match the direction of the position (or the company in general).

42. Define AJAX?

AJAX (Asynchronous JavaScript and XML) is a newly coined term for two powerful browser features that have been around for years, but were overlooked by many web developers until recently when applications such as Gmail, Google Suggest, and Google Maps hit the streets.

43. Which are a few personal web projects you have got going on?

Almost all developers have personal web projects they like to plug away at in their spare time. This is another question that can help differentiate the passionate developers from the clock-punchers. It's also a good question to end an interview with, as it's usually easy (and fun) for them to answer.

44. Which web browser do you use?

There is a right answer to this question: all of them. A competent developer should be familiar with testing cross-browser compatibility by using all the major web browsers. Obviously they'll have a primary browser they use for surfing, but their answer to this question might be a good way for you to segue to asking how extensively they test cross-browser issues. Also, if it's some kind of css/html position seeing what toolbars they have installed can be a good metric of their skillset (I personally find the web developer toolbar for firefox to be invaluable).

45. How you acronym time (oh boy!)?

Some might argue that knowing what acronyms actually stand for is trivial, but there are certain acronyms that a developer should have hard-wired into their head ( HTML or CSS, for example). This is the kind of question that might be better reserved for the phone interview to weed out those who are very unqualified.

46. Tell me do you find any particular languages or technologies intimidating?

I've often felt that the more I learn, the less I feel like I know. Solving one mystery opens up ten others. Having the interviewee tell you their faults can reveal a lot about what they know.

47. Which is your favorite development language and why? What other features (if any) do you wish you could add to this language?

Asking about feature additions is a particularly valuable question - it can reveal if they're skilled in programming in general or if their skillset is pigeonholed into their language of choice.

48. When you just pulled up the website you built and the browser is displaying a blank page. Walk me through the steps you would take to troubleshoot the problem?

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

49. How you fix this code?

Give them some broken code written in the development language they are expected to know for the position. Have them go through it line by line and point out all the mistakes.

50. What are a few sites you admire and why?

Find out what inspires them. While it doesn't necessarily "take one to know one," a great developer should always have a few impressive favorites.

51. How to show code?

Whether it's plain old HTML or freakishly advanced ruby on rails, ask for code samples. Source code can say more about a persons work habits than you think. Clean, elegant code can often be indicative of a methodical, capable developer. A resume may say 7+ years of perl experience, but that could mean 7 years of bad, unreadable perl. Also, make sure you ask for a lot of source code, not just a few isolated functions or pieces of HTML. Anyone can clean up 20-30 lines of code for an interview, you want to see the whole shebang. Don't ask for a full, functional app, but make sure it's enough that you can tell it's really what their code is like.

52. Which sized websites have you worked on in the past?

Find a developer that has experience similar in size to the project you're putting together. Developers with high traffic, large scale site expertise may offer skills that smaller-sized developers don't, such as fine tuning apache or optimizing heavily hit SQL queries. On the other hand, developers who typically build smaller sites may have an eye for things that large scale developers don't, such as offering a greater level of visual creativity.

53. How to show portfolio?

A portfolio can say a lot about a developer. Do they have an eye for aesthetics? Are they more creatively or logically oriented? The most important thing is to look for is solid, extensive, COMPLETED projects. A half dozen mockups and/or hacked-out scripts is a sign of inexperience or incompetence.

54. Demonstrate your level of competence in a *nix shell environment?

See how well they work without their precious GUI. Ask some basic questions like how they would recursively copy a directory from one place to another, or how you'd make a file only readable by the owner. Find out what OSs they have experience with.

55. Which 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.

Download Interview PDF

56. So do you prefer to work alone or on a team?

This is an important question to ask depending on the work environment. If your project is going to require close interaction with other developers it's very handy to have someone who has had that kind of experience. On the other hand, many developers thrive while going solo. Try to find a developer that fits your needs.

57. How to write table-less XHTML? Do you validate your code?

Weed out the old-school table-driven design junkies! Find a developer who uses HTML elements for what they were actually intended. Also, many developers will say they can go table-less, but when actually building sites they still use tables out of habit and/or convenience. Possibly draw up a quick navigation menu or article and have them write the markup for it. To be tricky, you could draw up tabular data - give them bonus points if they point out that a table should be used in that scenario.

58. What is w3c?

Standards compliance in web development is where everything is (hopefully?) going. Don't ask them to recite the w3c's mission statement or anything, but they should at least have a general idea of who they are.

59. How much comfortable are you with writing HTML entirely by hand?

Although their resume may state that they are an HTML expert, often times many developers ca not actually write an HTML document from top to bottom. They rely on an external publisher or have to constantly flip back to a reference manual. Any developer worth a damn should at least be able to write a simple HTML document without relying on external resources. A possible exercise is to draw up a fake website and ask them to write the HTML for it. Keep it simple and just make sure they have the basics down - watch for mistakes like forgetting the tags or serious misuse of certain elements. If they write something like: , it might be a good hint to wrap things up and call the next interviewee.

60. Which 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 web development. It will 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.