HTML Interview Questions and Answers

Hypertext Markup Language is the authoring software language used on the Internet's World Wide Web. HTML is used for creating World Wide Web pages. In practical terms, HTML is a collection of platform-independent styles (indicated by markup tags) that define the various components of a World Wide Web document. HTML was invented by Tim Berners-Lee while at CERN, the European Laboratory for Particle Physics in Geneva.Hyper Text Mark-Up Language (HTML), a subset of Standard Generalized Mark-Up Language (SGML) for electronic publishing, the specific standard used for the World Wide Web.

HTML Interviews are getting tough these days as the technology grows faster. To get through the HTML interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed HTML questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on HTML and various other technologies interview preparation.



<< Previous                Next >>

 

11. How do I get a back button on my page?

In HTML, this is impossible. Going "back" means that you go to the previous page in your history. The webserver cannot know which page this is, since it depends on the web browsing session. A user may have entered the URL by hand, selected it from his bookmarks or clicked on it from an e-mail. In such situations, the previous webpage is completely unknown to the webserver. You might be able to create a link to the URL specified in the "HTTP_REFERER" environment variable in your document, but that only creates a link to a new location in your history. Even worse, the information in that variable can be plain wrong. Some browsers incorrectly send the variable when you use a bookmark or type in an URL manually, and some don't send that variable at all. Then you would end up with an empty link. If you want to use JavaScript, you could use Go back although this results in a link that does not work for people that have Javascript disabled.


12. How do I get a counter?

Either ask your Webmaster for access to the log files, or for a server-side include which can do this, or use one of the freeware counters available at the CGI archives. There is no HTML tag to do this. Counters are quite pointless, though. They can be set to any value the owner wants, so they don't give you any information. Because of the delay that often occurs when using an external counter, your visitors may get annoyed with the long loading time of your document. The server's logfile provides a lot more reliable information for you, and you don't have to bother your readers with it.


13. How do I get a so-and-so character in my HTML?

HTML text is supposed to be written in the ISO Latin-1 character set. A complete overview of all the characters in this set is available from the Web Design Group.


14. How do I get my visitor's e-mail addresses?

You can't. Although each request for a document is usually logged with the name or address of the remote host, the actual username is almost never logged as well. This is mostly because of performance reasons, as it would require that the server uses the ident protocol to see who is on the other end. This takes time. And if a cache proxy is doing the request, you don't get anything sensible. The most reliable way is to put up a form, asking the visitor to fill in his e-mail address. If you offer him something in return, he will most likely do it.


15. How do I get scrolling text in the status bar?

This is not an HTML question, it's done with a Javascript. Check any page which has this feature, and copy the script from the source. These scripts have two big problems. First, usually it uses the decrement operator (c--) at some point. The "--" sequence in a comment actually closes it on some browsers, so your code may "leak" on those browsers. The same goes for ">". Second, keep in mind that many people consider this even worse than , and that it also suppresses the status information which normally appears there. It prevents people from knowing where a link goes to.


Your Ad Here

16. How do I hide my source?

You can't. The source is necessary for the browser to display your document. You have to send the complete, unencrypted source to the browser. Even if a particular browser doesn't have a "View source" option, there are many that do, and you can always retrieve the document by hand (using telnet) to get its source. Or check the browser's cache. You can of course put a few hundred empty lines above the actual source, then newbies who don't see the scrollbars will think there is nothing there.


17. How do I include one file in another?

Use server-side includes, if your server supports them. Ask your Webmaster if this is the case, and if so, what the exact syntax is for your server. If you use a language such as PHP, Perl or Python to generate your webpages dynamically, you can use the include command to dynamically include other files. Since server-side includes make the document slower, they are not always desirable. If your documents only have a static footer, which doesn't change every day, you might be better off by using an editor which can insert files in the current document, or a preprocessor.


18. How do I indent a full paragraph of text?

