THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Mark Object


Mark Object

The Mark Object is new in HTML5.

The Mark object represents an HTML <mark> element.

Note: The <mark> element is not supported in Internet Explorer 8 and earlier versions.

Access a Mark Object

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

var x = document.getElementById("myMark"); Try it

Create a Mark Object

You can create a <mark> element by using the document.createElement() method:

var x = document.createElement("MARK"); Try it

Standard Properties and Events

The Mark object supports the standard properties and events.


Related Pages

HTML tutorial: HTML Text Formatting Elements

HTML reference: HTML <mark> tag