aspect ratio

The proportion of an element's width to its height, such as 16:9.

In more detail

It is written as two numbers, such as aspect-ratio: 16 / 9. Giving images width and height attributes, or setting aspect-ratio in CSS, lets the browser reserve the right space before the image loads, preventing layout shift.

Related terms

Taught in

References