A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/selectors/attributes/existence below:

Attribute selector · WebPlatform Docs

Attribute selector Summary

Allows to select tags that has an attributes. While it can match the class and the id selector, its specificity value is lower.

Syntax

[sel=att] {...}

Parameters Examples

The following style rule selects any element with an “attr” attribute whose value is exactly "Value".

<!DOCTYPE html>
<html>
  <head>
    <style type="text/css">
      .test          { display:none; }
      [attr="Value"] { display:block; }
    </style>
  </head>
  <body>
    <div class="test" attr="Value">Test for [=] (Value) succeeded.</div>
  </body>
</html>
Related specifications
Selectors Level 3
W3C Recommendation
See also Related articles CSS Attributes Selectors Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4