Get Cite Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Cite


The Cite object represents an HTML <cite> element.

You can access a <cite> element by using getElementById():

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<p><cite id="myCite">CSS</cite> this is a test</p>

<button onclick="myFunction()">set the color of the citation to red</button>

function myFunction() {//from www.java2s .  c o m
    var x = document.getElementById("myCite"); = "red";


Related Tutorials