|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
HTML
DETAILS
Question: Can I nest tables within tables?
Answer: 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 embedded in it <table> <tr> <td>this is the first cell of the inner table</td> <td>this is the second cell of the inner table</td> </tr> </table> </td> </tr> </table>
The main caveat about nested tables is that older versions of Netscape Navigator have problems with them if you don't explicitly close your TR, TD, and TH elements. To avoid problems, include every </tr>, </td>, and </th> tag, even though the HTML specifications don't require them. Also, older versions of Netscape Navigator have problems with tables that are nested extremely deeply (e.g., tables nested ten deep). To avoid problems, avoid nesting tables more than a few deep. You may be able to use the ROWSPAN and COLSPAN attributes to minimize table nesting. Finally, be especially sure to validate your markup whenever you use nested tables.
|
|
|
Category |
HTML Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7887 users |
Added on |
9/14/2014 |
Views |
72335 |
Rate it! |
|
|
Question:
Can I nest tables within tables?
Answer:
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 embedded in it <table> <tr> <td>this is the first cell of the inner table</td> <td>this is the second cell of the inner table</td> </tr> </table> </td> </tr> </table>
The main caveat about nested tables is that older versions of Netscape Navigator have problems with them if you don't explicitly close your TR, TD, and TH elements. To avoid problems, include every </tr>, </td>, and </th> tag, even though the HTML specifications don't require them. Also, older versions of Netscape Navigator have problems with tables that are nested extremely deeply (e.g., tables nested ten deep). To avoid problems, avoid nesting tables more than a few deep. You may be able to use the ROWSPAN and COLSPAN attributes to minimize table nesting. Finally, be especially sure to validate your markup whenever you use nested tables. 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 |
|
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
|
|
How do I create frames? What is a frameset?
|
View Answer
|
|
What is the simplest HTML page?
|
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
|