Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What are the pseudo-classes in CSS3?

user-image
Question added by Yasmeen Husam , Web Developer , Al Fahid Systems
Date Posted: 2019/04/07
Mahmoud Elbahrawy
by Mahmoud Elbahrawy , wordpress developer , xtreme degital ads

see the response in

https://www.w3schools.com/css/css_pseudo_classes.asp

Mohanad Adel
by Mohanad Adel , Front-End Development Team Lead , Digital yards

A Pseudo class in CSS is used to define the special state of an element. It can be combined with a CSS selector to add an effect to existing elements based on their states. For Example, changing the style of an element when the user hovers over it, or when a link is visited. All of these can be done using Pseudo Classes in CSS.

selector: pseudo-class{ property: value; }

sarra yahia
by sarra yahia , Software Developer , AUF-IFIC (french-canadian agency)

  • A pseudo-class is used to define a special state of an element.For example, it can be used to change the color of a selected link
  • Syntax

selector:pseudo-class {  property:value;}

  • Example:/* unvisited link */a:link {  color: #FF0000;}/* visited link */a:visited {  color: #00FF00;}

 

Md Alamgir Hossain
by Md Alamgir Hossain , Sr. Graphic Designer , www.ajkerdeal.com

A pseudo-class is used to define a special state of an element.

For example, it can be used to:

  • Style an element when a user mouses over it
  • Style visited and unvisited links differently
  • Style an element when it gets focus

Hassan farooq
by Hassan farooq , SOFTWARE ENGINEER

CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). For example, :hover can be used to change a button's color when the user's pointer hovers over it.

 

/* Any button over which the user's pointer is hovering */

button:hover {    color: blue;}

Syntax

selector:pseudo-class {    property: value;}

Gantone Mchana
by Gantone Mchana , Accounting, European Foods Africa Ltd

From my point of view, pseudo-classes in css3 can be used to define a special stateof  an element, e.g when the user trys to hover a mouse on top of an element where it can change color

Pseudo-class also can be used to define special rules for different languages.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.