0% found this document useful (0 votes)
17 views4 pages

CSS Selectors Reference

The document provides an overview of CSS selectors, which are used to select HTML elements for styling. It details various types of selectors, including simple selectors, attribute selectors, and combinators, along with examples for each. Additionally, it highlights the importance of CSS references and resources for learning CSS effectively.

Uploaded by

marcar1976
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

CSS Selectors Reference

The document provides an overview of CSS selectors, which are used to select HTML elements for styling. It details various types of selectors, including simple selectors, attribute selectors, and combinators, along with examples for each. Additionally, it highlights the importance of CSS references and resources for learning CSS effectively.

Uploaded by

marcar1976
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

 Tutorials  References  Exercises  Certificates  Search... Upgrade Get Certified

HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY

CSS References
CSS Reference
CSS Browser Support
CSS Selectors
CSS Combinators
CSS Pseudo-classes CSS Selector Reference
CSS Pseudo-elements
CSS At-rules ❮ Previous Next ❯
CSS Functions
CSS Reference Aural
CSS Web Safe Fonts
CSS Fallback Fonts
CSS Selectors
CSS Animatable
CSS selectors are used to "find" (or select) the HTML elements you want to style.
CSS Units
CSS PX-EM Converter Use our CSS Selector Tester to demonstrate the different selectors.
CSS Colors
CSS Color Values
CSS Default Values
CSS Entities
CSS Simple Selectors
The simple selectors select elements based on element-name, id, and class. In addition, there is the
CSS Properties universal selector (*).
accent-color
align-content
align-items Selector Example Example description
align-self
element p Selects all <p> elements
all
animation #id #firstname Selects the element with id="firstname"
animation-delay
animation-direction ❯
 Tutorials  References  * Exercises  *
Certificates 
Selects all elements Upgrade Get Certified

.class .intro Selects all elements with class="intro"


HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY
p.intro Selects all <p> elements with class="intro"

CSS References
CSS Reference
CSS Browser Support
CSS Selectors CSS Attribute Selectors
CSS Combinators
CSS Pseudo-classes The attribute selector selects HTML elements with a given attribute set.
CSS Pseudo-elements
CSS At-rules
Selector Example Example description
CSS Functions COLOR
CSS Reference Aural [attribute] [lang] Selects all elements with a lang attribute PICKER
CSS Web Safe Fonts
CSS Fallback Fonts [attribute=value] [lang="it"] Selects all elements with lang="it"
CSS Animatable
[attribute~=value] [title~="flower"] Selects all elements with a title attribute containing the word
CSS Units
"flower"
CSS PX-EM Converter
CSS Colors [attribute|=value] [lang|="en"] Selects all elements with a lang attribute value equal to "en" 
CSS Color Values or starting with "en-" 
CSS Default Values
[attribute^=value] [href^="https"] Selects all elements with a href attribute value that begins
CSS Entities
with "https"

CSS Properties [attribute$=value] [href$=".pdf"] Selects all elements with a href attribute value ends with
accent-color ".pdf"
align-content
[attribute*=value] [href*="w3schools"] Selects all elements with a href attribute value containing the
align-items
substring "w3schools"
align-self
all
animation
animation-delay
animation-direction
 Tutorials  References  CSS Nesting
Exercises  Selector
Certificates  Upgrade

Get Certified

HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY
Selector Example Example description
CSS References
& & Applies styles for an element within the context of another
CSS Reference
element
CSS Browser Support
CSS Selectors
CSS Combinators
CSS Pseudo-classes ❮ Previous Next ❯
CSS Pseudo-elements
CSS At-rules
CSS Functions
CSS Reference Aural
CSS Web Safe Fonts
CSS Fallback Fonts
CSS Animatable
CSS Units
CSS PX-EM Converter
CSS Colors
CSS Color Values  PLUS SPACES GET CERTIFIED FOR TEACHERS

CSS Default Values


CSS Entities

FOR BUSINESS CONTACT US


CSS Properties
accent-color
align-content Top Tutorials Top References Top Examples
align-items
HTML Tutorial HTML Reference HTML Examples
align-self CSS Tutorial CSS Reference CSS Examples
JavaScript Tutorial JavaScript Reference JavaScript Examples
all How To Tutorial SQL Reference How To Examples
animation SQL Tutorial Python Reference SQL Examples
Python Tutorial W3.CSS Reference Python Examples
animation-delay W3.CSS Tutorial Bootstrap Reference W3.CSS Examples
animation-direction Bootstrap Tutorial PHP Reference Bootstrap Examples

 Tutorials  PHP Tutorial
References 
Java Tutorial
C++ Tutorial
Exercises  Certificates  HTML Colors
Java Reference
Angular Reference
PHP Examples
Java Examples
XML Examples
Upgrade Get Certified

HTML CSS jQuery Tutorial SQL


JAVASCRIPT PYTHON JAVA PHP jQuery Reference
HOW TO W3.CSS C C++ C# jQuery Examples
BOOTSTRAP REACT MYSQL JQUERY
Get Certified
CSS References HTML Certificate
CSS Certificate
CSS Reference JavaScript Certificate
CSS Browser Support Front End Certificate
SQL Certificate
CSS Selectors Python Certificate
PHP Certificate
CSS Combinators jQuery Certificate
Java Certificate
CSS Pseudo-classes
C++ Certificate
CSS Pseudo-elements C# Certificate
XML Certificate
CSS At-rules
CSS Functions
CSS Reference Aural
CSS Web Safe Fonts      FORUM ABOUT ACADEMY

CSS Fallback Fonts W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
CSS Animatable of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.
CSS Units
Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.
CSS PX-EM Converter
CSS Colors
CSS Color Values
CSS Default Values
CSS Entities

CSS Properties
accent-color
align-content
align-items
align-self
all
animation
animation-delay

You might also like