WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Code Object


Code Object

The Code object speaks to a HTML <code> element.

Access a Code Object

You can get to a <code> component by utilizing getElementById():

var x = document.getElementById("myCode");

Create a Code Object

You can make a <code> component by utilizing the document.createElement() method:

var x = document.createElement("CODE");