473,804 Members | 3,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Another DL usage

I want to express a list of items every of each has number of
properties and I want to get opinions if I would do it properly
using DL. Here's an example:

<DL>
<DT>date 1</DT>
<DD>name 1</DD>
<DD>descripti on 1<DD>

<DT>date 2</DT>
<DD>name 2</DD>
<DD>descripti on 2<DD>
....
</DL>

The point is that I want make stronger emphasis on the first key
property (it is a key property to the given context) using it as a
heading to the section with the following related properties. Does
it make sense/is it suitable to mark it up this way?

--
Stanimir
Jul 20 '05 #1
7 1630
Stanimir Stamenkov <s7****@netscap e.net> wrote:
I want to express a list of items every of each has number of
properties and I want to get opinions if I would do it properly
using DL. Here's an example:

<DL>
<DT>date 1</DT>
<DD>name 1</DD>
<DD>descriptio n 1<DD>

<DT>date 2</DT>
<DD>name 2</DD>
<DD>descriptio n 2<DD>
...
</DL>

The point is that I want make stronger emphasis on the first key
property (it is a key property to the given context) using it as a
heading to the section with the following related properties. Does
it make sense/is it suitable to mark it up this way?


It's not a list of definitions so it is a misuse of the dl construct.
It's no worse a misuse than all the other misuses, including those in
the HTML spec.

The above actually looks like a table to me.

<table>
<tr><th>date</th><th>name</th><th>descript ion</th></tr>
<tr><th>date 1</th><td>name 1</td><td>descript ion 1</td></tr>
<tr><th>date 2</th><td>name 2</td><td>descript ion 2</td></tr>
</table>

As a list the preferred markup would probably be:

<ul>
<li>
<hx>date 1</hx>
<ul>
<li>name 1</li>
<li>descripti on 1</li>
</ul>
</li>
<li>
<hx>date 2</hx>
<ul>
<li>name 2</li>
<li>descripti on 2</li>
</ul>
</li>
</ul>

Adjust the value of x and add CSS to suit.

cheers,
Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #2
Steve Pugh wrote:
It's not a list of definitions so it is a misuse of the dl construct.
It's no worse a misuse than all the other misuses, including those in
the HTML spec.
Please, expand further on that. What is so much worse in my intended
use? It is just list of definition (properties). One could argue
about my use of the DT element but I don't see nothing wrong in the
following construct:

<dl>
<dd class="key">dat e 1</dd>
<dd>name 1</dd>
<dd>descripti on 1</dd>
</dl>
<dl>
<dd class="key">dat e 2</dd>
<dd>name 2</dd>
<dd>descripti on 2</dd>
</dl>
The above actually looks like a table to me.

