Get Mark Element - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Mark


The Mark object represents an HTML <mark> element.

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<mark id="myMark">this marked text</mark>

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

function myFunction() {// w  ww  . j  a  v a  2  s  . com
    var x = document.getElementById("myMark"); = "x-large";


Related Tutorials