How to change size on an onclick without changing original paragraph

So I have a visible text-paragraph that gets changed onclick. It then changes the innerHTML of this paragraph into “Shark meat”. But how can I also make that text (shark meat) turn bigger in fontsize?

Code is like this:

  function myFunc3(){
      alert("You can either contact me or hire me through the links in this website below");
      document.getElementsByClassName("Sabretooth")[0].innerHTML= "Shark meat";
document.getElementsByClassName("button2")[0].style.display = "none";
      document.getElementsByClassName("button3")[0].style.display = "block";


I don’t want to change the original paragraph text. Only shark meat. So all in all I want to make the innerHTML-text “shark meat” turn bigger.

You should be able to use .style, similarly to how you set the display style property.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.