/* the first letter of each word will have a regular size */.mnspan::first-letter{font-size:1rem;}/* the words in the middle (not first or last) will have a font-size of 0 */.mnspan:not(:first-child):not(:last-child){font-size:0;display:inline-block;}/* add a . at the end of each shortened word */.mnspan:not(:first-child):not(:last-child)::after{content:".";font-size:1rem;}
Wrap each word in a span, and add the class "mn" to the container.
Live demo on CodePen.
CSS
Wrap each word in a
span
, and add the class "mn" to the container.Live demo on CodePen.
If you select-and-copy the names, the full name is copied instead of the shortened one.
I also did a JavaScript version on that same demo: