Forum Moderators: open
So, basically my question is; in XHTML, which is the correct out of these two?
<td>Some text</td>
<td><p>Some text</p></td>
The table is used for tabular data, but product names and such are text inside it. I've never used the <td><p></p></td> way before, but I'm starting to wonder if it is more semantically correct?
However, if only a single piece of text or a few words exist inside the cell, then there should be no extra HTML.
eg
<td><p>lots of texts goes here</p>
<p>even more text here</p></td>
or
<td>text</td>
cellarnews: Your point about resizing the text surprised me. So I just tried it using IE 6 & Firefox - using view--> text size in the browser.
Many general users do not know about that option in their web browser, so we have a dynamic CSS facility on our site that enables the user to click on a series of larger/smaller letters to permenently set our sites to a font size they prefer.
Also - a lot of sites lock their CSS so that the browser resize doesn't work - leading people to abandon using it.
I read one web major news site where the font is tiny and locked - the only way to read the page is to disable the browser setting completly, which also then makes the page look awful as none of the formatting loads.