Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
/* Pseudo-class: targets the element in a state */ .btn:hover { background: darkblue; } li:first-child { font-weight: bold; } /* Pseudo-element: creates or targets a sub-part */ .btn::after { content: " →"; } p::first-line { font-variant: small-caps; } /* Key rule: pseudo-elements use ::, pseudo-classes use : */
Result
Open