C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

* {}

selects all elements

p {}

selects all <p> elements

*.c {}

selects all elements where

p.c {}

selects all <p> elements where

#main {}

selects one element where id =”main”

a:link {}

selects all unvisited links


selects all visited links

a:hover {}

selects all links being hovered over

a:active {}

selects the current link being activated

a:focus {}

selects all links that have the focus

p:first-letter {}

selects first letter of all <p> elements

p:first-line {}

selects first line of all <p> elements

p:first-child {}

selects first child of all <p> elements

#n *.c :first-line {}

descendant selector example

#n > *.c > :first-line {}

child selector example

#n + *.c + :first-line {}

sibling selector example

#n , *.c , :first-line {}

applies independent selectors to same block of properties

*[title] {}

selects all elements with a title attribute.

*[title~=”WORD”] {}

selects all where title attribute contains “WORD”.


selects all with exact attribute match.