1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
billsblogpage

Wednesday, October 21, 2009

semantic html: the definition list tags

Wednesday, October 21, 2009
most web developers understand and use the <ol>/<li> and <ul>/<li> tag pairs when creating lists, however when the list is comprised of a pair of related items (such as a term and a description), there is an alternative tag group: <dl>, <dt> and <dd>. the term is placed within <dt> tags, and the definition is placed within <dd> tags. these are wrapped within <dl> tags.

example code:

<dl>
<dt>Kanji</dt>
<dd>A japanese system of writing ...
<dt>Katakana</dt>
<dd>One of the two systems of syllabic ...
...
</dl>

example output:

Japanese Writing Systems[1]

Kanji
Based on borrowed or modified Chinese characters.
Katakana
One of the two systems of syllabic writing employed for the representation of Japanese, based on Chinese ideograms. It is used mainly for foreign or foreign-derived words
Hiragana
The cursive and flowing variety of kana used in most modern Japanese texts, especially to represent inflectional endings and particles.

please note that the 'compact' attribute of the <dl> tag is now deprecated

[1]Collins English Dictionary - Complete and Unabridged 6th Edition 2003. ccc William Collins Sons & Co. Ltd 1979, 1986 ccc HarperCollins Publishers 1991, 1994, 1998, 2000, 2003

Wednesday, October 7, 2009

lazy days

Wednesday, October 7, 2009