|
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>Account:</TH> <TD><INPUT TYPE="text" NAME="account"></TD> </TR> <TR> <TH>Password:</TH> <TD><INPUT TYPE="password" NAME="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.3) By 7106 users |
Added on |
9/14/2014 |
Views |
68224 |
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>Account:</TH> <TD><INPUT TYPE="text" NAME="account"></TD> </TR> <TR> <TH>Password:</TH> <TD><INPUT TYPE="password" NAME="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 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
|
|
How can I eliminate the extra space after a </form> tag in html?
|
View Answer
|
|
How can I check for errors om html?
|
View Answer
|
|
How do I use forms?
|
View Answer
|
|
How do I center a table?
|
View Answer
|
|
How do I align a table to the right (or left)?
|
View Answer
|
|
What is a DOCTYPE? Which one do I use?
|
View Answer
|
|
What is a Hypertext link?
|
View Answer
|
|
How can I include comments in 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
|