Horje
Explain the use of the hyphens Property in CSS

The hyphens Property in CSS is used to control the hyphenation of text within an element. It allows you to specify how words should be hyphenated when they extend beyond the width of their container, improving the visual appearance of justified text.

Note: The hyphens property can take values like none, manual, and auto.

Syntax:

/* Disabling hyphenation */
p {
  hyphens: none;
}

/* Enabling automatic hyphenation */
.article {
  hyphens: auto;
  lang: en;      /* Language code for English */
}

Features:

The features of hyphens property are as follows:

  • none: It disables hyphenation.
  • manual: It suggests hyphenation points using soft hyphens (­), allowing manual control.
  • auto: It enables automatic hyphenation based on language rules.



Reffered: https://www.geeksforgeeks.org


CSS

Related
What is the use of the user-select Property? What is the use of the user-select Property?
How to make Inline-Level element into Block-Level Element? How to make Inline-Level element into Block-Level Element?
How to style Placeholder Text in an Input Field ? How to style Placeholder Text in an Input Field ?
How to implement the counter-reset Property in CSS ? How to implement the counter-reset Property in CSS ?
How to apply a Filter to an Image in CSS ? How to apply a Filter to an Image in CSS ?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
12