• +91 9723535972
  • info@interviewmaterial.com

HTML Interview Questions and Answers

Related Subjects

HTML Interview Questions and Answers

Question - 11 : - How do I align a table to the right (or left)?

Answer - 11 : - You can use

to float a table to the right. (Use ALIGN="left" to float it to the left.) Any content that follows the closing
tag will flow around the table. Use
or
to mark the end of the text that is to flow around the table, as shown in this example: The table in this example will float to the right. ...
This text will wrap to fill the available space to the left of (and if the text is long enough, below) the table.
This text will appear below the table, even if there is additional room to its left.

Question - 12 : - How can I use tables to structure forms?

Answer - 12 : - 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 elements relative to each other, the entire table must be within the form. You cannot start a form in one TH or TD element and end in another. You cannot place the form within the table without placing it inside a TH or TD element. You can put the table inside the form, and then use the table to position the INPUT, TEXTAREA, SELECT, and other form-related elements, as shown in the following example.

Account:
Password:

Question - 13 : - How do I center a table?

Answer - 13 : - In your HTML, use

...
In your CSS, use div.center { text-align: center; } div.center table { margin-left: auto; margin-right: auto; text-align: left; }

Question - 14 : - How do I use forms?

Answer - 14 : - The basic syntax for a form is:

...
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 the form data. The form itself should contain * at least one submit button (i.e., an element), * form data elements (e.g., ,