Using ::after, ::before selector in element style to add contents - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:before

Description

Using ::after, ::before selector in element style to add contents

Demo Code

ResultView the demo in separate window

<!doctype html>
<html>
 <head> 
  <title>My Web Page</title> 
  <style>
#aa:after {<!--from w  ww.  ja  va 2 s  .  co  m-->
   content:'world';
}
</style> 
 </head> 
 <body> 
  <span id="aa">hello</span>  
 </body>
</html>

Related Tutorials