|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
HTML
DETAILS
Question: How can I use tables to structure forms?
Answer: 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. <form action="[URL]"> <table border="0"> <tr> <th scope="row"> <label for="account">Account:</label> </th> <td> <input type="text" name="account" id="account"> </td> </tr> <tr> <th scope="row"> <label for="password">Password: </th> <td> <input type="password" name="password" id="password"> </td> </tr> <tr> <td> </td> <td><input type="submit" name="Log On"></td> </tr> </table> </form>
|
|
|
Category |
HTML Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9315 users |
Added on |
9/14/2014 |
Views |
67731 |
Rate it! |
|
|
Question:
How can I use tables to structure forms?
Answer:
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. <form action="[URL]"> <table border="0"> <tr> <th scope="row"> <label for="account">Account:</label> </th> <td> <input type="text" name="account" id="account"> </td> </tr> <tr> <th scope="row"> <label for="password">Password: </th> <td> <input type="password" name="password" id="password"> </td> </tr> <tr> <td> </td> <td><input type="submit" name="Log On"></td> </tr> </table> </form> Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How can I eliminate the extra space after a </form> tag?
|
View Answer
|
|
How do I set the focus to the first form field?
|
View Answer
|
|
How do I make a form so it can be submitted by hitting ENTER?
|
View Answer
|
|
Do I have to memorize a bunch of tags?
|
View Answer
|
|
How can I check for errors?
|
View Answer
|
|
How do I use forms?
|
View Answer
|
|
How do I center a table?
|
View Answer
|
|
How can I use tables to structure forms?
|
View Answer
|
|
How do I align a table to the right (or left)?
|
View Answer
|
|
Can I nest tables within tables?
|
View Answer
|
|
What is a DOCTYPE? Which one do I use?
|
View Answer
|
|
What is everyone using to write HTML?
|
View Answer
|
|
How comfortable are you with writing HTML entirely by hand?
|
View Answer
|
|
How comfortable are you with writing HTML entirely by hand?
|
View Answer
|
|
What is a Hypertext link?
|
View Answer
|
|
How can I include comments in HTML?
|
View Answer
|
|
How do I create frames? What is a frameset?
|
View Answer
|
|
How can you have different number of cells for each row of a table?
|
View Answer
|
|
How can I use forms for pull-down navigation menus?
|
View Answer
|
|
Can I have two or more actions in the same form of html?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All HTML Interview Questions & Answers - Exam Mode /
Learning Mode
|