Oh, this is a wonderfully clever way to do this! Is the image used here transparent, so it looks like an invisible link?
Though I would lovingly point out that this wouldn’t be a user friendly thing to do on a live site, what a delightful and weird experiment! I love weird!
I just made the anchor a block and gave it a background image with inline style. And because of it’s width and height it can be clicked. So the anchor literally have no child element/content.
And yes it’s gonna be a very user unfriendly menace.
Yeah that’s always a better idea but, the whole point of this was to make a clickable anchor tag with absolutely no content, adding image or picture element will have them as it’s content so it won’t really be content less.
In the very first stream some one asked if it was posible to make a clickable anchor tag without anything in it. It got me curious. I had already made some anchor tags with display block, so I thought that might work with nothing in it, and tried it out. It worked so now I am explaining it to everyone.
Oh I asked this question in the Eastern stream. Thanks for answering! I saw it too late though, haha. Though, what happens when you make an element a block? Like does it become similar to div?
You can specify it’s height, width, borders, margins, paddings, and other block ellement specific properties with no restriction and it makes the element render in a new line.