Hannah Graves | Summary Three


HTML/CSS Text & Color


Useful Tags for practical application

When seeking to implement unique styling in your HTML code, consider these helpful tags to enhance the presentation of your text:


Navigating CSS's Color Palette

When incorporating color into your website design, it's crucial to consider its placement. If the color is intended for the background, utilize the CSS background-color property. Otherwise, for text and other elements, use the color property. Once you've identified the appropriate usage, you can select from three primary color options in CSS:

  1. RGB: This color mode comprises red, green, and blue values, represented as rgb(#,#,#). Each color component ranges from 0 to 255, indicating the intensity of the respective color.
  2. Hex Code: The color hexadecimal code that uses six characters, starting with #, followed by two characters each for red, green, and blue values (#RRGGBB). These values range from 00 to FF, encompassing the full spectrum of colors.
  3. Color Name: CSS offers a library of 147 predefined color names, such as "blue," "gray," "teal," and "pale violet red." These names provide a convenient way to select colors.


CSS HLS/Opacity

When incorporating color into your website design you can take an alternative approach using hls/hlsa. Hls, or hue, lightness, and saturation, are color properties that are an alternative color method. Where hue is a degree on the color wheel 0-360, saturation is a percent, and lightness is a percent where 0= white and 100=black. These three values are grouped like this: hls(0,0%,78%). However, in hlsa, there is alpha, where a is a value 0 to 1.0 for determining transparency to your color selected by hls. However, you can just use opacity: 0.5; in your CSS code or rgba by adding alpha to the end of rgb.