Consider the following markup:
<figure>
<picture>
<source media="(min-width: 40em)"
srcset="large.jpg 1024w, medium.jpg 640w, small.jpg 320y">
<img src="medium.jpg" alt="London by night">
</picture>
<figcaption>A landscape of London by night</figcaption>
</figure>
Is it valid? If not, can you explain why?
Answer Posted / chaitu
The markup uses the picture element, which is a pretty new addition to the specification. The code is all valid apart from the last image specified in the srcset attribute; 320y isn’t a valid value. If the y is replaced with a w, it becomes valid though.
Is This Answer Correct ? | 24 Yes | 1 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category