0

eg.: if the source text is mixed or improper:

here is a string of text for a title

The linguisitcally correct capitalizing is:

Here is a String of Text for a Title

Using text-transform: capitalize will result in:

Here Is A String Of Text For A Title

Is there any CSS property and/or value that can be applied to transform text into the proper English title case?

  • 1
    I think there is no such thing in css, there are solutions in javascript or ruby. The code isnt long. Ruby version: https://github.com/samaaron/titlecase-rb/blob/master/title_case.rb – sonic Jan 10 '20 at 16:28

1 Answers1

0

Unfortunately there is presently no way to title case text with CSS. However there are lots of options for doing so via JavaScript: Convert string to title case with JavaScript

Gary Kupczak
  • 77
  • 1
  • 2
  • 8