- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
CSS hyphens Property
The hyphens property is used to specify how words are to be hyphenated when text wraps across multiple lines. It has the following values −
hyphens: none|manual|auto|initial|inherit;
Example
<!DOCTYPE html> <html> <head> <style> div { width: 50px; border: 2px dashed red; } .demo { -webkit-hyphens: manual; -ms-hyphens: manual; hyphens: manual; } </style> </head> <body> <h1>Demo Heading</h1> <h2>hyphens: manual property value</h2> <div class="demo">This is a demo text.</div> </body> </html>
Output
Example
Let us now see another example −
<!DOCTYPE html> <html> <head> <style> div { width: 50px; border: 2px dashed red; color: blue; } .demo { -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } </style> </head> <body> <h1>Demo Heading</h1> <h2>hyphens: auto property value</h2> <div class="demo">This isssssss a demo text.</div> </body> </html>
Output
- Related Articles
- Adding Hyphens to Text with the CSS hyphens Property
- How to remove hyphens using MySQL UPDATE?
- CSS padding property
- CSS outline property
- CSS height property
- CSS width property
- CSS order property
- CSS all Property
- CSS quotes Property
- CSS pitch property
- Orphans CSS Property
- CSS azimuth Property
- CSS stress property
- CSS background property
- CSS pause property

Advertisements