Pages

Tuesday, 14 February 2017

Figure Tag HTML 5


Figure  Tag HTML 5 Example

HTML 5 introduce figure tag for apply image on your webpage. You may think that what about img tag? Yes it still in use but there was a problem with img tag, when you want to apply some caption to related image then you will add some HTML tag but if you are using figure tag then you have figure caption tag for display caption. Figure tag is container of graphics element which is use in conjunction of img and figure caption tag. So figure has better description processing option.

There are some exceptions. Graphics that are just graphics should still be listed as <img>. The reason regular graphics deserve different treatment is because they’re not necessary to the content on the page. If someone can’t see the graphic, they’d still get a clear message from your site.

<figure>

  <img src="image.jpg" alt="your text for alt">
  <figcaption>A description about image  <a href="URL/">you may use url as part of caption </a></figcaption>
</figure>


Next Topic

No comments:

Post a Comment