HTML Element: <dd>
[this page | pdf | back links]
The HTML <dd> element indicates a
description or value of an entry in a description list, i.e. a <dl> element,
typically with each <dd> element
linked to an associated <dt>
element, that defines the term which the <dd>
element describes, e.g.:
<dl>
<dt>UK</dt><dd>United Kingdom</dd>
<dt>USA</dt><dd>United States of
America</dd>
</dl>
Text, paragraphs, images
etc. can be placed inside <dd>
and <dt> elements.
The attributes
it can take are HTML
global attributes and HTML event attributes.
To create or access such
an element in JavaScript
see here. The
corresponding HTML DOM
object supports standard
DOM properties and methods. The default style applicable to this element is
shown here.
EXAMPLE:
HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Created using HTML:<br>
<dl>
<dt>US</dt><dd>United States</dd>
</dl>
<br><br>Created using JavaScript:<br>
<span id="element2"></span>
<script>
var a = document.createElement("DL");
var x = document.createElement("DT");
var y = document.createElement("DD");
var xtxt = document.createTextNode("US");
var ytxt = document.createTextNode("United States");
x.appendChild(xtxt);
y.appendChild(ytxt);
a.appendChild(x);
a.appendChild(y);
document.getElementById("element2").appendChild(a);
</script>
</body>
</html>
|
NAVIGATION LINKS
Contents | Prev | Next | HTML Elements