From the course: HTML Forms: Accessibility

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Placeholder, label attribute

Placeholder, label attribute

- [Narrator] When you buy a bottle of fruit juice from a store, the flavor is indicated right after the brand name. That way, you get to know what flavor you are getting. This is what the placeholder attribute is like. Even though fruit juice bottles have different colors, for us to know what fruit is in each bottle the flavors are usually indicated as blueberry juice, orange juice, strawberry juice. This is what a placeholder attributes is like. They provide hints as to what data should be entered in a form. Even though labels already provide information on what to submit, placeholders offer additional guidance. They provide hints based on the labels associated with them. The placeholder is usually an example of the label description and should serve as a guide to tell users how and what data to fill into the Input field. When styling a placeholder, the text used should be legible, but also use a lighter color, so that it does not take visual attention from the label. Placeholders…

Contents