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 / 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 |
Describe when it’s appropriate to use the small element and provide an example?
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?
Can you describe why hgroup was dropped and how the markup can be addressed today with an example?
Which network design layer provides a connection point for end user devices to the network? access core distribution networkby a networking device
How to create nest tables within tables in HTML?
Is the alt attribute mandatory on img elements? If not, can you describe a scenario where it can be set to an empty value? Does an empty value affect accessibility in any way?
Is it possible to express a date range using a single time element?
What is the mark element? Can you describe an example of use for this element?
How do I link to a location in the middle of an HTML document?
What is the longdesc attribute? Can you explain its purpose?
Explain marquee tag.
How to create a button which acts like a link?