There are plenty of JavaScript-based libraries that show tooltips when you hover your mouse over a certain area of a web page. Some are rather plain, some allow the tooltip to display HTML content styled with CSS.
But is there a way to show a styled tooltip without using JavaScript? If you just use the title
attribute, tags are not processed (e.g. foo<br />bar
doesn't produce a line break). I'm looking for a solution that allows one to display styled HTML content without using any JavaScript.
You can use the title attribute, e.g. if you want to have a Tooltip over a text, just make:
Pure CSS: