Teachnique
      CourseRoadmaps
      Login

      IntroductionSyntaxSelectorsInclusionMeasurement UnitsColorsBackgroundsFontsTextImagesLinksTablesBordersBorder BlockBorder InlineMarginsListsPaddingCursorOutlinesDimensionScrollbarsInline BlockDropdownsVisibilityOverflowClearfixFloatArrowsResizeQuotesOrderPositionHyphensHoverDisplayFocusZoomTranslateHeightHyphenate CharacterWidthOpacityZ-IndexBottomNavbarOverlayFormsAlignIconsImage GalleryCommentsLoadersAttr SelectorsCombinatorsRootBox ModelCountersClipWriting ModeUnicode-bidimin-contentAllInsetIsolationOverscrollJustify ItemsJustify SelfTab SizePointer EventsPlace ContentPlace ItemsPlace SelfMax Block SizeMin Block SizeMix Blend ModeMax Inline SizeMin Inline SizeOffsetAccent ColorUser Select

      GridGrid LayoutFlexboxVisibilityPositioningLayersPseudo ClassesPseudo Elements@ RulesText EffectsPaged MediaPrintingLayoutsValidationsImage SpritesImportantData Types

      TutorialRounded CornerBorder ImagesMulti BackgroundColorGradientsBox ShadowBox Decoration BreakCaret ColorText ShadowText2d transform3d transformTransitionAnimationMulti columnsBox SizingTooltipsButtonsPaginationVariablesMedia QueriesFunctionsMath FunctionsMaskingShapesStyle ImagesSpecificityCustom Properties

      IntroductionViewportGrid ViewMedia QueriesImagesVideosFrameworks

      Questions and AnswersQuick GuideReferencesColor ReferencesWeb browser ReferencesWeb safe fontsUnitsAnimation

      PX to EM converterColor Chooser & Animation

      Useful ResourcesDiscussion

      Feedback

      Submit request if you have any questions.

      Course
      Hyphenate Character

      CSS Tutorial

      This CSS tutorial is designed for beginners to navigate through the essentials and intricate aspects of CSS styling. Upon finishing this tutorial, participants will possess a comprehensive understanding of CSS, setting a solid foundation for further exploration and mastery. This guide aims to equip you with the skills necessary to transform your visions into visually appealing web designs, laying the groundwork for your journey towards becoming an accomplished web designer.

      hyphenate-character

      CSS hyphenate-character property allows you to specify the character that should be used as the hyphenation point when text is hyphenated using the hyphens property.
      When text is hyphenated, the browser will insert a hyphen character at appropriate points within words to improve the visual appearance of justified text. The hyphenate-character property allows you to customize the character used for hyphenation.

      Possible Values

      • <string> − It is used as a <string> at the end of the line before a hyphenation break.
      • auto − Default value. The user-agent determines a suitable string based on the typographic conventions of the content language. Explicit setting is required to override an inherited value.

      Applies To

      All elements.

      Syntax

      hyphenate-character: <string> | auto;
      It allows a specific string to replace with hyphen, and instructs the user agent to choose suitable string based on typographic conventions (default).

      CSS hyphenate-character - auto Value

      The following example demonstrates the hyphenate-character: auto property allowing automatic hyphenation in the content of the specified element
      <html>
      <head>
      <style>
      div {
      width: 80px;
      border: 2px solid blue;
      hyphens: auto;
      hyphenate-character: auto;
      }
      </style>
      </head>
      <body>
      <div>CSS hyphenate­character auto</div>
      </body>
      </html>

      CSS hyphenate-character - <string> Value

      The following example demonstrates the hyphenate-character property, with different hyphenation characters showing the different effects of the hyphenation behavior
      <html>
      <head>
      <style>
      div {
      width: 80px;
      border: 2px solid blue;
      hyphens: auto;
      }
      .box1 {
      hyphenate-character: "=";
      }
      .box2 {
      hyphenate-character: "*";
      }
      .box3 {
      hyphenate-character: "%";
      }
      </style>
      </head>
      <body>
      <h3>hyphenate-character: "="</h3>
      <div class="box1">CSS hyphenate­character auto</div>
      <h3>hyphenate-character: "*"</h3>
      <div class="box2">CSS hyphenate­character auto</div>
      <h3>hyphenate-character: "%"</h3>
      <div class="box3">CSS hyphenate­character auto</div>
      </body>
      </html>
      Print Page