Skip to main content

Specifies that an element cannot be selected.


<element UNSELECTABLE="on | off" ... >


Property values


Permits selection of the element.


Prohibits selection of the element.

Standards information

There are no standards that apply here.



Setting the UNSELECTABLE attribute to off does not ensure that an element is selectable. One example is an HTML Application (HTA) with the SELECTION attribute set to no. Elements in the body of the HTA cannot be selected, even if the UNSELECTABLE attribute for an element is set to off.


When you click an element with the UNSELECTABLE attribute set to on, any existing current selection is not destroyed.

An element with the UNSELECTABLE attribute set to on can be included in a selection that starts somewhere outside the element.

The UNSELECTABLE attribute is implemented as an expando. Setting the expando property of the document object to false precludes the functionality of all expandos.


This example shows that the UNSELECTABLE attribute is not inherited by child objects. Text in the TEXTAREA element can be selected and modified, but the text in the parent SPAN element cannot be selected.

<span id="oSpan" UNSELECTABLE="on" >This text cannot be selected.
<textarea wrap="physical" rows="5" style="font-weight: bold;" id="oTextarea">
This text can be selected and overwritten.
This text closes the SPAN and cannot be selected either.