What Is the "<dt>" HTML Tag in a Definition List?

In HTML, the abbreviation "dt" stands for "Definition Term". The "<dt>" tag is used to define a term (or a name) in a definition list (<dl>). The term is placed within the "<dt>" tag, and is usually followed by a definition of that term, which is placed within a "<dd>" tag.

For example:

<dl>
  <dt>HTML</dt>
  <dd>HyperText Markup Language is the standard markup language used for creating web pages and web applications.</dd>
  <dt>CSS</dt>
  <dd>Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in HTML or XML.</dd>
</dl>

This will produce an output like the following:

HTML
  HyperText Markup Language is the standard markup language used for creating web pages and web applications.
CSS
  Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in HTML or XML.

In the example above, the definition list (<dl>) contains two terms (HTML and CSS) and their corresponding definitions. As you can see, the "<dt>" tag is used to define each of these terms.


This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.