CodePen

HTML

            
              <a href="youtube.com/foo" data-href-domain="youtube.com">a link to youtube video</a>
            
          
!

CSS

            
              a:after {
    content: " [" attr(data-href-domain) "]";
  }
            
          
!

JS

            
              
            
          
!
999px
Loading ..................