Javascript examples for DOM HTML Element:Mark
The Mark object represents an HTML <mark> element.
You can access a <mark> element by using getElementById():
<!DOCTYPE html> <html> <body> <mark id="myMark">this marked text</mark> <button onclick="myFunction()">set the font size</button> <script> function myFunction() {// w ww . j a v a 2 s . com var x = document.getElementById("myMark"); x.style.fontSize = "x-large"; } </script> </body> </html>