# d3-selection Selections allow powerful data-driven transformation of the document object model (DOM): set [attributes](./d3-selection/modifying.md#selection_attr), [styles](./d3-selection/modifying.md#selection_style), [properties](./d3-selection/modifying.md#selection_property), [HTML](./d3-selection/modifying.md#selection_html) or [text](./d3-selection/modifying.md#selection_text) content, and more. Using the [data join](./d3-selection/joining.md)’s [enter](./d3-selection/joining.md#selection_enter) and [exit](./d3-selection/joining.md#selection_enter) selections, you can also [add](./d3-selection/modifying.md#selection_append) or [remove](./d3-selection/modifying.md#selection_remove) elements to correspond to data. See one of: * [Selecting elements](./d3-selection/selecting.md) - querying for DOM elements. * [Modifying elements](./d3-selection/modifying.md) - modifying attributes of selected elements. * [Joining data](./d3-selection/joining.md) - joining data to selected elements for visualization. * [Handling events](./d3-selection/events.md) - declaring event listeners for interaction. * [Control flow](./d3-selection/control-flow.md) - iterating over selected elements. * [Local variables](./d3-selection/locals.md) - attaching state to elements. * [Namespaces](./d3-selection/namespaces.md) - dealing with XML namespaces. For more, see [the d3-selection collection on Observable](https://observablehq.com/collection/@d3/d3-selection).