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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -