Day 26: Data Attributes
HTML Masterclass
Current Task
Objective
Store custom invisible data on elements for JS to use.
Step 1: Create a <div>.
Step 2: Add data-user-id="123" and data-role="admin" attributes.
Step 3: Add the text "Admin Panel" inside.
index.html
<div data-user-id="123" data-role="admin">
Admin Panel
</div>
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview