Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html for put a label in bottom of an image

Tags:

html

css

Hi everyone I'm newbie in this world of software, and now I have a problem, I need put a label in bottom of an image, I thought that I could make this, but after along time I decide put my problem in this site, for an orientation my idea was created a HTML table y put tag img but later my problem is how I can put a label over the tag img

<table border="2px"> 
      <td><img src="tiquet.png" height="150" width="90"></td> 
 </table>

I can't found a HTML tag for put a label in bottom of an image, then I thought in make another table for put into the another table but I think this not a good idea because how I can align the label with the bottom of image do you have some idea that could be great help for me.

like image 995
user2957682 Avatar asked May 29 '16 06:05

user2957682


2 Answers

You can use <figure> and <figcaption> elements to achieve the desired affect. You can use some CSS to set the border width for the figure element.

<figure>
    <img src="tiquet.png" height="150" width="90">
    <figcaption>Your label goes here</figcaption>
</figure>
like image 145
kkaosninja Avatar answered Oct 13 '22 20:10

kkaosninja


Try as follows

html:-

 <a href="http://name.com">
        <img src="name.png" width="100px" height="100px"> 
        <div class="caption">Caption here</div>
    </a>

css:-

#images{
    text-align:center;
    margin:50px auto; 
}
#images a{
    margin:0px 20px;
    display:inline-block;
    text-decoration:none;
    color:black;
 }
like image 23
Arshid KV Avatar answered Oct 13 '22 20:10

Arshid KV