Which of the following property specifies the transparency of an element?

alpha
opacity
opac
none of the mentioned

The correct answer is: A. alpha

Alpha is a property that specifies the transparency of an element. It is a number between 0 and 1, where 0 is completely transparent and 1 is completely opaque.

Opacity is another property that specifies the transparency of an element. It is a number between 0 and 1, where 0 is completely transparent and 1 is completely opaque. However, opacity is not as widely supported as alpha.

Opac is not a valid property.

Here is an example of how to use the alpha property to make an element transparent:

“`html

This is a transparent div

“`

In this example, the div element will be half transparent.

Exit mobile version