Creating a Definition List
A definition list is used to create a group of terms and definitions. It is also sometimes referred to as a description list, and although it is called a "list," it does not have bullets or numbers. Instead, it is similar to a table that doesn't have borders (although it can have borders, shading, etc. if you edit the necessary styles).
One of the benefits of creating a definition list instead of using a table has to do with snippets. While creating snippets for parts of a table can be quite difficult, if not impossible, producing snippets from parts of a definition list is easy.
Let's create a definition list and also create a snippet from part of it.
[Menu Proxy — Headings — Online — Depth3 ]
How to Create a Definition List
- Open the Austin-City-Limits.htm topic.
-
Click at the end of the final paragraph, and press ENTER to create a new empty paragraph.
-
Type Hall of Fame, apply the h2 style to it, and press ENTER.
- Type Stevie Ray Vaughn.
-
From the Home ribbon, click the down arrow on the List button
and select Definition List.
The text is indented and placed in a <dt> tag, which in turn is placed inside a <dl> tag. The <dl> tag is for the entire definition list. The <dt> tag is for the definition term.
-
Press ENTER, and on the next line type Inducted in 2014.
Notice that text is placed within a <dd> tag, which is for the definition of the term above it. The text is also indented even more because of the left margin currently associated with that style.
-
Press ENTER. Another <dd> tag is added, in case you want to add a second line for the definition.
But let's move on to another term. So press ENTER one more time. Now the empty line is inside a <dt> tag.
- Type Willie Nelson and press ENTER.
- Type Inducted in 2014 and press ENTER twice.
- Type B.B. King and press ENTER.
-
Type Inducted in 2016.
The list should now look like this:
- Click
to save your work.
How to Create a Snippet in a Definition List
-
Select the two lines for Willie Nelson.
- From the Home ribbon select Create Snippet.
-
In the Snippet File field, type Willie-Nelson, replacing the text in that field.
-
Click Create.
The content is now contained in a snippet tag.
However, if you were to open that snippet, you would see that the two lines are still placed within <dt> and <dd> tags. Therefore, you can insert that snippet within any definition list and it will function just like the other terms and definitions in the list.
- Click
to save your work.
Ta-Da!
Congratulations! You've reached the end of this tutorial. Be sure to check out others. See Tutorials.