Site icon i2tutorials

CSS Word Wrap(break)

CSS Word Wrap(break)

 

This property is used to break the long words and wrap onto the next line.

 

CSS Word Wrap Values:

 

 

Example:

 

<!DOCTYPE html> 
<html> 
<head> 
<style>  
p.test { 
  width: 11em;   
  border: 1px solid red; 
  padding:10px;
  word-wrap: break-word; 
} 
</style> 
</head> 
<body> 
<p class="test"> enter text here ,,,,,,,,,,,,,,,................... .  paragraph start here ......</p> 
</body> 
</html>

 

OUTPUT:

 

 

 

Exit mobile version