Reputation: 1541
My typical image will have an event name (short text), a description text (longer text), and copyright text (short text) below it. I'm looking for the best tag use case. Don't worry about compatibility with older browers. The image will be in a figure tag, so we're talking about content within figcaption here.
Example:
-------------------------
- imagine an image here -
-------------------------
Marathon 2013
Some great Marathon 2013 photo of a great runner. This could go on, and on, and on...
and will span multiple lines most of the time.
Courtesy of somesite.com
I'm currently using cite for event (Marathon 2013) and copyright (Courtesy of somesite.com). I'm thinking of span for the description.
What would you suggest?
Upvotes: 2
Views: 3252
Reputation: 301
<figure>
<img src="image.jpg" alt="image text">
<figcaption>Some great Marathon 2013 photo of a great runner.
This could go on, and on, and on... and will span multiple lines most of the time.
Courtesy of somesite.com</figcaption>
</figure>
Inside figcaption you can use all tags you want like <a> or <span>
and you can use figure for multi images like this
<figure>
<img src="image.jpg" alt="image text">
<img src="image2.jpg" alt="image text">
<img src="image3.jpg" alt="image text">
<figcaption>Some great Marathon 2013 photo of a great runner.
This could go on, and on, and on... and will span multiple lines most of the time.
Courtesy of somesite.com</figcaption>
</figure>
Upvotes: 3
Reputation: 275867
Yup. figure for image. Figcaption containing span / cite sounds good.
Upvotes: 1