Hello,
I just learned about figcaption, but I am unsure about what´s the difference between figcaption and the alt attribute of an image besides the fact that one is visible and the other one is not.
To me both describe what the image is about.
Hello,
I just learned about figcaption, but I am unsure about what´s the difference between figcaption and the alt attribute of an image besides the fact that one is visible and the other one is not.
To me both describe what the image is about.
Hi there!
When used, the figcaption
tag will always be partnered with the figure
element. It is used to describe or give a caption to the figure
, always appears on screen, and may include more detailed information than the alt
attribute. On some webpages you may see them paired with images or pictures, but figcaption
works well with describing charts and tables.
On the other hand, the alt
attribute is used to describe images to the visually impaired and for users whose images fail to load. alt
descriptions should be relevant and to the point.
The two tags work well hand-in-hand. If you have a figure image (such as a table, chart, or other graphs), the alt
can give a short description while the figcaption
gives the user more context and information.
I hope this helps!