I am stuck trying to bold a single word after i change the text content in HTML via JavaScript.
Here is my code:
document.getElementById('par3').textContent = "I <b>love</b> JS"; <!DOCTYPE html> <html> <head> <title>Homework05</title> </head> <body> <p id="par1">Unchanged Paragraph</p> <p id="par2">Unchanged Paragraph</p> <p id="par3">Unchanged Paragraph</p> <p id="par4">Unchanged Paragraph</p> <p id="par5">Unchanged Paragraph</p> <script src="script.js"></script> </body> </html> Somehow, the tags are not rendered. Is there any specific escape characters for this? Or this is more complex thing to accomplish?