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.
1. Can I put markup in ALT text?
No. Character entities (©, nnn; and such) are permitted, though. If you want to know how to write good ALT texts without markup, please see Alan Flavell's essay on choosing ALT texts.
2. How can I make a custom rule, or a list with custom bullets?
Use a stylesheet: UL LI { list-style-image: url(mybullet.gif); } This states that the file 'mybullet.gif' should be used as the image for every bullet in a bulleted-list. Again, you can use classes or the ID attribute to change the image on one specific bullet.
3. How do I add music to my page?
Some people use the Netscape specific &/or Explorer specific code, however I recommend you make it a link and let the reader choose whether or not they want to hear music. Like this... Heaven on Earth would allow the reader to choose the link Heaven on Earth. Then the reader's software will open the link for them to hear the midi. Some people do use the other method, however it is only operational to that specific browser. (Like only Netscape users could hear it for Netscape's specific code.. or the same for Internet Explorer's code.)
4. How do I align text next to a graphic?
By including the "align" element in the "img" tag. Photo of wildflowers in Texas (The align="top" would align the text "Photo of wildflowers in Texas" next to the graphic at the top. - Other options are "middle" or "bottom.")
5. How do I center a table?
Use a stylesheet: TABLE { text-align: center; }
6. How do I change the color of my background or text?
Include the element "bgcolor" with a color code in your body tag: BGCOLOR: is the color you want for the background TEXT: the color you want to designate for regular text LINK: the color for new text links (pages that have not been displayed by the reader's browser) VLINK: the color for text links to pages that the reader's browser has already displayed ALINK: the color a text link will change to during the process of choosing it (as it is clicked with the mouse) * Color codes: Web Safe Color Chart and also Non-Dithering Colors by Hue To change the color of a word, or sentence, you put before the text you want colored, and at the end. (substituting the "cc0000" with the code for the color you want) In the color code "#CC0000" - the "CC" position is red, center "00" position is green, and last "00" position is blue. Web Safe Colors use lower numbers for darkest colors, going 00, 33, 66, and 99, then cc, and ff... with 'ff' being the lightest.
7. How do I detect what browser is being used?
Many browsers identify themselves when they request a document. A CGI script will have this information available in the HTTP_USER_AGENT environment variable, and it can use that to send out a version of the document which is optimized for that browser. Keep in mind not all browsers identify themselves correctly. Some webmasters use browser detection scripts and prevent certain browsers from accessing their site. Because of this, many browsers allow their users to change the identification string completely. And of course, if a cache proxy keeps the Internet Explorer-specific version, someone with an other browser will also get this document if he goes through the cache.
8. How do I display the current date or time in my document?
With server-side includes. Ask your webmaster if this is supported, and what the exact syntax is for your server. But this will display the local time on the server, not for the client. And if the document is cached, the date will of course be incorrect after some time. JavaScript can be used to display the local time for the client, but as most people already have one or more clocks on their screen, why display another one?
9. How do I do a pagebreak?
You don't. HTML is not a page layout language. It's up to the browser to decide where and how to insert page breaks when the document is being printed. The CSS2 standard for stylesheets, allows you to specify pagebreak points for printing. However this option is not widely supported at this time.
10. How do I force a download?
You can't.Ok, I'll explain anyway. :-) 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".