html - adding a text below an image after clicking on it -
i beginner html have given task add text below image after clicking on it
i trying this
<a href="hh.jpg"> <img src="hh.jpg" width="100" figcaption="has"> </a>
but requires 2 pages task completed. , have in 1 page. in order complete assignment. can 1 guide me how it...?
here's approach html requested. href of a
should target anchor, add css style show targeted location if target
pseudo-class selected.
<style> #display { display: none; } #display:target { display: block; } </style> <a href="#display"> <img src="hh.jpg" width="100" figcaption="has" /> </a> <div id="#display">show text</div>
Comments
Post a Comment