use a stylesheet: P { margin-left: 5em; } This would set the left margin of every paragraph to five ems. You can use an ID or CLASS to select only a specific paragraph, or wrap the paragraphs in question in a DIV element and set the left margin of that DIV element to something of your liking.


19. How do I indent the first line in my paragraphs?

Use a stylesheet: P:first-line { margin-left: 3em; } This applies the style "set the left margin to 3EM" to the first line of every paragraph. In the past various tricks with technically invalid HTML (or a 1x1 pixel GIF) were used, but these are more likely to screw up the result.


20. How do I know if my HTML is correct?

It's good to validate your HTML. Just because you can see the Web page ok on your browser doesn't mean every browser will show it that way, or even be able to access the Web page. Browsers attempt to "work around" HTML errors, and the differences can be subtle or drastic. That's why the folks at WC3 have worked up the specifications of what works for every browser. Although some may display it a little different, at least you know they can access your page. (The different browser programs have their own set of "whistles and bells" that just won't do the same... especially Microsoft Internet Explorer and Netscape Navigator.)


Your Ad Here

<< Previous                Next >>

 
Databases Questions and Answers
 
DB2 Interview Questions and Answers
IMS Interview Questions and Answers
MYSQL Interview Questions and Answers
Oracle Interview Questions and Answers
PL/SQL Interview Questions And Answers
Quel Interview Questions and Answers
SQL Interview Questions and Answers

 
 
.NET Interview Questions and Answers
 
ASP Interview Questions and Answers
C# Interview Questions and Answers
Visual Basic Interview Questions and Answers
 
J2EE Interview Questions and Answers
 
Enterprise Java Beans (EJB) Interview Questions And Answers
Hibernate Interview Questions And Answers
Jave Messaging Service (JMS) Interview Questions And Answers
Jave Server Faces (JSF) Interview Questions And Answers
Java Server Pages (JSP) Interview Questions And Answers
Servlets Interview Questions And Answers
Spring Framework Interview Questions And Answers
Struts Framework Interview Questions And Answers
 
JAVA Interview Questions and Answers
 
Core Java Interview Questions and Answers
Java Platform, Micro Edition (Java ME) Interview Questions And Answers
JAVA GUI Interview Questions and Answers
Java Performance Tuning Interview Questions And Answers
JUnit Interview Questions And Answers
Remote Method Invocation (RMI) Interview Questions And Answers
Unified Modeling Language (UML) Interview Questions And Answers
 
Java Application Server Interview Questions And Answers
 
Tomcat Application Server Interview Questions And Answers
WebLogic Application Server Interview Questions And Answers
 
Mainframe Interview Questions and Answers
 
CICS Interview Questions and Answers
COBOL Interview Questions and Answers
IMS Interview Questions and Answers
JCL Interview Questions and Answers
REXX Interview Questions and Answers
TELON Interview Questions and Answers
VSAM Interview Questions and Answers
 
Object Oriented Language Questions and Answers
 
C Interview Questions and Answers
C++ Interview Questions and Answers
Eiffel Interview Questions and Answers
J2EE Interview Questions and Answers
JAVA Interview Questions and Answers
Sather Interview Questions and Answers
Small talk Interview Questions and Answers
 
Operation Systems Interview Questions and Answers
 
MS DOS Interview Questions and Answers
Unix OS Interview Questions and Answers
Windows Interview Questions and Answers
 
Scripting languages Interview Questions and Answers
 
Java Script Interview Questions and Answers
Practical Extraction and Reporting Language Interview Questions and Answers
PHP Interview Questions and Answers
VBScript Interview Questions and Answers
 
UserInterfaces Questions and Answers
 
Foxit Interview Questions and Answers
Glade Interview Questions and Answers
Tweak Interview Questions and Answers
 
WEB Technologies Questions and Answers
 
AJAX Interview Questions and Answers
HTML Interview Questions and Answers
WML Interview Questions and Answers
XML Interview Questions and Answers
 
Interview Tips And Some Common Questions
 
Behavioral Interview Questions And Answers


Your Ad Here