Tagg the Builder saysAttributes go in the opening tag and configure an element — its source, link target, id, class, and more.
Tags say what an element is; attributes say more about it. They live in the opening tag as name="value" pairs: <a href="...">, <img src="..." alt="...">, <div class="card">.
Some attributes are global (work on any element): id, class, style, title, data-*. Others are specific to one element. Always quote your values to avoid surprises with spaces.
Power-ups you unlock
Attributes configure elements: name="value"
They go in the opening tag only
Global attributes (id, class, style, data-*) work everywhere
Always wrap values in quotes
The Unclosed Tag attacks — common mistakes
Unquoted values with spaces: class=my card → only "my" is the class
Putting attributes on the closing tag (they belong on the opening tag)
Duplicating an id on the page — ids must be unique
Boss battleGive the link a title="..." attribute and hover it in the preview to see the native tooltip appear.
Example code
<!doctype html>
<html><head><meta charset="utf-8"></head>
<body>
<a href="https://example.com" title="hover me" target="_blank">a link with attributes</a>
<img src="https://via.placeholder.com/80" alt="placeholder image">
</body></html>