Search within TutorialsPark

CSS Attribute Selector

Selects elements if it has the specified attribute

Definition and Notes.

1. To assign CSS styles to an element that has a particular attribute we use the selector E[attribute] .

2. The value of the attribute does not matter. The first part of the selector is the Element and the next part is square brackets is the attribute.


CSS Attribute selector. internetexplorer safari firefox opera chrome

View in Splitscreen»


Note: Use this selector to match all attributes.

Related Examples.