Opening Tag | Content | Closing Tag | ||
---|---|---|---|---|
Open | Parameter | Close | ||
<dl | compact | > | definition list | </dl> |
Opening Tag | Content | Closing Tag |
---|---|---|
<dt> | defined term | </dt> |
Opening Tag | Content | Closing Tag |
---|---|---|
<dd> | definition | </dd> |
If the compact flag is used, the <dt> text and the <dd> text will both start on the same line if the <dt> text is short enough to fit into the alloted margin.
Here is a definition list:This markup:
- Etymology
- The study of word origins.
- Entomology
- The study of insects.
Here is another definition list:Note in the above example that the linebreak in the chemical formula for sucrose was effectively ignored by the browser because it was contained within a comment. Had the comment tag <!-- ... --> not been there, the line break in the source document would have been translated into a space in the browser-rendered document. Of course, the same effect could have been achieved by putting the entire content of the <dt> tag on one line, but that tends to make the source document less readable, if that is important to you. The comment allows the source document to remain easily readable, while avoiding extraneous spaces in the browser-rendered page.
- H2O
- Water: a colorless, odorless, liquid oxide of hydrogen.
- C12H22O11
- Sucrose: A crystalline disaccharide sugar.