Add content to an element with :before for text-decoration to generate content - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Add content to an element with :before for text-decoration to generate content

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
a {<!--from w  ww  .  j ava  2 s  .c o  m-->
   text-decoration:underline;
}

span:before {
   content:">";
}
</style> 
 </head> 
 <body> 
  <span> <a href="#">a link</a> </span>  
 </body>
</html>

Related Tutorials