Open In App

How to define a term or name in a definition list using HTML5 ?

HTML5 provides a way to specify a term and definition associated with it in a formatted way. A description list (or a definition list in older versions) provides a systematic arrangement of a term and its definition.

The following tags are used for defining a definition list:



The below example illustrates the creation of definition lists.

Example: This example creates a definition list with 2 terms, Machine Learning and Artificial Intelligence with their respective definitions.






<html>
<body>
  <h1>Sample List</h1>
  <dl>
    <dt>
      <dfn>
        Machine Learning
      </dfn>
    </dt>
    <dd>Development of a system
      that is able to learn and adapt
      without it given any specific
      instructions.
    </dd>
    <dt>
      <dfn>
        Artificial Intelligence
      </dfn>
    </dt>
    <dd>Artificial intelligence refers
      to the simulation of intelligence
      that resembles human logic in machines.
    </dd>
    <dd>AI is the future of machines that 
      need to perform human tasks.
    </dd>
  </dl>
</body>
</html>

Output:

Article Tags :