How to create Definition Lists in HTML5?

HTMLJavascriptProgramming Scripts

Use the <dl> tag to add definition lists. The HTML <dl> tag is used for declaring a definition list. This tag is used within <dd> tag. A definition list is similar to other lists but in a definition list, each list item contains two entries; a term and a description.

Example

You can try to run the following code to create Definition Lists in HTML5 −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML dl Tag</title>
   </head>
   <body>
      <dl>
      <dt>Definition List</dt>
      <dd>A list of terms and their definitions/descriptions.</dd>
      <dt>C++</dt>
      <dd>C++ tutorial.</dd>
      <dt>Java</dt>
      <dd>Java tutorial.</dd>
      </dl>
   </body>
</html>
raja
Published on 13-Mar-2018 11:26:22
Advertisements