Quantcast
Viewing all articles
Browse latest Browse all 66

HTML dl tag

Description:

The HTML dl tag inserts a definitions list, composed by two elements: terms (HTML dt element) and descriptions (HTML dd element). In definition lists, terms can be associated to one or more descriptions and viceversa. The way terms and descriptions are associated is arbitrary and left to the author's consideration.

Differences Between HTML 4.01 and HTML5:

In HTML 4.01, the <dl> tag defines a definition list.

In HTML 5, the <dl> tag defines a description list.

Difference between HTML and XHTML:

NONE

Example:

Code View
<dl>
<dt>Definition List</dt>
<dd>A list of terms and their definitions/descriptions.</dd>
<dt>HTML</dt>
<dd>An HTML tutorial.</dd>
<dt>PHP</dt>
<dd>An PHP tutorial.</dd>
</dl>
Definition List
A list of terms and their definitions/descriptions.
HTML
An HTML tutorial.
PHP
An PHP tutorial.

Second Example:

Code View

<dl>
<dt>HTML 2.0</dt>
<dt>HTML 3.2</dt>
<dt>HTML 4.01</dt>
<dd>Hyper Text Markup Language based on SGML and not compatible with XML. This language is used to construct web pages.</dd>
<dt>XHTML 1.0</dt>
<dd>Extensible Hyper Text Markup Language based on XML, a subset of SGML. This language is used to construct web pages.</dd>
<dd>Language created to reduce the presentational orientation of its predecessors.</dd>
<dt>XHTML 1.1</dt>
<dd>Extensible Hyper Text Markup Language based on XML, a subset of SGML. This language is used to construct web pages and isn't backward compatible with HTML due to the lack of the "lang" attribute.</dd>
</dl>

HTML 2.0
HTML 3.2
HTML 4.01
Hyper Text Markup Language based on SGML and not compatible with XML. This language is used to construct web pages.
XHTML 1.0
Extensible Hyper Text Markup Language based on XML, a subset of SGML. This language is used to construct web pages.
Language created to reduce the presentational orientation of its predecessors.
XHTML 1.1
Extensible Hyper Text Markup Language based on XML, a subset of SGML. This language is used to construct web pages and isn't backward compatible with HTML due to the lack of the "lang" attribute.

Standard Attributes:

Attribute Description
class Document wide identifier
dir Specifies the direction of the text
id Document wide identifier
title Specifies a title to associate with the element.
style Helps to include inline casecadubf style sheet.
lang Sets the language code.

Event Attributes:

Attribute Description
onclick Script runs when a mouse click
ondblclick Script runs when a mouse double-click
onmousedown Script runs when mouse button is pressed
onmouseup Script runs when mouse button is released
onmouseover Script runs when mouse pointer moves over an element
onmousemove Script runs when mouse pointer moves
onmouseout Script runs when mouse pointer moves out of an element
onkeypress Script runs when key is pressed and released
onkeydown Script runs when key is pressed
onkeyup Script runs when key is released

The post HTML dl tag appeared first on .


Viewing all articles
Browse latest Browse all 66

Trending Articles