How to: Add tooltips to all images #4154
wilhelmer
started this conversation in
Show and tell
Replies: 1 comment
-
Very cool! This should be default. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As you probably know, the syntax for adding images in Markdown is like this:
The alt text is helpful, e.g., for screen readers and SEO purposes.
The title is helpful because most desktop browsers display it as a "tooltip" when you hover over the image.
However, adding and maintaining both the alt text and the title on all of your images can be cumbersome.
This is why I (and probably most users?) usually omit the title and only specify the alt text:
The downside of this is that you're adding information that, while being super beneficial for a small, but important (!) group of users, most users won't ever notice. There's no tooltip.
Wouldn't it be great to display this information to all users, empowered by MkDocs Material's improved tooltips?
Here's how:
Done! That was easy, huh?
Have a nice day!
Beta Was this translation helpful? Give feedback.
All reactions