Category: 3. CSS Selectors

  • CSS ::after Pseudo Element

    In CSS, ::after creates a pseudo-element that is the selected element’s last child. It is a generated content element that adds any kind of content after the content. It can be used to insert any kind of content, including characters, strings of text, and images. The value is defined by the content property. By default, the ::after pseudo-element is inline. It…

  • CSS :active Pseudo Class

    The :active pseudo-class is used to select and style the active link or any other element. It is activated by user. An element becomes active when the user clicks on the link or the element and presses down the mouse button. The :active pseudo-class is used on the <a> and <button> elements. This pseudo-class also targets the elements containing an activated element, and…

  • CSS * Selector

    The * (asterisk) selector selects all elements in a document. The * selector can also select all elements inside another element. Version CSS2 Universal Selector Syntax Example of the * selector: Example of the * selector for a <div>  element: