GenFAQ

Where does a button's label come from?

All chapters / Chapter outline

HTML form labels: W3C WAI implementation guidance. This chapter does not cover validation, error recovery or legal compliance.

Question 4 / 4

For a button element, put the label inside the element. For an input button, use its value attribute. An input of type image uses its alt attribute to describe the button's function. [2]

Try the label, then the field

Local browser demonstration only. No account, storage or submission to a server. Click the label to focus the field; an empty submission uses native validation and a valid submission closes this local demonstration.

An explicit association

The visible label names the field before anything is typed. The placeholder is an example, not the field name. Keyboard focus and browser validation are real, not a pictured mockup.

Read the association question

Source and reading boundary

[2] W3C WAI: Labeling Controls

Source accessed and summary prepared: 2026-11-24

This is an original summary, not a translation of the full tutorial. The Korean and English pages are translations of this GenFAQ summary. No W3C review, affiliation or certification is claimed.

Return to the answer