Javascript examples for DOM HTML Element:Blockquote
You can create a <blockquote> element by using the document.createElement() method:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">create a BLOCKQUOTE element</button> <script> function myFunction() {/*from w w w .j a va2 s . c om*/ var x = document.createElement("BLOCKQUOTE"); var t = document.createTextNode("text in quote"); x.setAttribute("cite", "http://www.java2s.com"); x.appendChild(t); document.body.appendChild(x); } </script> </body> </html>