Selector - Tag (Element selector)

Chrome Devtool Selector

About

A tag selector selects element in the DOM tree.

Example

List of tag selector

/* Selects all level 1 headings  */
h1
 /* Selects all paragraphs */ 
p
/* Selects all strong elements */
strong
/* Selects all em elements */
em
/* Selects all divs */
div
/* Selects all mama's tag (who knows ?) */
mama

Css

  • The HTML
<!-- The p official HTML tag -->
<p>I will be blue</p>
<!-- <mama> is not a official HTML, XML tag but you can still use it -->
<mama>Mama will be pink</mama>
  • The CSS selector p.
p /* select all p */ 
{ color:blue; } /* and color them in blue */ 
mama /* select all mama */ 
{ color:pink; } /* and color them in pink */ 





Discover More
Css - Rule (Set|Declaration)

In a CSS stylesheet, your write several rules to define your presentation. A rule set (also called “rule”) consists of: a selector list followed by a declaration block. (one of several declarations)...
Chrome Devtool Selector
Selector API

API A selector is a boolean expression (known also as predicate) that match against elements in a DOM tree in order to select one or several node. This API was known before as the CSS and was renamed...
Chrome Devtool Selector
Selector API - Element Selector

An element selector selects an element and is also known as a tag selector. See
Chrome Devtool Selector
Selector API - ID (Unique Identifier) attribute

The ID selector is a selector that match the elements with the given ID attribute Normally, an ID can be used only once each in a document but if it's not the case, the selectors will still return all...
Chrome Devtool Selector
Selector API - Sibling selector (adjacency - before after)

selection of sibling (ie node that share the same parent in the document tree) DOM sibling manipulation There is two sibling selector selection: sibling with the wildcard (+) sibling with the...



Share this page:
Follow us:
Task Runner