Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Why we use Pseudo-elements in CSS?

user-image
Question added by Shahid Aziz , Web Developer , Niche-vision
Date Posted: 2014/05/07
Muhammad Waqas
by Muhammad Waqas , Dot Net and MVC Developer , Osys Technologies

Apart from the multiple instances of the same html element if you want to apply some effect on portion of an element(first letter etc) or on some selectors you use pseudo-elements

Feysal Mama
by Feysal Mama , Software Developer , Minister of science and higher Education - Ethiopia

pseudo-element in CSS is a keyword added to a selector that lets we style a specific part of the selected element(s).

Toha Yaseen
by Toha Yaseen , Executive , The Jammu And Kashmir Bank Ltd

CSS pseudo-elements are used to add special effects to some selectors.

for example

p::first-line {color:#ff0000;font-variant:small-caps;}

this will add effect to only first line of the <p>

More Questions Like This

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