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.

How to Create a Definition List

  1. Open the Austin-City-Limits.htm topic.
  2. Click at the end of the final paragraph, and press ENTER to create a new empty paragraph.

  3. Type Hall of Fame, apply the h2 style to it, and press ENTER.

  4. Type Stevie Ray Vaughn.
  5. 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.

  6. 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.

  7. 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.

  8. Type Willie Nelson and press ENTER.
  9. Type Inducted in 2014 and press ENTER twice.
  10. Type B.B. King and press ENTER.
  11. Type Inducted in 2016.

    The list should now look like this:

  12. Click Save the active file. to save your work.

How to Create a Snippet in a Definition List

  1. Select the two lines for Willie Nelson.

  2. From the Home ribbon select Create Snippet.
  3. In the Snippet File field, type Willie-Nelson, replacing the text in that field.

  4. 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.

  5. Click Save the active file. to save your work.

Ta-Da!

Congratulations! You've reached the end of this tutorial. Be sure to check out others. See Tutorials.