Search results
Results from the WOW.Com Content Network
2. Well you could either add <a></a> tags and place the div inside it, adding an href if you want the div to act as a link. Or else just use Javascript and define an 'OnClick' function. But from the limited information provided, it's a bit hard to determine what the context of your problem is.
Making list-items clickable (example): HTML: ... How to make entire link clickable in an unordered list. 2 ...
@ChrisMarisic there's many downsides to using onClick: it doesn't work with JS turned off; the user can't open a link in a new tab/window, nor copy the link into their clipboard for sharing; parsers and bots won't be able to recognize and follow the link; browsers with a "prefetch" feature won't recognize the link; and many more.
Another method to make an image clickable if you already defined an id in CSS (as in the OP) is by passing it as the id attribute in <a> tag.
Clickable rows is not a great UX experience: it's not easy to visually mark them as clickable, and it poses challenges when multiple parts are clickable within the rows, like buttons. So a viable alternative could be to have an <a> tag only on the first column, displayed as a regular link, and give it the role of navigating the whole row.
I lost my link and noticed in DevTools that the link still appeared around the SVG, but the :hover state worked. Utilizing energee's elegant answer, my link worked, but of course I lost the :hover. So it looks like the object tag isn't a great solution for applying a :hover change to an SVG.
It makes more sense to include a link inside another element such as a title over leaving the link outside of the title. – nilon Commented Nov 10, 2020 at 20:01
You can creat the table you want, save it as an image and then use an image map to creat the link (this way you can put the coords of the hole td to make it in to a link). Share Improve this answer
I need those identifiers clickable in HTML, to achieve that I used <a> tag with onclick <a onclick=IDClick(id)>id</a> now it works, but the cursor will not change when it is hovered over the clickable element.
I develop a web app where users can post text, images, Files a post text can contain links also, for example ...