@jguleserian
Posted
Melissa, I really liked your solution. While I am no expert, I think I may have some insight on your musing presenting in your submission.
Technically, the <picture>
element will take the global attributes, see W3Schools <picture> element. However, since this element is really just a container, anything you do to affect it is only affecting a generic container, not the individual image displayed in it.
To affect the individual images, you have to attach formatting to them directly. The reason for this is likely that, given the parameters for display defined in each listing of an <img>
or <source>
, the chosen image may have to be displayed differently, with different filters, fitting of containers, borders, etc. Moreover, putting the styling directly on the individual image gives you more control over the final appearance.
I hope you find something helpful in here. Thank you again for sharing your solution.
Happy coding!
Jeff
Marked as helpful