--- url: "https://www.w3.org/WAI/tutorials/forms/labels/" titulek: "Labeling Controls | Web Accessibility Initiative (WAI) | W3C" h1: "Labeling Controls" popis: "Accessibility resources free online from the international standards organization: W3C Web Accessibility Initiative (WAI)." jazyk: "en" kanonicka: "https://www.w3.org/WAI/tutorials/forms/labels/" drobecky: ["Home", "Design & Develop", "Tutorials", "Forms", "Labeling Controls"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 00:22:31" znaku: 5782 slov: 944 kodovani: "utf-8" sha256: "beea035b15b2745e238bab21e6c6c9beab241c6d725ed48ba2c2d2346bb1d087" --- Labels need to describe the purpose of the form control. This section of the tutorial describes how to provide labels that are properly associated with form controls. Later sections explain how to provide [instructions](../instructions), [validate user input](../validation), and [provide feedback](../notifications) to help users complete your form. A label and a form control should be associated with each other either implicitly or explicitly. Web browsers provide the label as a larger clickable area, for example, to select or activate the control. It also ensures that assistive technology can refer to the correct label when presenting a form control. ## Associating labels explicitly Whenever possible, use the `label` element to associate text with form elements explicitly. The `for` attribute of the label must exactly match the `id` of the form control. ### Hiding label text A label for a form control helps everyone better understand its purpose. In some cases, the purpose may be clear enough from the context when the content is rendered visually. The label can be hidden visually, though it still needs to be provided within the code to support other forms of presentation and interaction, such as for screen reader and speech input users. The method used in this tutorial to hide an element visually but make it available for assistive technologies is explained in Note on hiding element. In the example below, the search field is positioned directly beside the search button. The purpose of the text input field is evident from the context in most situations. #### Hiding the label element In this approach, the `