asp.net.ph

Skip Navigation LinksAbakada: Back to Basics > Language References > CSS Properties > Pseudo-Classes > after Pseudo-class

::after Pseudo-class


Represents a child pseudo-element immediately after the originating element’s actual content.

Syntax

selector::after { content: value;
   property: value; }

Possible Values

property Any valid CSS property.
value Any of the range of values available to the corresponding property.

Remarks

The ::after pseudo-class generates a pseudo-element that is the last child of the selected element.

It is often used to add custom content to an element via the content property, such as icons, tooltips, or other cosmetic decoration.

The syntax for using the ::after pseudo-class is straightforward. A selector immediately precedes the pseudo-class.

For example, to add content after the selected element:

.cool::after { content: url( "/shared/images/cool.gif" ) }

Example

The following demonstrates use of the ::after pseudo-class in an embedded stylesheet to add content after an element.

External References

See Also

::before



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note