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/substring below:

substring · WebPlatform Docs

substring Examples

The following style rule selects any element with an “attr” attribute whose value includes the substring "ai".

<!DOCTYPE html>
<html>
  <head>
    <style type="text/css">
      .test        { display:none; }
      [attr*="ai"] { display:block; }
    </style>
  </head>
  <body>
    <div class="test" attr="Contains">Test for [*=] (Substring) succeeded.</div>
  </body>
</html>
Notes Remarks

Note Requires Windows Internet Explorer 7 or later. Note Attribute selectors are not supported in webpages that are displayed in the Microsoft Internet Explorer 5 document mode (also known as “Quirks” mode). To use attribute selectors, add a !DOCTYPE directive that specifies a standard-based document. For more information, see Defining Document Compatibility. Attributes are case-sensitive.

Syntax

<strong/> [att*=val] {...}

Parameters
att
Must be either an Identifier or a String.
val
Must be either an Identifier or a String.
Standards information 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