How do i make a text wrap inside a div so that even one long word will be wrapped not only nicely spaced words? do i need js to do this?
            Asked
            
        
        
            Active
            
        
            Viewed 1,401 times
        
    3
            
            
        - 
                    Does this answer your question? [How to word wrap text in HTML?](https://stackoverflow.com/questions/1147877/how-to-word-wrap-text-in-html) – luke77 May 18 '20 at 06:46
 
3 Answers
3
            <div style=”word-wrap: break-word”>Here is some content for the div element</div> 
found similar question: How to word wrap text in HTML?
References:
http://www.css3.com/css-word-wrap/
http://www.1keydata.com/css-tutorial/wrap.php
http://bytes.com/topic/html-css/answers/627827-how-wrap-text-css
        Community
        
- 1
 - 1
 
        Dr. Rajesh Rolen
        
- 14,029
 - 41
 - 106
 - 178
 
0
            
            
        using css you can achieve
word-wrap:break-word
Style
div {
    word-wrap: break-word;
}
HTML
<div>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div>
        Harish
        
- 2,311
 - 4
 - 23
 - 28