CSS Text Effects


CSS is the mechanism for incorporating style into various web documents. Text Effects enables us to apply various types of effects to text in an HTML document.

Some CSS properties that can be used to add effects to text are listed below:

  • text-overflow
  • word-wrap
  • word-break
  • writing-mode

1. text-overflow: 

The CSS Text overflow property is used to limit text that is wider than its parent. It aids in defining how to represent the portion of overflowing text that is not visible to the user.

Example

Preview

2. word-wrap:

When a word is too long to fit within its parent container, the CSS word-wrap property specifies whether the browser is allowed to line break within it. When a word is too long to fit within a given space, it expands outside of it.

Example

Preview

3. word-break:

The phrase-break The CSS property determines whether or not line breaks appear wherever text would otherwise overflow its content box. It specifies the rules for breaking lines.

Example

Preview

4. writing-mode:

The CSS writing-mode property determines whether text lines are displayed horizontally or vertically.

Example

Preview