CSS controls line wrapping, Word breaking

Source: Internet
Author: User

The Word-break property specifies how the wrap is handled.

Word-break:normal | Break-all | Keep-all;

Normal: Use the browser's default line-wrapping rule.

Break-all: Allows lines to be folded within a word.

Keep-all: can only wrap at half-width spaces or hyphens.

 <  div  style  = "Word-break:break-all;"  >  JavaScript, a direct-to-speech programming language, is a dynamic type, a weak type, a prototype-based, built-in support category. Its direct translator is called the JavaScript engine, and as part of the browser, it is widely used in the client's foot language, which was first used on the HTML Web page to add an animation to the HTML page. However, JavaScript can now also be used for Web servers, such as node. js. JavaScript (/?d?ɑ?v?? skr?pt/; JS) is a dynamic computer programming language.  [5] It is most commonly used as part of the Web browsers, whose implementations allow client-side scripts to interact with the User, control the browser, communicate asynchronously, and alter the document content is displayed. [5] It is also used in Server-side network programming with frameworks such as node. JS, game development and the creation of desktop and mobile applications. </ div  >  

The Word-wrap property allows long words or URL addresses to wrap to the next line.

Word-wrap:normal | Break-word;

Normal: The browser handles line breaks at hyphenation points by default.

Break-word: Wraps inside a long word or URL address.

The White-space property sets how to handle whitespace within an element.

White-space:normal | Pre | nowrap | Pre-wrap | Pre-line | Inherit

Normal: By default, whitespace is ignored by the browser.

Pre: The blank will be reserved by the browser. It behaves like a pre tag in HTML.

NoWrap: Text does not wrap, text continues on the same line until a BR tag is encountered.

Pre-wrap: Preserves a sequence of whitespace characters, but wraps normally.

Pre-line: Merges a sequence of whitespace characters, but preserves newline characters.

Inherit: Inherits the value of the White-space property from the parent element.

<style= "width:100px; white-space:nowrap;" >     Normal: By default, whitespace is ignored by the browser.    pre: The blank will be reserved by the browser.  It behaves like a pre tag in HTML.    nowrap: Text does not wrap, text continues on the same line until a BR tag is encountered.    pre-wrap: Preserves a sequence of whitespace characters, but wraps normally.    pre-line: Merges a sequence of whitespace characters, but preserves newline characters.    inherit: Inherits the value of the White-space property from the parent element.  </div>

CSS controls line wrapping, Word breaking

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.