White-spacing part 1

CSS Fundamentals
Working with Text
white-spacing
84
1/2
         

The white-space Property



The white-space property specifies how white-space inside an element is handled. The values can be set as normalinheritnowrap, etc. 

The nowrap value makes the text continue on the same line until a <br> tag is encountered, and also collapses all sequences of whitespace into a single whitespace.

The HTML:<p>
This paragraph has multiple spaces and
a line break, but it will be ignored, as we used the nowrap value.
</p>

The CSS:
p {
white-space: nowrap;
}
Try It Yourself

Result:
The text will continue on the same line until a <br /> tag is encountered.

Comments

Popular posts from this blog

font-family part 1