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

ID · WebPlatform Docs

ID Summary

The #id selector styles the element with the specified id.

Examples

The following style rule applies to the element with id="navigation" and its descendants.

<style>
    #navigation { line-height: 0px; font-size: x-small; }
</style>
Notes Remarks

The id attribute allows authors to uniquely identify an element instance in the document tree. ID selectors match an element instance based on its identifier. The id attribute value must immediately follow the “pound” (#) notation. Note Windows Internet Explorer allows multiple elements to share a single ID value. If more than one element exists, the style rule will apply to all elements with the given ID. Only one id attribute may be present on any given element. In the event that a style declaration conflicts with another declaration, the rule with a higher level of specificity is used. (See Understanding CSS Selectors.) If a Class Selector and ID Selector are in conflict, the id is chosen.

Syntax

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

Parameters
sel
Selector
value
String that specifies the value of the “id” attribute.
Standards information See also Related articles 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