Question · HTML and CSS course · Module 5: Responsiveness
Difference between width and max-width
What is the difference between width: 100% and max-width: 100% for responsive images?
Answer options
- width: 100% always stretches the image to the full container width, max-width: 100% allows the image to be smaller than the container
- There is no difference, both properties work identically
- max-width: 100% only works on mobile
- width: 100% is deprecated and should not be used
You can check the correct answer by solving this task in the CodeWorlds game.