Jack Pivac wrote:
on 10/03/06 13:56 Lachlan Hunt said the following:
I have a page with about 20-30 div's each about 200-300px height.

With that many, you may be overusing/abusing the div element.  [...]
You should probably try and find more semantic elements.

So in this case
http://temp.delphinus.co.nz/tab/test.html

In that case, the <div class="office"> look acceptable, the rest don't. Although besides the divs, there are some other things I'd be more concerned about.

Firstly, the page doesn't have a DOCTYPE so it doesn't validate. Using the DOCTYPE override on the validator, it will validate as HTML 4.01 Strict, but it's not really conformant and there are other issues.

From the source of that page:
<div class="office">
<strong>Alex11223</strong><br>

That should probably be an <h2>.  Lose the <br>.

<div class="right">
  12345677 - Office<br>
  01234567 - RSO Dial<br>
</div>

"right" is a presentational class name, perhaps "phone-numbers" (or whatever they are) would be a better alternative. It also looks like it's a list of phone numbers, so mark it up as a list.

<ul class="phone-numbers">
  <li>12345677 - Office</li>
  <li>01234567 - RSO Dial</li>
</ul>

<div class="pm" style="background: orange">
  Last PM in August 2005<br>
</div>

What's the extra <br> for? This div would probably be better replaced with a <p> element and lose the style attribute, since it's presentational.

<p class="pm">Last PM in Augus 2005</p>

<br>
Joe Blogs<br>
<br>
7-13 House st<br />

XHTML syntax in HTML document. It will validate but its meaning in HTML is different from that in XHTML, although browsers don't support it.

Alexandra<br><br>

This whole address would be better marked up with a <p> element, perhaps given an appropriate class attribute, and remove the 2 extraneous <br> elements from the end. (use of <address> would be wrong)

<p class="address">
Joe Blogs<br>
7-13 House st<br>
Alexandra</p>

DDI - 11111/11<br>
LN/Group - 3111/1<br>
UGEN# - 11111<br>
Office ID - omgofc<br>

This looks like a list (<ul>) or maybe a definition list.

<table border>

According to the spec and the HTML 4 DTD, that border attribute is shorthand for frame="border". However, browsers will incorrectly treat it as border="1". That is why the page validates, but it doesn't mean what you thought. Both are also presentational attributes and would be best replaced with CSS.

  <tr>
    <td>Terminal1</td><td>Terminal2</td><td>OFC</td><td>Printer</td></tr>

This could be marked up within a <thead> element and the <td>s replaced with <th>.

  <tr>
    <td>CM0111</td><td>CM0111</td><td>CM0111</td><td>CM0111</td>
  </tr>
</table>

The rest of this table looks fine.

Rarely Used Spares - 211<br>
Not Used Spares - 0<br>

Looks like another list; or at the very least a <p>.

--
Lachlan Hunt
http://lachy.id.au/

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to