Category Archives: HTML Interview Questions

How can I show HTML examples without them being interpreted as part of my document? | HTML Questions

Within the HTML example, first replace the “&” character with “&amp;” everywhere it occurs. Then replace the “&lt;” character with “<” and the “&gt;” character with “>” in the same way. Note that it may be appropriate to use the … Continue reading

Posted in HTML Interview Questions | Leave a comment

How do I make a form so it can be submitted by hitting ENTER? | HTML Questions

The short answer is that the form should just have one <input type=”TEXT” /> and no TEXTAREA, though it can have other form elements like checkboxes and radio buttons.

Posted in HTML Interview Questions | Leave a comment

Do I have to memorize a bunch of tags? | HTML Questions

No. Most programs that help you write HTML code already know most tags, and create them when you press a button. But you should understand what a tag is, and how it works. That way you can correct errors in … Continue reading

Posted in HTML Interview Questions | Leave a comment

How can I check for errors? | HTML Questions

HTML validators check HTML documents against a formal definition of HTML syntax and then output a list of errors. Validation is important to give the best chance of correctness on unknown browsers (both existing browsers that you haven’t seen and … Continue reading

Posted in HTML Interview Questions | Leave a comment

How do I use forms? | HTML Questions

The basic syntax for a form is: <FORM ACTION=”[URL]”>…</FORM> When the form is submitted, the form data is sent to the URL specified in the ACTION attribute. This URL should refer to a server-side (e.g., CGI) program that will process … Continue reading

Posted in HTML Interview Questions | Leave a comment

How do I center a table? | HTML Questions

In your HTML, use <div class=”center”> <table>…</table> </div> In your CSS, use div.center { text-align: center; } div.center table { margin-left: auto; margin-right: auto; text-align: left; }

Posted in HTML Interview Questions | Leave a comment

How can I use tables to structure forms? | HTML Questions

Small forms are sometimes placed within a TD element within a table. This can be a useful for positioning a form relative to other content, but it doesn’t help position the form-related elements relative to each other. To position form-related … Continue reading

Posted in HTML Interview Questions | Leave a comment

How do I align a table to the right (or left)? | HTML Questions

You can use <TABLE ALIGN=”right”> to float a table to the right. (Use ALIGN=”left” to float it to the left.) Any content that follows the closing </TABLE> tag will flow around the table. Use <BR CLEAR=”right”> or <BR CLEAR=”all”> to … Continue reading

Posted in HTML Interview Questions | Leave a comment

Can I nest tables within tables? | HTML Questions

Yes, a table can be embedded inside a cell in another table. Here’s a simple example: <table> <tr> <td>this is the first cell of the outer table</td> <td>this is the second cell of the outer table, with the inner table … Continue reading

Posted in HTML Interview Questions | Leave a comment

What is a DOCTYPE? Which one do I use? | HTML Questions

According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document uses. Originally, the DOCTYPE declaration was used only by SGML-based tools like HTML validators, which needed to determine which version … Continue reading

Posted in HTML Interview Questions | Leave a comment