HTML5 Defination List dl,dt,dd tags and elements
In this article I am going to describe about the use of dl,dt and dd tags in HTML5.
Basically a definition list is composed of three HTML elements and some text. These are the <dl>, <dt> and <dd> elements.
<dl> tag is used to define a list. A definition list is the container element for DT and DD elements. The DL element should be used when you want incorporate a definition of a term in your document, it is often used in glossaries to define many terms, it is also used in "normal" documents when the author wishes to explain a term in a more detail.
<dt> tag is used to define the item in the list. The term currently being defined in the definition list. This element contains inline data. You can also use a <dt> tag within <details> and <figure> tags to represent a caption for content.
The definition description element contains data that describes a definition term. This data may be either inline, or it may be block level. You can put paragraphs, line breaks, images, links, lists, etc. inside the <dd> tag. This tag is used to describe an item in a defination list.
Note : For dl element both start and end tag are required. But for <dt> and <dd> end tag is optional.
It is supported in all major browsers.
|| Can contain
|| One or more DT and DD elements.
|| Inline Elements
|| Inline as well as block-level elements.
Can reside within
|| Can reside within
||APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH.
Example of DL,DD,DT Tags in HTML5
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<meta charset="utf-8" />
<title><Dd> Tag in HTML5</title>
<h1>Implementation of Dd tag in HTML5</h1>
<dt>Cricket Team Players</dt>