Deference Between Pseudo Element & pseudo-class
-
Pseudo Element का इस्तेमाल Element Content के किसी Specific Part को Target करने के लिए किया जाता हैं. जैसे; first-letter, first-line आदि.
-
जबकि pseudo-class द्वारा Elements की Specific Stages को Target किया जाता हैं. जैसे; Mouse Hover, Focus आदि.
-
Pseudo Elements द्वारा Document Tree से अनुपस्थित (Undefined) Elements को भी Target कर सकते हैं. जैसे; after, before आदि.
-
लेकिन, pseudo-class से सिर्फ Document Tree में समाहित नही होने वाले Elements को Target कर सकते हैं. नये Elements Define नही कर सकते है.
Deference Between Pseudo Element & pseudo-class
-
Pseudo Element is used to target a specific part of the element content. As; first-letter, first-line etc.
-
Whereas specific stages of elements are targeted by pseudo-class. As; Mouse Hover, Focus etc.
-
Through Pseudo Elements, you can also target missing (undefined) elements from the Document Tree. As; after, before etc.
• But, with pseudo-class, you can target only the elements not contained in the document tree. New elements cannot be defined.