Javascript examples for DOM HTML Element:Small
The Small object represents an HTML <small> element.
You can access a <small> element by using getElementById():
<!DOCTYPE html> <html> <body> <small id="mySmall">this small text</small> <button onclick="myFunction()">set the color</button> <script> function myFunction() {//from w w w. jav a2 s . com var x = document.getElementById("mySmall"); x.style.color= "red"; } </script> </body> </html>