I am trying to use JavaScript to change the text of this element. However it is not working. Here is the header im trying to change - enter image description here
var elem = document.getElementsByClassName("headertext");
elem.innerHTML = "hello world";
<ul class="headertable">
<li>
<p class="headertext">Home</p>
</li>
<li>
<p class="headertext">About US</p>
</li>
<li>
<p class="headertext">Contact US</p>
</li>
</ul>