Any ideas for CSS Sentence Case?


I’d like CSS to transform lower case text into Sentence Case so that the start of each sentence after a full stop is a capital letter. CSS does not appear to have this option…all I can find is:

text-transform: uppercase
text-transform: lowercase
text-transform: capitalize
text-transform: none

and obviously none of these do the job. I have also looked at:

p:first-letter {text-transform: capitalize}

But this only works for the begining of paragraphs not sentences…

Any new ideas out there?


CSS isn’t able to transform text into sentence case at this time.

If you think about it, it is quite a difficult thing to do. It means that CSS would have to be able to understand all of the many grammatical rules of sentence structure - if the only place a letter is supposed to be capitalized was after a period then it would be pretty simple. But that isn’t the case :frowning:

I’d look for some sort of sentence case JavaScript if it is something you really need.

OK, I suppose lots of great minds have thought about it…but to my mind sentence case just means simply start a sentence with a capital letter after a full stop…anyway how has Microsoft invoked it in MS Word 2003?

If I have the following in Word 2003:
the cat. the dog. the queen.
then Sentence Case changes it to:
The cat. The dog. The queen.

What else is sentence case apart from that…I may be missing something…