<table>
<tr><th>date</th><th>name</th><th>descript ion</th></tr>
<tr><th>date 1</th><td>name 1</td><td>descript ion 1</td></tr>
<tr><th>date 2</th><td>name 2</td><td>descript ion 2</td></tr>
</table>
Eh, there are many things which could be expressed as table but no,
it is definitely not a table. It is more like the next one you
propose (this one I've thought of already):
As a list the preferred markup would probably be:

<ul>
<li>
<hx>date 1</hx>
<ul>
<li>name 1</li>
<li>descripti on 1</li>
</ul>
</li>
<li>
<hx>date 2</hx>
<ul>
<li>name 2</li>
<li>descripti on 2</li>
</ul>
</li>
</ul>


But then I don't want to use Hx(eading) elements. It is because I
have such structure:

<h1>
...
<h2>
...
<the-list>
...
<h2>
...
<h3>
...

H3 marks up much more general sections than the key elements in the
list (the list is equal weight to a block just as paragraph) and I
somewhat don't like to skip numbered heading element, pretty much
like it is in the ISO HTML. I could use:

<ul>
<li class="key">dat e 1</li>
<li>name 1</li>
<li>descripti on 1</li>
</ul>
<ul>
<li class="key">dat e 2</li>
<li>name 2</li>
<li>descripti on 2</li>
</ul>

But then it is almost (not to say exactly) identical to the example
in my first comment.

--
Stanimir
Jul 20 '05 #3
Stanimir Stamenkov <s7****@netscap e.net> wrote:
Steve Pugh wrote:
It's not a list of definitions so it is a misuse of the dl construct.
It's no worse a misuse than all the other misuses, including those in
the HTML spec.
Please, expand further on that. What is so much worse in my intended
use?


Nothing, that is why I said that it was _not_ any worse than the otehr
misuses (such as the play dialogue example used in the spec).
It is just list of definition (properties).
Does a name and a description define the date? I don't think so.
One could argue
about my use of the DT element but I don't see nothing wrong in the
following construct:

<dl>
<dd class="key">dat e 1</dd>
<dd>name 1</dd>
<dd>descriptio n 1</dd>
</dl>
Now you have "defintions " that aren't defining anything. Might as well
use <div>s with appropriate CSS.
The above actually looks like a table to me.

<table>
<tr><th>date</th><th>name</th><th>descript ion</th></tr>
<tr><th>date 1</th><td>name 1</td><td>descript ion 1</td></tr>
<tr><th>date 2</th><td>name 2</td><td>descript ion 2</td></tr>
</table>


Eh, there are many things which could be expressed as table but no,
it is definitely not a table.


Why not? If the same data exists for each date, and your example
implied that it did, then it's perfectly suitable to be a table.
It is more like the next one you
propose (this one I've thought of already):
As a list the preferred markup would probably be:

<ul>
<li>
<hx>date 1</hx>
<ul>
<li>name 1</li>
<li>descripti on 1</li>
</ul>
</li>
<li>
<hx>date 2</hx>
<ul>
<li>name 2</li>
<li>descripti on 2</li>
</ul>
</li>
</ul>
But then I don't want to use Hx(eading) elements. It is because I
have such structure:

<h1>
...
<h2>
...
<the-list>
...
<h2>
...
<h3>
...

H3 marks up much more general sections than the key elements in the
list (the list is equal weight to a block just as paragraph)


There is no rule about what H3 does or does not mark up other than
that its contents are a level 3 heading. The importance of any given
level of heading in HTML is entirely relative to its place in the
document, nothing else.

I frequently use H3s to mark up headings of individual paragraphs,
lists or tables. Then on the next page which may have more content
with greater number of sub-sections I might use H4s for the same
purpose.

If the next level of heading down is an H3 then it's the appropriate
heading to use. Use CSS to make it appear less important if that
matters to you.
and I
somewhat don't like to skip numbered heading element, pretty much
like it is in the ISO HTML. I could use:

<ul>
<li class="key">dat e 1</li>
<li>name 1</li>
<li>descriptio n 1</li>
</ul>
<ul>
<li class="key">dat e 2</li>
<li>name 2</li>
<li>descriptio n 2</li>
</ul>

But then it is almost (not to say exactly) identical to the example
in my first comment.


You can still use nested list as per my example, which does keep the
structure that each date is itself a part of a list of dates, and that
each name and description are deeper information than the date.

Just remove the <hx> from my example and use CSS appropriately:
li {font-weight: bold;}
li li {font weight: normal;}
plus indents and bullets to suit.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #4
Steve Pugh wrote:
Stanimir Stamenkov <s7****@netscap e.net> wrote:
It is just list of definition (properties).
Does a name and a description define the date? I don't think so.
One could argue
about my use of the DT element but I don't see nothing wrong in the
following construct:

<dl>
<dd class="key">dat e 1</dd>
<dd>name 1</dd>
<dd>descripti on 1</dd>
</dl>


Now you have "defintions " that aren't defining anything.


I don't define "anything" explicitly just because I don't have a
title (doing just this: entitling) for the items I define, but then
I define them. I do however have a key property which I think could
be set to entitle the items:

<p>
Here's a list of dated items:</p>
<dl>
<dt>date 1</dt>
<dd>... <dd>...
<dt>date 2</dt>
<dd>... <dd>...
</dl>
Might as well
use <div>s with appropriate CSS.


DIVs do clear from duty all the semantics (and typical formatting)
other elements carry, so I would use them as last resort.
Eh, there are many things which could be expressed as table but no,
it is definitely not a table.


Why not? If the same data exists for each date, and your example
implied that it did, then it's perfectly suitable to be a table.


Because tables aren't fully implemented in browsers like Lynx and I
do want to keep simplest formating as possible while keeping
elements distinguishable . Because I have "descriptio n" property
which would take more space - a paragraph, and I don't want to put
all the properties in a (table) row (considerably narrowing the
available width for the paragraph). If I could use some advanced
(not yet implemented) CSS3 I can easily format the DL as visual table.
H3 marks up much more general sections than the key elements in the
list (the list is equal weight to a block just as paragraph)


There is no rule about what H3 does or does not mark up other than
that its contents are a level 3 heading. The importance of any given
level of heading in HTML is entirely relative to its place in the
document, nothing else.


I think the same goes for DL, DT, DD. It is much like:

<div class="chapter" >
<hx>...
<p>...
<p>...
</div>
I could use:

<ul>
<li class="key">dat e 1</li>
<li>name 1</li>
<li>descripti on 1</li>
</ul>
<ul>
<li class="key">dat e 2</li>
<li>name 2</li>
<li>descripti on 2</li>
</ul>

But then it is almost (not to say exactly) identical to the example
in my first comment.


You can still use nested list as per my example, which does keep the
structure that each date is itself a part of a list of dates, and that
each name and description are deeper information than the date.


The properties are equal - "key" is somewhat temporary feature of
the particular property and I don't think I want to use such nested
lists. I just want to emphasize on the "key" property, how one
emphasize: using EM or STRONG to mark a whole still small part of
content, or Hx(eading) and DT (in DL) to mark the beginning of a
larger content part.

Whatever, I'll think more of the "list example" you've proposed.

--
Stanimir
Jul 20 '05 #5
Stanimir Stamenkov <s7****@netscap e.net> wrote:
Steve Pugh wrote:
Stanimir Stamenkov <s7****@netscap e.net> wrote:
It is just list of definition (properties).
Does a name and a description define the date? I don't think so.
One could argue
about my use of the DT element but I don't see nothing wrong in the
following construct:

<dl>
<dd class="key">dat e 1</dd>
<dd>name 1</dd>
<dd>descripti on 1</dd>
</dl>


Now you have "defintions " that aren't defining anything.


I don't define "anything" explicitly just because I don't have a
title (doing just this: entitling) for the items I define, but then
I define them.


What are you defining in the above situation?
I do however have a key property which I think could
be set to entitle the items:

<p>
Here's a list of dated items:</p>
<dl>
<dt>date 1</dt>
<dd>... <dd>...
<dt>date 2</dt>
<dd>... <dd>...
</dl>


means the following:
Here is a list of definitions
The first term to be defined is 'date 1'
The first definition of 'date 1' is 'name 1'
The second definition of 'date 1' is 'description 1'
The second term to be defined is 'date 2'
The first definition of 'date 2' is 'name 2'
The second definition of 'date 2' is 'description 2'

Are the name and description actual definitions of the date? Could you
rewrite a sentence by replacing 'date 1' with the 'name 1' _or_
'description 1' and keep the same meaning?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #6
Stanimir Stamenkov <s7****@netscap e.net> wrote:
I don't define "anything" explicitly just because I don't have a
title (doing just this: entitling) for the items I define, but then
I define them.


I would simplify that by saying that you don't define any terms, hence
you should not use <dl>.

What you should use depends on the structure of the real data. I think
we need a real example, instead of just a collection of "date", "name",
and "descriptio n". And I don't see why they wouldn't constitute a
table.

For example, if names identify events, the dates tell when they
happened, and the descriptions tell what really happened, then it is
surely tabular data. It would make perfect sense to consider it
columnwise too (e.g., list all dates, or sort the table by name)
and to access it by row and column. Of course, other markup might be
suitable too. In this hypothetical case, I would make the name a
heading and the description just text (paragraphs[s]) under it, and the
date might be just in <div> preceding the heading, or following it, or
floated on the left of it.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #7
Jukka K. Korpela wrote:
Stanimir Stamenkov <s7****@netscap e.net> wrote:
I don't define "anything" explicitly just because I don't have a
title (doing just this: entitling) for the items I define, but then
I define them.


I would simplify that by saying that you don't define any terms, hence
you should not use <dl>.


Thank you, both: Jukka and Steve, for the answers.

Generally, I think you are right. It is just I need more time to
convince myself I think wrong. :-)

--
Stanimir
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2028
by: se7en | last post by:
okay, i cant seem to run a file with another file as an argument. e.g I want to send the file "x.met" as an argument when running the file "y.py" thanx -python newbie-
2
460
by: tomvr | last post by:
Hello I have noticed some 'weird' memory usage in a vb.net windows app The situation is as follows I have an app (heavy on images) with 2 forms (actually there are more forms and on starting the app I load some things into memory for global use of the app but I'll use only 2 starting forms to explain the situation) situation 1 start app with form 1 (72mb memory usage), show form 2 and hide form 1 (89 mb memory usage
188
7264
by: christopher diggins | last post by:
I have posted a C# critique at http://www.heron-language.com/c-sharp-critique.html. To summarize I bring up the following issues : - unsafe code - attributes - garbage collection - non-deterministic destructors - Objects can't exist on the stack - Type / Reference Types
26
21342
by: Paul | last post by:
public class A { public A () { // here I would like to call the second version of _ctor, how to accomplish this ? } public A (int a, int b, int c) {
1
3400
by: John Sheppard | last post by:
Thanks to everyone that responded to my previous Socket Programming question. Now I have run into some behavior that I don't quite understand. Programming environment. VS.NET 2003, C#, Windows XP. About the architecture: I have a socket server dll that contains a class that handles connections for a given local ipaddress and port. This class(server) can be started or stopped by calls to the appropriate functions. The server class has...
8
2217
by: GeekBoy | last post by:
I understand the benefit of pushing the StateServer process onto another computer to "balance" the load and take some cpu and memory usage off the web server, but how much could it possibly help? Especially when you're talking about marshalling the data back and forth across your network (although on the same segment)? Here's my scenario: Each login stores exactly 3 session variables; one integer and two strings. That's it. Never, ever,...
2
1628
by: Fish | last post by:
I have been researching the correct way to organize my solution so that it makes best use of VB.NET inherent ability to manage resources such as objects. My solution contains 2 projects and the main problem is that the mem usage continues to grow until the Service stops responding. I have received advice to: "create those objects at a class level; instantiate them when the service starts, and dispose of them when the service ends. Then...
13
11159
by: George | last post by:
Hi, I am re-writing part of my application using C#. This application starts another process which execute a "legacy" program. This legacy program writes to a log file and before it ends, it writes a specific string to the log file. My original program (MKS Toolkit shell program) which keeps running "grep" checking the "exit string" on the "log files". There are no file sharing problem.
13
2047
by: aum | last post by:
Hi, I'm a Python programmer, just starting to get into javascript. On reading some of the js guides, and not liking any of the OO usage patterns I saw, I've cooked up something which python folks might find to taste. Here's the code - first the 'engine', then some code demonstrating the usage patterns. For me (and maybe for some of you), it promotes readability and some
1
1065
by: tc | last post by:
Hi, does anyone how how I might check on the memory usage of a running application? I want to do this externally to the 'actual' application that I've written, so a small stand alone app that can keep a check on another? Basically the application in question hangs after a week or so of continual use and I need to prove if it my application hogging memory or something else. Any ideas?
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.