W3.CSSLesson 50Free preview
W3.CSS Tooltips
This lesson is part of W3.CSS · All levels
Summary
A tooltip is a small description box that appears when a user applies a cursor to an element. W3.CSS implements it with the .w3-tooltip class on the packaging, whereas its content is a span that appears via CSS:hover without JavaScript. It's a good tool for supplementary information, not for compulsory testimony.
Key points
- Balk text with .w3-tooltip and then save the description on the spanning barrel
- The tooltip appears via the CSS:hover rule so there's no need for JavaScript.
- Attribute title is an alternative browser-based tooltip
- For keyboard users, make sure the elements are focused
- Don't just put important information in the tooltip on the touchpad.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.