<!-- javascript --> const middle = document.getElementById("middle"); const middle1 = document.getElementById("middle1"); animate(middle); animate(middle1); function animate(element) { let elementWidth = element.offsetWidth; let parentWidth = element.parentElement.offsetWidth; let flag = 0; setInterval(() => { element.style.marginLeft = --flag + "px"; if (elementWidth == -flag) { flag = parentWidth; } }, 10); } <!-- this is html itself --> <div id="main"> <p class="middle" id="middle"> Welcome to my Spectacular Show! </p> <p class="middle" id="middle1"> Time for the show is 6:59PM EST on May 28,2022 </p> </div>Este es js que tengo para crear una marca en mi HTML (tengo asignación), ¡necesito descubrir la forma de resaltar la hora y la fecha solamente! Por favor ayuda:)
Puedes agregarlos dentro de una etiqueta fuerte
<div id="main"> <p class="middle" id="middle">Welcome to my Spectacular Show!</p> <p class="middle" id="middle1"> Time for the show is <strong>6:59PM EST </strong> on <strong> May 28,2022</strong> </p> </div>