Captions for images


/ Published in: HTML
Save to your folder(s)

The nice part about it is that the caption is locked to the image. The figure can be positioned and styled and the caption can be rendered with any affect that can be applied to any other text element.


Copy this code and paste it in your HTML
  1. <figure style="width:110px;float:left;margin:10px;text-align:center;
  2. background-color:white;border:1px solid black;
  3. border-radius:5px;box-shadow:1px 1px 1px 1px;padding-top:5px;">
  4. <img src="../images/cd100.jpg">
  5. <figcaption>this is image one</figcaption>
  6. </figure>

URL: http://coboldinosaur.com/pages/Captions_for_Lists_and_Images.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.