Q:
What is the purpose of pseudo-elements?
Answer
Pseudo elements allow the use of the part of element and not the element itself. They are applied to block level element, which is used for the complete block for which the CSS is being written. This allow the subpart of an element to be styled like paragraphs and headings. For example:
selector:pseudo-element {property:value;}
p: first-line {text-transform: lowercase;}
It adds the style to the first line of the code in the paragraph.
View answer
Workspace
Report Error
Discuss