This zone is sleeping right now! ZzzZZzzz

Better not disturb it! ~You go to the petrol station and buy a slushy instead, everything is cool!~

This area will open again in 000.beats!

(Learn about Swatch Time)

Some other zones are awake :^]


Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
Autumn, 20 Oct 2026 - @985.38
Forum Activity: Two Stars Random | Recent Posts | Guild Recents
News: Love is not possession  :4u: Guild Events: Halloween Watch-a-thon
Super News: ~~MelonLand's Halloween Profile Design Contest 2026~~
+  MelonLand Forum
|-+  Da Web Revival
| |-+  ✁ ∙ Web Crafting
| | |-+  Images with captions, lightboxes, and revealable-alt-text (HTML+CSS!)


« previous next »
Pages: [1] Print Embed
Author Topic: Images with captions, lightboxes, and revealable-alt-text (HTML+CSS!)  (Read 731 times)
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
The Worm is creeping around Melonland profiles!Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!Visited on Melon's 10th Anniversary!
« on: Summer, 03 Jul 2026 @610 » Toggle Font Embed

Regulars will know that sometimes I get an idea in my head and can't shake it. A "can this be done with just semantic HTML and CSS?". Here's my latest example. I wanted a (responsive) web page with:

- images,
- that had captions,
- and alt text,
- and that alt-text could be made "visible" with a toggle, like Mastodon does it,
- and clicking the image would show a larger version with a "lightbox" overlay effect
- using no JavaScript
- and the key functionality has to work even if CSS gets disabled,
- and it should all be keyboard-accessible

Here's the image I had in my head (recorded from the finished page on the Everyone Site):



I hope the CSS code (all embedded in the page) is self-explanatory, in case it's any use to anybody else. I've tried to throw a couple of comments in. I haven't the time to turn this one into a full tutorial, I'm afraid.

Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif https://origami.danq.dev/88x31.gif

Artifact Swap: PolyamorousI met Dan Q on Melonland!Joined 2025!
schlime9k
Full Member ⚓︎
***
View Profile WWW


Forever personalising my profile
⛺︎ My Room
StatusCafe: schlime9k
iMood: schlime9k
RSS: RSS

Guild Memberships:
Artifacts:
Visited on Melon's 10th Anniversary!Joined 2025!
« Reply #1 on: Summer, 03 Jul 2026 @621 » Toggle Font Embed

Very elegant solution! Will def use this at some point on my site when I need to as this is just a good accessibility feature. Great work as per usual Dan <333 :dog:

Logged

https://schlime.online/images/buttons/wsw.gif

Artifact Swap: Forum-Posting Extraordinaire!Physical media FOREVA!I met Dan Q on Melonland!GrapesAce Honeymami
pepper
Sr. Member ⚓︎
****
View Profile WWWArt


🐾 local furry punk ⛥ she/her
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: mildlypepper
RSS: RSS

Guild Memberships:
Artifacts:
Joined 2025!SpiffoI met Dan Q on Melonland!pepperartemissodie
« Reply #2 on: Summer, 08 Jul 2026 @667 » Toggle Font Embed

Dan I love you this is exactly what I've been planning on building for my gallery re-write!!! Semantic HTML and CSS is also my own priority, I don't have anything against JS but I would prefer my site to work without it being required, and my current gallery setup is very much not accessible.

I'm going to steal this for SURE  :chef:

Logged

  :dog:  I'm verbose. Sorry! (not sorry)

https://mildlypepper.net/media/buttons/pepper-button.png     https://mildlypepper.net/media/gif_collection/noai_tiny.png

Artifact Swap: Monster CreatureSquirtle!!!!
pepper
Sr. Member ⚓︎
****
View Profile WWWArt


🐾 local furry punk ⛥ she/her
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: mildlypepper
RSS: RSS

Guild Memberships:
Artifacts:
Joined 2025!SpiffoI met Dan Q on Melonland!pepperartemissodie
« Reply #3 on: Summer, 29 Jul 2026 @832 » Toggle Font Embed

Here's my latest example. I wanted a (responsive) web page with

 :dog:  Dan I'm using this and modifying it slightly for use in my professional photography portfolio  :mark:

Do you want me to credit you in-line or anything? And is this code licensed like your site code is, as Creative Commons? I'll credit you in my About page as I do other code I use but I wasn't sure about the CC license on the stuff you've shared on Melonland as opposed to stuff you've shared on your own site  :dog:


Logged

  :dog:  I'm verbose. Sorry! (not sorry)

https://mildlypepper.net/media/buttons/pepper-button.png     https://mildlypepper.net/media/gif_collection/noai_tiny.png

Artifact Swap: Monster CreatureSquirtle!!!!
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
The Worm is creeping around Melonland profiles!Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!Visited on Melon's 10th Anniversary!
« Reply #4 on: Summer, 30 Jul 2026 @331 » Toggle Font Embed

Do you want me to credit you in-line or anything?

While in general almost everything original I release is CC-By-NC (i.e. free to use for non-commercial purposes, with a credit line)... I'm not convinced that anything I did here was transformative enough to be copyrightable!

So please consider it to be your choice of CC0/Public Domain: I waive any rights over it - do what you like! Credit (or don't!) if you feel like it; but do it because you want to rather than because anybody told you to!

Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif https://origami.danq.dev/88x31.gif

Artifact Swap: PolyamorousI met Dan Q on Melonland!Joined 2025!
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 Melon
Land
Forum Art Hub Chat Webring Explore Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online
Zap!
Passport Sites tamaNOTchi Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe