Which of the following property is used to define whether an element should be resized and, if so, upon what axis?

axis
resize
set-origin
set-axis

The correct answer is: A. axis

The axis property is used to define whether an element should be resized and, if so, upon what axis. The resize property is used to resize an element, but it does not specify the axis upon which the element should be resized. The set-origin property is used to set the origin of an element, but it does not specify whether or not the element should be resized. The set-axis property is not a valid CSS property.

The axis property can be used to resize an element along the x-axis, the y-axis, or both axes. The following example shows how to resize an element along the x-axis:

css
.element {
width: 100px;
height: 100px;
axis: x;
}

The following example shows how to resize an element along the y-axis:

css
.element {
width: 100px;
height: 100px;
axis: y;
}

The following example shows how to resize an element along both axes:

css
.element {
width: 100px;
height: 100px;
axis: both;
}