...

View Full Version : Semantics(?)



Badman3k
08-07-2011, 01:04 AM
I've got a question about semantics and how best to code data the best and most appropriate way.

For all intense and purposes I want to display a tree diagram. Now with all tree diagrams there are parents and children. However in my case I have some branches that can merge with other paths - similar to how you would represent a versioning tree with branches and merges.

What I'm struggling with is the HTML element to use for each node. Should it be a div? Seems a very unstructured method of doing things. What about an unordered list? It would infer some form of path, but doesn't really support the merging of branches.

Basically I'm open to ideas and suggestions about how best to code things up. I'm not worried too much about the connection elements, just the node code. I want to be able to have a simple way to infer/describe the relationships between two nodes, I.e. It's predecessor and it's children.

If I've not been clear or it sounds like I'm making no sense, please feel free to ask for some clarification; I'll be more than happy to provide it :)

Many thanks in advance,
Richard

bazz
08-07-2011, 01:32 AM
on what you have described I would think firstly of a defintion list.

<dl>
<dt></dt>
<dd></dd>
<dd></dd>
</dl>

hth

bazz



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum