Figure/figcaption: strange message
Figure/figcaption: strange message
HTML-Validator 19.03.03 (Pro) – with WeBuilder 2020
I get a warning about a missing optional figcaption - but as the attached screenshot shows that a figcaption exists.- Albert Wiersch
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
- Contact:
Re: Figure/figcaption: strange message
Hello,
The complete message is:
The "figure" element does not contain an optional "figcaption" element. The "figcaption" element can be used as the first or last child of a "figure" element to provide a caption or legend. This message is displayed up to 3 times.
Please move the "figcaption" element to the first or last child of the "figure" element (or only child). Example:
I will add an error when "figcaption" is not used as a direct child of "figure" in the next major release.
I hope this helps. Please let me know if you have any more questions.
The complete message is:
The "figure" element does not contain an optional "figcaption" element. The "figcaption" element can be used as the first or last child of a "figure" element to provide a caption or legend. This message is displayed up to 3 times.
Please move the "figcaption" element to the first or last child of the "figure" element (or only child). Example:
Code: Select all
<figure>
<img src="image.jpg" alt="" height="120" width="180">
<figcaption>
<a href="URL">link text</a>
</figcaption>
</figure>
I hope this helps. Please let me know if you have any more questions.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial