ボタンを押して下さい

------------------------------Code-------------------------------
<body>
<p id="p1">ボタンを押して下さい</p>
<input type="button" value="textContent" onclick="clickBtn1()">
<input type="button" value="innerhtml " onclick="clickBtn2()">

<script> - - - - - - - - - -
function clickBtn1(){
    const p1 = document.getElementById("p1");

    p1.textContent = "<b>ボタンを押しました</b>";
}
function clickBtn2(){
    const p1 = document.getElementById("p1");

   p1.innerHTML = "<b>ボタンを押しました</b>";
}
</script> - - - - - - - - - -
 
</body>
------------------------------------------------------------------

#参照して# JavascriptのtextContentとinnerhtmlの違い