The working form of the link is as: image #1 If I understand this correctly, it is defined in the js file here: var objNumberDisplay = document.createElement("span"); objNumberDisplay.setAttribute('id','numberDisplay'); objImageDetails.appendChild(objNumberDisplay); Which becomes: I'm trying to have the output something as: