You can you with a small script line –
<div class="target" onclick="window.location.href="http://w3schools.com"">
<img src="http://placehold.it/400x400">
</div>
But without a
and pure css not possible.
More Related Contents:
- How to center an element horizontally and vertically
- CSS selector by inline style attribute
- HTML/CSS – Best practice for preserving white space on certain elements?
- How is the margin-top percentage calculated?
- How to align flexbox columns left and right?
- Inline Form nested within Horizontal Form in Bootstrap 3
- How can I make a div with irregular shapes with css3 and html5?
- Font-Face Not loaded
- How to apply padding to every line in multi-line text?
- Maintain image aspect ratio in carousel
- How do I make a text input non-editable?
- CSS/HTML: What is the correct way to make text italic?
- Can a div have multiple classes (Twitter Bootstrap) [duplicate]
- svg background image position is always centered in internet explorer, despite background-position: left center;
- How to center and crop an image to always appear in square shape with CSS?
- CSS Border on PNG image with transparent parts
- Make Div Draggable using CSS
- Why would Google use a font tag?
- Why use a sprite sheet rather than individual images?
- Styling the “ element in CSS?
- Table vertical header?
- inline-block element with no text renders differently
- Link external CSS file only for specific Div [duplicate]
- Create wavy borders in CSS for top and bottom borders
- Prevent ligatures in Safari (Mavericks/iOS7) via CSS
- Adding text before list
- Sizing flex items on the last row
- Create tree view with horizontal and vertical lines showing the connectivity using css
- How can I get a specific number child using CSS?
- CSS/HTML: How do I change the color of the check mark within the checkbox input? [duplicate]