Get Small Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Small


The Small object represents an HTML <small> element.

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<small id="mySmall">this small text</small>

<button onclick="myFunction()">set the color</button>

function myFunction() {//from  w w  w.  jav a2  s . com
    var x = document.getElementById("mySmall"); "red";


Related Tutorials