TLDR; I need a component that show text that changes frequently but the text should not be part of the HTML-Dom.
If I use a span-element like this
<span>09:45:36</span>
The Text
is part of the HTML-Code. I need a component that represent text but is not part of the HTML-Code.
I could use a <input >
, style it like a span-element and change the .value
using javascript.
<input id="a">
<script>
window.setInterval(function(){
document.getElementById('a').value = new Date();
}, 1000);
</script>
The .value
will not be represented in the HTML-Dom. Unfortunately the boundary-size of the input is fixed and does not correlate to the text-size of the field.
Question
What html-tag could I use that shows text without having the text be part of the HTML and size with text?
1