HTML Basics 4: Alt vs. Title


Maybe at one point, you were like me. “Why doesn’t my alt text show up when I mouse over it?” I used to be confused by that for the longest time, as embarrassing as it seems for me. But it’s actually really simple: Alt doesn’t work like it does in Rentry.

If you want text to appear when you hover over it, then you can use title, exactly how alt is used.

<img src="https://files.catbox.moe/m9s4k0.webp" title="Merak from Azure Striker Gunvolt (pre-transformation)"/>

If you’re on your computer or laptop, you can try it now:

And here’s the difference between title and alt:

(loaded)

Bite-sized Joule in Azure Striker Gunvolt 2

(loaded incorrectly)

Bite-sized Joule in Azure Striker Gunvolt 2

They both work like alt text but only one has text appear when you hover it! (I only realized this now... lol)


Continue to: HTML BASICS 5: Links

Return to: HTML Basics 3: Images and Self-Closing Tags