css change font size according to text length code example Example: css change text size p { font-size: 150% /*px, cm, in, etc.*/; }