HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> div{ width: 80px; padding: 10px; margin-bottom: 25px; line-height: 1.8; border:1px solid #8c8c8c; hyphens: none; -webkit-hyphens: none; -ms-hyphens: none; } </style> </head> <body> <h1>CSS hyphens property</h1> <div> An extra­ordinary piece of work! </div> <button onclick="myFunction()">Click Me</button> <script> var x = document.getElementsByTagName("div")[0]; function myFunction(){ x.style.hyphens = "manual"; x.style.Webkithyphens = "manual"; x.style.mshyphens = "manual"; } </script> <p><strong>Note</strong>: Click on the button to change 'hyphens' from none to manual.</p> </body> </html>
OUTPUT
×

Save as Private