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:
- The <blockquote> tag is ideal for more extended quotes, while the <q> tag is suitable for shorter quotations, allowing you to incorporate diverse quotes into your webpage effectively.
- The <address> tag serves multiple purposes, including displaying addresses, email addresses, and phone numbers. It's a practical way to distinguish points of contact from standard paragraph tags.
- Use the <ins> tag to underline text representing inserted content and the <del> tag to strike through text indicating deleted content.
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:
- 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.
- 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.
- 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.