HTML Definition Lists
17th June 2003
Ben Meadowcroft has a new tutorial up showing how definition lists can be used in semantic markup for lists of definitions, such as glossaries.
Definition Lists are the third type of list present in HTML, after the far more common ordered and unordered list types. They’re an interesting if slightly odd concept: although their obvious use is to provide a list of definitions, the HTML specification seems to indicate that they can also be used to indicate a logical connection between two items of text; one a label for the other. This slight confusion is caused by the examples provided in the specification, which use a definition list both for separating the different sections of a recipe and for extending a set of key marketing features for an imaginary product.
Incidentally, although the default style for a definition list is to have the definitions indented to the right of the terms, this can be easily modified by setting the margin and padding for the elements explicitly using CSS.
More recent articles
- The killer app of Gemini Pro 1.5 is video - 21st February 2024
- Weeknotes: a Datasette release, an LLM release and a bunch of new plugins - 9th February 2024
- LLM 0.13: The annotated release notes - 26th January 2024
- Weeknotes: datasette-test, datasette-build, PSF board retreat - 21st January 2024
- Talking about Open Source LLMs on Oxide and Friends - 17th January 2024
- Publish Python packages to PyPI with a python-lib cookiecutter template and GitHub Actions - 16th January 2024
- What I should have said about the term Artificial Intelligence - 9th January 2024
- Weeknotes: Page caching and custom templates for Datasette Cloud - 7th January 2024
- It's OK to call it Artificial Intelligence - 7th January 2024