We can create a <dd> element via the document.createElement()
method:
var x = document.createElement("DD");
Click the button to create a DD element with some text.
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button><br><br> <dl id="myDL"> <dt>CSS</dt> </dl>//from w w w . j a v a 2 s .c om <script> function myFunction() { var x = document.createElement("DD"); var t = document.createTextNode("Cascading Style Sheets"); x.appendChild(t); var y = document.getElementById("myDL"); y.appendChild(x); } </script> </body> </html>