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.


Pattern:

CSS Attribute selector. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note: Use this selector to match all attributes.


Related Examples.