How to word wrap text in HTML

0 votes
How can text like aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa which exceeds the width of a div (say 200px) be wrapped?

I am open to any kind of solution such as CSS, jQuery, etc.
Aug 3, 2022 in HTML by Ashwini
• 5,430 points
869 views

1 answer to this question.

0 votes

Try this:

div {
    width: 200px;
    word-wrap: break-word;
}
answered Aug 4, 2022 by Deepak
• 980 points

Related Questions In HTML

0 votes
0 answers

How to insert spaces/tabs in text using HTML/CSS

how to add space in HTML except ...READ MORE

Jun 3, 2022 in HTML by Tejashwini
• 3,820 points
189 views
0 votes
0 answers

How to create a vertical line in HTML?

I need to create a vertical line ...READ MORE

Jul 4, 2022 in HTML by Tejashwini
• 3,820 points
336 views
0 votes
0 answers

How to remove a underline from a link in HTML?

how to remove the underline from a ...READ MORE

Jul 5, 2022 in HTML by Tejashwini
• 3,820 points
360 views
0 votes
0 answers

How to create nested table in html ?

I need to make an HTML table ...READ MORE

Jul 8, 2022 in HTML by Tejashwini
• 3,820 points
365 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
9,492 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
2,517 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,360 points
659 views
0 votes
1 answer

What is the difference between span and div?

The div should be used to wrap sections of ...READ MORE

answered Jan 16, 2020 in Web Development by Niraj

edited Jan 21, 2020 by Niroj 3,153 views
0 votes
1 answer

how to use font awesome icons in HTML

First, you have to write this in ...READ MORE

answered Aug 4, 2022 in HTML by Deepak
• 980 points
1,517 views
0 votes
1 answer

How to add/update an attribute to an HTML element using JavaScript?

You can read here about the behaviour of attributes ...READ MORE

answered Aug 4, 2022 in HTML by Deepak
• 980 points
358 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP