Explain what a pseudo class selector is

A psuedo class selector is not defined explicitly in the markup. They can be used to specifiy style when a certain action is taking place regarding an element.
For example to specify the color of a div when hovering over it you could write in css.
theDivsIdSelector:hover {
  color: blue;
}
The pseudo class is accessed by using a selector like id or class name in order to access the element then adding a colon and the name of the pseudo class. 
You can find a list of other pseudo classes available by searching online.

TB
Answered by Tom B. HTML and CSS tutor

2555 Views

See similar HTML and CSS Mentoring tutors

Related HTML and CSS Mentoring answers

All answers ▸

How can I centre-align an item horizontally within another element?


Show how you would give all elements that have a class of 'class1', a green background.


How do I setup my HTML/CSS environment?


Make a dropdown list with red type and yellow background.


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences