w3school change color of text in same line code example Example 1: css change text color p{ color: White; } Example 2: text color css .YourClass { color: #ff0000; }