Change Link Href and Text
mediumQuestion 11Select the link with id="homeLink" and change its href attribute to "/home" and its text content to "Go Home".
Platform-Provided HTML (READ-ONLY):
<div id="navigation">
<a id="homeLink" href="#">Link</a>
</div>Steps:
1. Use document.getElementById() to select the link
2. Change its href attribute to "/home"
3. Change its text content to "Go Home"
Expected output
<div id="navigation"> <a id="homeLink" href="/home">Go Home</a> </div>
= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics
HTML DOM
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.