CSS shorthand
Updated: 02/05/2024 by Computer Hope
With HTML color codes, CSS shorthand is a method of shortening a color code with repeating characters. For example, the color code #FFFFFF (white) has three sets of F's, which allows it to be shortened to #FFF. CSS shorthand helps developers quickly write common HTML color codes and keep their CSS (Cascading Style Sheets) code as compact as possible. Below are examples of other CSS shorthand.
- #000 (Black)
- #00F (Blue)
- #6F0 (Bright Green)
- #F3A (Chrome Pink)
- #FFC (Cream)
- #900 (Crimson Red)
- #0FF (Cyan)
- #F7F (Fuchsia Pink)
- #F72 (Indian Saffron)
- #CFF (Light Slate)
- #789 (LightSlateGrey)
- #0F0 (Lime)
- #FF3 (Neon Yellow)
- #7D7 (Pastel Green)
- #CCF (Periwinkle)
- #639 (RebeccaPurple)
- #600 (Red Blood)
- #F00 (Red color code)
- #C60 (Sedona)
- #FFF (White)
- #FF0 (Yellow)
- #F0F (Magenta)