In what direction does float will work? img { float: right; }

left
top
bottom
right

The correct answer is D. right.

The float property is used to position an element on the page. It can be used to make an element float to the left, right, or both sides of an element. The float property can also be used to make an element float around an element.

The float property takes a value, which can be left, right, both, or none. The left value will make the element float to the left of the element it is next to. The right value will make the element float to the right of the element it is next to. The both value will make the element float to both the left and right of the element it is next to. The none value will remove the float from the element.

In the example given, the img element will float to the right of the element it is next to.