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

class · WebPlatform Docs

class Summary

Styles all elements with the specified class.

Examples

For example, the following style rule matches any p element whose class attribute has been assigned a space-separated list of values that include the “pastoral” and “marine” class names. This rule matches when class="pastoral aqua marine" but does not match when class="pastoral blue".

<style>
    p.pastoral.marine { color: lightseagreen; }
</style>
Notes Remarks

The class attribute value must immediately follow the “period” (.) notation. More than one class name can be specified in one style rule; to match a subset of class values, each value must be preceded by a period.

Syntax

<strong/>sel.value {...}

Parameters
sel
Selector
value
String that specifies the value of the “class” attribute.
Standards information Related specifications
CSS Level 2 Specification
W3C Recommendation
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