Question 1. What Is Html?
HTML is short for HyperText Markup Language, and is the language of the World Wide Web. It is the standard text formatting language used for creating and displaying pages on the Web. HTML documents are made up of two things: the content and the tags that formats it for proper display on pages.
Question 2. What Are Tags?
Content is placed in between HTML tags in order to properly format it. It makes use of the less than symbol (<) and the greater than symbol (>). A slash symbol is also used as a closing tag. For example:
Question 3. Do All Html Tags Come In Pair?
No, there are single HTML tags that does not need a closing tag. Examples are the tag and tags.
Question 4. How Do You Insert A Comment In Html?
Comments in html begins with “
Question 5. Do All Character Entities Display Properly On All Systems?
No, there are some character entities that cannot be displayed when the operating system that the browser is running on does not support the characters. When that happens, these characters are displayed as boxes.
Question 6. What Is The Purpose Of Canvas In Html?
The canvas element will be used as follows:
Question 7. What Is The Purpose Of Iframe In Html?
Iframe is called as inline frame that places one HTML document in a frame. It is different from the object element as the inline frame can be made in the target frame. The target frame consists of the links that is defined by other elements used in the web page. Iframe is used to focus on printing or viewing of the source. Iframe can be used by the user in those browser that supports it. If they have used iframe also then the incompatible browser won’t display the actual but display of the alternative text will take place.
Question 8. What Is The Main Function Of “pre” Tag In Html?
“pre” tag defines the pre-formatted text that is used to display the text with the fixed width and uses a predefined fonts and it keeps both spaces and line breaks separate and show the text as it is.
The code that can be used to display the text that can be written in whatever way the user wants is as follows:
Text in a pre element ----//
is displayed in a fixed-width
font, and it preserves
both spaces and
Question 9. How Can Tables Be Made Nested In Html?
Tables can be made nested by making it come in another table. This consists of many attributes and tags that can be used in nesting the tables.
this is the first cell this is the second cell this is the first cell second table this is the second cell of second table
HTML 5 Interview Questions
Question 10. How To Prevent The Display Of “getting Framed In Html?
Question 11. How To Include A Frame Set Inside Another Frame Set?
HTML+XHTML Interview Questions
Question 12. What Is Semantic Html?
Semantic HTML is a coding style. It is the use of HTML markup to reinforce the semantics or meaning of the content. For example: In semantic HTML
tag is not used for bold statement as well as
tag is used for italic. Instead of these we use
XML Interview Questions
Question 13. What Is A Marquee?
A marquee allows you to put a scrolling text in a web page. To do this, place whatever text you want to appear scrolling within the tags.
HTML 5 Tutorial
Question 14. What Are Empty Elements?
HTML elements with no content are called empty elements. For example:
Question 15. What Are The Different New Form Element Types In Html 5?
Following is a list of 10 important new elements in HTML 5:
Question 16. Is There Any Need To Change The Web Browsers To Support Html5?
No. Almost all browsers (updated versions) support HTML 5. For example: Chrome, Firefox, Opera, Safari, IE etc.
Question 17. Which Video Formats Are Supported By Html5?
HTML 5 supports three types of video format:
HTML DOM Interview Questions
Question 18. What Is The Difference Between Progress And Meter Tag?
The progress tag is used to represent the progress of the task only while the meter tag is used to measure data within a given range.
HTML 4 Interview Questions
Question 19. Why It Is Important To Set The Meta Information?
Metadata is the data about the data or the information about the data. There is a tag that is being provided for the HTML document. This information won’t be displayed anywhere and will not be visible to the user. It will be parsable by the machine which will parse it according to the requirement. It consists of the elements that are related to the page description, keywords, document related element. The tag that is being used resides in the section in HTML. The meta information is being used by the web browser or by the search engines to rank and let the user find the pages easily.
Question 20. Is There Any Way To Keep List Elements Straight In An Html File?
By using indents, you can keep the list elements straight. If you indent each subnested list in further than the parent list that contains it, you can at a glance determine the various lists and the elements that it contains.
Java Interview Questions
Question 21. If You See A Web Address On A Magazine, To Which Web Page Does It Point?
Every web page on the web can have a separate web address. Most of these addresses are relative to the top-most web page. The published web address that appears within magazines typically points this top-most page. From this top level page, you can access all other pages within the web site.
Question 22. What Is The Use Of Using Alternative Text In Image Mapping?
When you use image maps, it can easily become confusing and difficult to determine which hotspots corresponds with which links. Using alternative text lets you put a descriptive text on each hotspot link.
Question 23. Is It Possible To Set Specific Colours For Table Borders?
You can specify a border colour using style sheets, but the colours for a table that does not use style sheets will be the same as the text colour.
CSS Interview Questions
Question 24. What Is The Use Of Span In Html And Give One Example?
SPAN : Used for the following things:
1. Highlight the any color text
2. For adding colored text
3. For adding background image to text.
In this page we use span.
HTML Interview Questions
Question 25. What Is The Importance Of Doctype In Html?
Doctype tag is not a HTML tag, it is just an instruction that is passed to the web browser to check for the information that is being provided by the markup language in which the page is written. Doctype is sometimes referred as Document type definition (DTD) that describes some rules that has to be followed while writing the markup language so to make the web browser understand the language and the content correctly. Doctype is very important to be placed in the beginning of the HTML and before the tag to allow easy rendering of the pages that are used.
Question 26. What Do You Know About Java?
Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
Java Abstraction Interview Questions
Question 27. What Are The Supported Platforms By Java Programming Language?
Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, etc.
HTML 5 Interview Questions
Question 28. List Any Five Features Of Java?
Some features include
- Object Oriented
- Platform Independent
Question 29. Why Is Java Architectural Neutral?
It’s compiler generates an architecture-neutral object file format, which makes the compiled code to be executable on many processors, with the presence of Java runtime system.
Dynamic HTML Interview Questions
Question 30. How Java Enabled High Performance?
Java uses Just-In-Time compiler to enable high performance. Just-In-Time compiler is a program that turns Java bytecode, which is a program that contains instructions that must be interpreted into instructions that can be sent directly to the processor.
Question 31. Why Java Is Considered Dynamic?
It is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.
Question 32. List Two Java Ide’s?
XHTML Interview Questions
Question 33. Variables Used In A Switch Statement Can Be Used With Which Datatypes?
Variables used in a switch statement can only be a string, enum, byte, short, int, or char.
HTML+XHTML Interview Questions
Question 34. What Is Protected Access Modifier?
Variables, methods and constructors which are declared protected in a superclass can be accessed only by the subclasses in other package or any class within the package of the protected members’ class.
Question 35. What Do You Mean By Access Modifier?
Java provides access modifiers to set access levels for classes, variables, methods and constructors. A member has package or default accessibility when no accessibility modifier is specified.
Question 36. What Is A Static Variable?
Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block.
Question 37. When A Byte Datatype Is Used?
This data type is used to save space in large arrays, mainly in place of integers, since a byte is four times smaller than an int.
Question 38. What Is The Default Value Of Float And Double Datatype In Java?
Default value of float and double datatype in different as compared to C/C++. For float its 0.0f and for double it’s 0.0d
Question 39. What Is The Default Value Of Byte Datatype In Java?
Default value of byte datatype is 0.
Question 40. List The Three Steps For Creating An Object For A Class?
An Object is first declared, then instantiated and then it is initialized.
HTML DOM Interview Questions
Question 41. What Do You Mean By Constructor?
Constructor gets invoked when a new object is created. Every class has a constructor. If we do not explicitly write a constructor for a class the java compiler builds a default constructor for that class.
Question 42. What Is Singleton Class?
Singleton class control object creation, limiting the number to one but allowing the flexibility to create more objects if the situation changes.
Java Interview Questions
Question 43. What Is A Class Variable?
These are variables declared with in a class, outside any method, with the static keyword.
Question 44. What Is A Instance Variable?
Instance variables are variables within a class but outside any method. These variables are instantiated when the class is loaded.
Question 45. What Is A Local Variable?
Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and it will be destroyed when the method has completed.
Question 46. Define Class?
A class is a blue print from which individual objects are created. A class can contain fields and methods to describe the behavior of an object.
Question 47. What Do You Mean By Object?
Object is a runtime entity and it’s state is stored in fields and behavior is shown via methods. Methods operate on an object’s internal state and serve as the primary mechanism for object-to-object communication.
Question 48. What Is Finalize() Method?
It is possible to define a method that will be called just before an object’s final destruction by the garbage collector. This method is called finalize( ), and it can be used to ensure that an object terminates cleanly.
Question 49. Which Package Is Used For Pattern Matching With Regular Expressions?
Question 50. What Is The Difference Between Stringbuffer And Stringbuilder Class?
Use StringBuilder whenever possible because it is faster than StringBuffer. But, if thread safety is necessary then use StringBuffer objects.
Question 51. Why Is Stringbuffer Called Mutable?
The String class is considered as immutable, so that once it is created a String object cannot be changed. If there is a necessity to make alot of modifications to Strings of characters then StringBuffer should be used.
Question 52. How Can We Run Gwt Application?
Two ways of running the application:
1) Create a war file and deploy in any app server or
2) Run ant hosted in the command prompt. And click on the ‘Launch Default Browser’.
Question 53. Can We Set Css Style In Gwt Java Code?
The look and feel of a GWT application can be customized via CSS files. Each widget in GWT can be given a HTML “div” container and can therefore be individually styled by CSS. You use the Java method setStyle(String s) for this.
Question 54. What Are Modules, Entry Points And Html Pages In Gwt?
GWT applications are described as modules. A module “modulename” is described by a configuration file “modulename.gwt.xml”. Each module can define one or more Entry point classes.
An entry point is the starting point for a GWT application, similar to the main method in a standard Java program. A Java class which is an entry point must implement the interface “com.google.gwt.core.client.EntryPoint” which defines the method onModuleLoad().
The module is connected to a HTML page, which is called “host page”. The code for a GWT web application executes within this HTML document.
The HTML page can define “div” containers to which the GWT application can assign UI components or the GWT UI components are simply assigned to the body tag of the HTML page.
Question 55. How Many Modes Are Provided By Gwt To Execute Application?
There are two modes: Development mode and Web mode.
Development Mode: allows to debug the Java code of your application directly via the standard Java debugger.
Question 56. How Can You Set Browser Targeted Compilation In Gwt?
•To reduce the compilation time, choose favorite browser and add the user.agent property in the module configuration file.
Question 57. How To Compile The Gwt Application?
Run ant build in the root folder of the application. By default gwt compiler creates optimized JS files for some browsers.
: Disadvantage is it takes a lot of time to compile each change because of the permutations
1) Open command prompt
2) Go to the application root folder
3) Run command as “ant build”
Then you can see compile logs are coming. If you see BUILD SUCCESSFUL it means no error in your application. If BUILD FAILED it means there is an error in your application.
Question 58. How To Create A Gwt Application?
•Create a folder for the application (e.g. withoutbook)
•Run webAppCreator in the newly created folder
–webAppCreator takes a module name (here ‘withoutbook’ is the module name with a package prefix)
Question 59. What Is Gwt Rpc?
- RPC, Remote Procedure Call is the mechansim used by GWT in which client code can directly executes the server side methods.
- GWT RPC is servlet based.
- GWT RPC is asynchronous and client is never blocked during communication.
- Using GWT RPC Java objects can be sent directly between the client and the server (which are automatically serialized by the GWT framework).
- Server-side servlet is termed as service.
- Remote procedure call that is calling methods of server side servlets from client side code is referred to as invoking a service.
Question 60. What Are The Core Components Of Gwt Rpc?
Following are the three components used in GWT RPC communication mechanism:
- A remote service (server-side servlet) that runs on the server.
- Client code to invoke that service.
- Java data objects which will be passed between client and server.
- GWT client and server both serialize and deserialize data automatically so developers are not required to serialize/deserialize objects and data objects can travel over HTTP.
Question 61. Which Interface A Java Data Object Should Implement So That It Can Be Transferred Over The Wire In Gwt Rpc?
A java data object should implement isSerializable interface so that it can be transferred over the wire in GWT RPC.
Question 62. What Is Internationalization?
Internationalization is a way to show locale specific information on a website. For example, display content of a website in English language in United States and in Danish in France.
Question 63. What Are The Ways Using Which You Can Internationalize A Gwt Application?
GWT provides three ways to internationalize a GWT application −
- Static String Internationalization.
- Dynamic String Internationalization.
- Localizable Interface.
Question 64. What Is Static String Internationalization Technique In Gwt?
This technique is most prevalent and requires very little overhead at runtime; is a very efficient technique for translating both constant and parameterized strings;simplest to implement. Static string internationalization uses standard Java properties files to store translated strings and parameterized messages, and strongly-typed Java interfaces are created to retrieve their values.
Question 65. What Is Dynamic String Internationalization Technique In Gwt?
This technique is very flexible but slower than static string internationalization. Host page contains the localized strings therefore, applications are not required to be recompiled when we add a new locale. If GWT application is to be integrated with an existing server-side localization system, then this technique is to be used.
Question 66. What Is Localizable Interface Internationalization Technique In Gwt?
This technique is the most powerful among the three techniques. Implementing Localizable allows us to create localized versions of custom types. It’s an advanced internationalization technique.
Question 67. Which Tag Of *.gwt.xml Is Used To Support Internationalization In Gwt Application?
extend-property tag with attribute name set as locale and values as language specific locale, say de for german locale.
Question 68. What Is Simpleremoteloghandler In Gwt?
This handler sends log messages to the server, where they will be logged using the server side logging mechanism.
Question 69. What Is Popuploghandler In Gwt?
PopupLogHandler logs to the popup which resides in the upper left hand corner of application when this handler is enabled.
Question 70. What Is Firebugloghandler In Gwt?
FirebugLogHandler logs to Firebug console.
Question 71. What Is Consoleloghandler In Gwt?
Question 72. What Is Developmentmodeloghandler In Gwt?
DevelopmentModeLogHandler logs by calling method GWT.log. These messages can only be seen in Development Mode in the DevMode window.
Question 73. What Is Systemloghandler In Gwt?
SystemLogHandler logs to stdout and these messages can only be seen in Development Mode in the DevMode window.
Question 74. How Can You Create A Custom Gwt Widget?
GWT provides three ways to create custom user interface elements. There are three general strategies to follow −
- Create a widget by extending Composite Class − This is the most common and easiest way to create custom widgets. Here you can use existing widgets to create composite view with custom properties.
- Create a widget using GWT DOM API in JAVA − GWT basic widgets are created in this way. Still its a very complicated way to create custom widget and should be used cautiously.
Question 75. What Is Gwt Uibinder?
- The UiBinder is a framework designed to separate Functionality and View of User Interface.
- The UiBinder framework allows developers to build gwt applications as HTML pages with GWT widgets configured throughout them.
- The UiBinder framework makes easier collaboration with UI designers who are more comfortable with XML, HTML and CSS than Java source code.
- The UIBinder provides a declarative way of defining User Interface.
- The UIBinder seperates the programmic logic from UI.
- The UIBinder is similar to what JSP is to Servlets.
XML Interview Questions
HTML 4 Interview Questions
HTML 4 Tutorial
HTML Interview Questions