Club News: textContent vs innerHTML
HTML / CSS
20 pts
Club News: textContent vs innerHTML
Fill the Keren FC news page using the right tool for each job:
#result: useinnerHTMLso that Keren FC is bold (inside<strong>), followed bywon 3–2!#goals: show the total number of goals, calculated as3 + 2(do not type 5).#raw: show the textUse <em> for emphasisso that the visitor sees the characters<em>— usetextContent, so no real<em>element is created.
Checklist
- Make Keren FC bold in
#result, followed by “won 3–2!”. - Show the calculated number of goals in
#goals. - Show
<em>as visible characters in#raw.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
