CSS Tooltip Generator

A hover tooltip with an arrow, in pure CSS.


The tip uses ::after for the text and ::before for the arrow. Both appear on hover. The preview puts the trigger in the middle so the top position is not clipped.

Frequently asked questions

Can the tooltip contain HTML?

This version uses an attribute, so the text is plain. A real element next to the trigger is better when you need a link inside the tip.

Is it available to keyboard users?

Add the same rule for :focus that you use for :hover. The copied CSS already includes focus.