francis
1st Jun 2004, 06:42 pm
Just seen this posted on a mailing list: a sitemap (http://www.greens.org.nz/sitemap.shtml) designed using nested definition lists (http://www.w3.org/TR/html401/struct/lists.html#edef-DL). Very nice and obviously degrades exceptionally well.
For more on definition lists, have a look at maxdesign's excellent resource (http://www.maxdesign.com.au/presentation/definition/).
James
1st Jun 2004, 07:19 pm
Francis can you explain two terms I don't understand.
What does "degrades well" mean?
Also, I note that this is not suitable for "block level elements" - what does that mean?
I like the Max Design site - free tutorials, but they're actually in business to sell web design and other media. Fits Tom's teaching - give something away and charge for something else. The free tutorials are an excellent way of driving traffic to the site.
francis
1st Jun 2004, 08:53 pm
The W3C's HTML 4.01 spec (http://www.w3.org/TR/html4/struct/global.html#h-7.5.3) describes what a block level element is. The easiest way to remember what a block level element is, is this:
Generally, block-level elements begin on new lines, inline elements do not
So, a block level element will always, by default, start a new line/block. Obvious examples of this are
, <table>, <ul>, [list=1] etc.
An inline element is something that doesn't start a new line - it is displayed "inline". There are loads of examples of these, obvious ones are [b], , [i], [b], <img> etc.
Inline elements can't contain block level elements, so this is wrong:
[i]
hello</p>
it would have to be:
hello</p>
as for as <dt> is concerned it can't contain block level elements, so if you did something like this: <dt>
This is my defining term</p></dt> your code wouldn't validate.
The more common list items can contain a load of different block level elements including
and even <table>
The dt tag (http://www.w3.org/TR/html401/struct/lists.html#edef-DT) acts like a block level element but for some reason it's declared as inline. It's probably in the DTD somewhere, but I've never been able to read those things.
Degrading generally means how the document renders in older, less capable browsers. As the site map was coded using CSS for presentation and the related stylesheet was put into the document via the @import rule (http://www.w3.org/TR/REC-CSS2/cascade.html#at-import) which Netscape 4.xx doesn't understand, and thus ignores, any NS4.xx users will just see a load of nested definition lists and not some hideous malformed mess. If you've got a toggle/turn off CSS favelet on your browser, see what the page looks like with no CSS - the site map is still understandable and usable.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.