CodePen

HTML

            
              <div id="js">my-domain.com</div>
            
          
!

CSS

            
              div{ text-align: center; margin: 2em auto; }
            
          
!

JS

            
              document.getElementById( 'js' ).innerHTML = 'my<br>-domain<br>.com';
            
          
!
999px
Loading ..................