How to set caption for an image using HTML ?
The <figurecaption> tag in HTML is used to set a caption to the figure element in a document. This tag is new in HTML5.
Syntax:
<figcaption> Figure caption... </figcaption>
Example 1:
HTML
<!DOCTYPE html> < html > < head > < style > body { text-align: center; } h1 { color: green; } </ style > </ head > < body > < h1 >w3wiki</ h1 > < h3 > How to define an image caption? </ h3 > < figure > < img src = "https://media.w3wiki.net/wp-content/uploads/Beginner-25.png" alt = "gfglogo" style = "width:50%" > < figcaption >w3wiki Logo</ figcaption > </ figure > </ body > </ html > |
Output:
Contact Us