N
Nik Coughin
Contact information is a list of name=value pairs.
Name=John Smith
Street Address=1234 Some St
Phone=+649 555 1234
etc.
However, it is standard practise to omit the name from the name=value pair
for some of the contact info, for example a business card might read:
John Smith
1234 Whatchamacallit St
Auckland, New Zealand
Email: dksjafkh@fjkahgjmns
Phone: +649 555 1234
Semantically, how is this marked up?
"It is a list of contact details therefore it should be a ul":
<ul>
<li>John Smith</li>
<li>Email blahblah@blahblah</li>
<li>Ph +649 555 1234</li>
<li>Fax +649 555 5678</li>
<li>Mobile +649 555 3456</li>
</ul>
In this case the phone numbers/email address do not line up. They are much
easier to read if they line up. Don't like this.
"A definition list, as it is a list of items following the form of
something=something":
<dl>
<dt></dt><dd>John Smith</dd>
<dt>Email</dt><dd>blahblah@blahblah</dd>
<dt>Ph</dt><dd>+649 555 1234</dd>
<dt>Fax</dt><dd>+649 555 5678</dd>
<dt>Mobile</dt><dd>+629 555 3456</dd>
</dl>
Easier to read. If float: left is applied to dt then it becomes very
readable indeed. Would you say it is wrong to leave the dt blank? There is
an implied dt of "name" in this instance. Problem is that if the text in dt
is longer than the margin on the dd the data no longer lines up.
"A table; it is tabular data":
<table>
<tr>
<td>John Smith</td>
</tr>
<tr>
<th>Email</th><td>blahblah@blahblah</td>
</tr>
<tr>
<th>Ph</th><td>+649 555 1234</td>
</tr>
<tr>
<th>Fax</th><td>+649 555 1234</td>
</tr>
<tr>
<th>Mobile</th><td>+649 555 1234</td>
</tr>
</table>
Markup is unweildy but provides the most flexible solution
presentation-wise. The value components always line up with each other.
Problem is similar to that of using a dl, we may end up with a tr containing
a single td. However, like in the dl example above, tabular data is
implied; name=value with name omitted. Therefore, semantically sound?
So, ul, dl, or table? Don't like ul much, because of the readability issue.
Am I justified in saying that in the cases of dl and table, the name part of
a name=value pair can be implied? In that case is dl better suited, or
table? Table seems the more fluid of the two when it comes to presenting
the data in a form that would be the most familiar to most people.
Comments?
--
"Come to think of it, there are already a million monkeys on a million
typewriters, and the Usenet is NOTHING like Shakespeare!" - Blair Houghton
-=-=-=-=-=-=-=-=-=-=-=-
http://www.nrkn.com/
-=-=-=-=-=-=-=-=-=-=-=-
Name=John Smith
Street Address=1234 Some St
Phone=+649 555 1234
etc.
However, it is standard practise to omit the name from the name=value pair
for some of the contact info, for example a business card might read:
John Smith
1234 Whatchamacallit St
Auckland, New Zealand
Email: dksjafkh@fjkahgjmns
Phone: +649 555 1234
Semantically, how is this marked up?
"It is a list of contact details therefore it should be a ul":
<ul>
<li>John Smith</li>
<li>Email blahblah@blahblah</li>
<li>Ph +649 555 1234</li>
<li>Fax +649 555 5678</li>
<li>Mobile +649 555 3456</li>
</ul>
In this case the phone numbers/email address do not line up. They are much
easier to read if they line up. Don't like this.
"A definition list, as it is a list of items following the form of
something=something":
<dl>
<dt></dt><dd>John Smith</dd>
<dt>Email</dt><dd>blahblah@blahblah</dd>
<dt>Ph</dt><dd>+649 555 1234</dd>
<dt>Fax</dt><dd>+649 555 5678</dd>
<dt>Mobile</dt><dd>+629 555 3456</dd>
</dl>
Easier to read. If float: left is applied to dt then it becomes very
readable indeed. Would you say it is wrong to leave the dt blank? There is
an implied dt of "name" in this instance. Problem is that if the text in dt
is longer than the margin on the dd the data no longer lines up.
"A table; it is tabular data":
<table>
<tr>
<td>John Smith</td>
</tr>
<tr>
<th>Email</th><td>blahblah@blahblah</td>
</tr>
<tr>
<th>Ph</th><td>+649 555 1234</td>
</tr>
<tr>
<th>Fax</th><td>+649 555 1234</td>
</tr>
<tr>
<th>Mobile</th><td>+649 555 1234</td>
</tr>
</table>
Markup is unweildy but provides the most flexible solution
presentation-wise. The value components always line up with each other.
Problem is similar to that of using a dl, we may end up with a tr containing
a single td. However, like in the dl example above, tabular data is
implied; name=value with name omitted. Therefore, semantically sound?
So, ul, dl, or table? Don't like ul much, because of the readability issue.
Am I justified in saying that in the cases of dl and table, the name part of
a name=value pair can be implied? In that case is dl better suited, or
table? Table seems the more fluid of the two when it comes to presenting
the data in a form that would be the most familiar to most people.
Comments?
--
"Come to think of it, there are already a million monkeys on a million
typewriters, and the Usenet is NOTHING like Shakespeare!" - Blair Houghton
-=-=-=-=-=-=-=-=-=-=-=-
http://www.nrkn.com/
-=-=-=-=-=-=-=-=-=-=-=-