Create a Cite Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Cite


You can create a <cite> element by using the document.createElement() method:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<button onclick="myFunction()">create a CITE element with some text</button>

function myFunction() {/*from  w  w w .  j a v a2  s  .  c om*/
    var x = document.createElement("CITE");
    var t = document.createTextNode("The Scream.");


Related Tutorials