HTML DOM Code Object
Code object
The Code object represents the HTML <code> element.
Access Code object
You can use getElementById() to access the <code> element:
var x = document.getElementById("myCode");
Create Code object
You can use the document.createElement() method to create a <code> element:
var x = document.createElement("CODE");
Standard Properties and Events
Code Object Supports StandardsPropertiesAndEvents.