← Back to HTML DOM
Question 115
Build a Follow Button
Build a Follow Button
An empty container<div>has the idpanel. Create a<button>element with the textFollow, give it the classbtn, set adata-userattribute toalice, and append it inside the panel. Platform-Provided HTML (READ-ONLY): ``html <div id="panel"></div>``
Expected Output:
<div id="panel"><button class="btn" data-user="alice">Follow</button></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.