How To Wrap Text With CSS Tutorial

preview_player
Показать описание
In this tutorial, you'll learn a couple of ways of how to wrap text with CSS including supporting older browsers and wrapping when the text only when it overflows out of the containing element.

So in this HTML CSS tutorial you'll see how we can use a couple of CSS properties to make sure long words in your text gets wrapped or broken up across two lines.

So in CSS or rather CSS3 the properties can be applied to any HTML (or HTML5) element but it's most common to use this kind of technique on paragraph tags although you're not limited to these.

There is also the ability to wrap your text in CSS only if the containing HTML element is made so small that any particularly long words are wrapped only if they overflow the containing element.

There's no JavaScript involved in this technique, just a couple of CSS properties that i'll take you through in the video.

So I hope you enjoy this CSS Howtos video and if you have the need to wrap text for any reason, you can use this CSS tutorial to handle long words in your HTML elements.

#CSS #CSSTutorial #CSSHowtos Channel Handle @codebubb
Рекомендации по теме
Комментарии
Автор

Thank you! I literally spent an hour trying to find the correct CSS property to make my webpage responsive, and "word-break: break-all" was the exact property I was looking for.

alienedbla
Автор

If I want to wrap text around an image, then I would use floats right?

tmayush
Автор

I got a task for a todo list app where they wanted a single list to be of more than 1000 words. So i used word break property

mudassirsayed