Logo F2FInterview

HTML Interview Questions

Q   |   QA

The “correct” way of doing it is <TABLE ALIGN=CENTER>, but this doesn’t work in several popular browsers. Put <CENTER> around the entire table for these browsers.
This causes some problems with browser that do support CENTER but not tables, such as Lynx. In these browsers, the contents of the cells is now displayed centered, which is not what is intended. To avoid this, you can put the cell’s contents in <P ALIGN=left> or <DIV ALIGN=left> depending on the amount of text in the cell.

Yes. Put these two statements in the <HEAD> part of your documents:
<META NAME=”keywords” CONTENT=”keyword keyword keyword keyword”>
<META NAME=”description” CONTENT=”description of your site”>
Both may contain up to 1022 characters. If a keyword is used more than 7 times the keywords tag will be ignored altogether. Also, you can’t put markup (other than entities) in the description or keywords list. Infoseek and Alta Vista are using this.

The most reliable way is to configure the server to send out a redirection instruction when the old URL is requested. Then the browser will automatically get the new URL. This is the fastest way to do this. You can of course also simply put up a small page with a text like “This page has moved to http://new.url/, please adjust your bookmarks”.
A Netscape-only solution, which doesn’t work on other browsers, and screws up the “back” button in Netscape, is
which will load the new URL after x seconds. This should go in the HEAD of the document. But if you do this, also include a short text saying “Document moved to new URL so-and-so” for other browsers.
(The screwing-up bit refers to the fact that if you press “Back” after you have been redirected, you will be taken to the document with the META refresh. Then the refresh will be activated, and so you’ll jump to the page you just tried to leave.)

In HTML, this is impossible. Going “back” means that you go to the previous page in your history. 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.
A JavaScript could use “history.back()” to do this, but this only works in Netscape 2.

You can’t. When someone downloads a document, the server tells the browser what type of file it is. The browser then picks the appropriate helper application, or displays it himself. If the server doesn’t know the file type, it tells the browser that the file is “text/plain”, or just plain text. You will have to ask your server admin to configure this particular file with the MIME type you want.
“Forcing” a download is not what you are supposed to do. After all, what is more convenient than having the proper application started when I download a particular file? Browsing through a download directory can be quite a pain. And most browsers allow the user to download to disk if they want to.
If the file must be saved to disk, as there is absolutely NO other way to handle it, the MIME type should be “application/octet-stream”.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: