PDA

View Full Version : What To Nest ?



sunny
04-09-2005, 06:42 PM
Is it Better to nest <td> in <div> Or <div> in <td>

Here's a part of the code --

<LINK HREF="script.css" REL="STYLESHEET" TYPE="text/css">
<style>
.easy{background-color:black; color:magenta; font-size:13pt}
.difficult{background-color:black;color:red; font-size:13pt}
</style>
</head>
<body>
<table width="500" cellpadding=0 cellspacing=0 border=0>
<td>
<marquee class="mq" behavior="alternate">EASY ....... DIFFICULT</marquee></td><tr>
<td>
<div class="easy" align=left>
Easy is to get a place is someone's address book.</div></td><tr>
<td>
<div class="difficult" align=right>
Difficult is to get a place in someone's heart.</div></td><tr>
<td>
<div class="easy" align=left>
Easy is to judge the mistakes of others.</div></td><tr>
<td>
<div class="difficult" align=right>
Difficult is to recognize our own mistakes.</div></td><tr>
<td>
<div class="easy" align=left>
Easy is to talk without thinking.</div></td><tr>
<td>
<div class="difficult" align=right>
Difficult is to refrain the tongue.</div></td><tr>
<td>
<div class="easy" align=left>
Easy is to hurt someone who loves us.</div></td><tr>
<td>
<div class="difficult" align=right>
Difficult is to heal the wound...</div></td><tr>
<td>
<div class="easy" align=left>
Easy is to forgive others.</div></td><tr>
<td>
<div class="difficult" align=right>
Difficult is to ask for forgiveness</div></td><tr>
<td>
<div class="easy" align=left>
Easy is to set rules.</div></td><tr>
<td>
<div class="difficult" align=right>
Difficult is to follow them...</div></td><tr>
<td>
/*...
.......*/
</table>

For full code:
http://www.powow.com/wowarticles/easy.html

further,
I would like to know in which situation which tag should be nested in which tag?
My opinion is that huge data residing under <table> <td> should be nested into <div>tag.