Selector - Tag (Element selector)

1 - About

A tag selector selects element in the DOM tree.

3 - Example

3.1 - 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

3.2 - 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 */ 


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap