Text - C S S

  • color: white; => Changes color of text by name of color
    • color: rgb(255, 255, 255); => RGB value between 0 to 255
    • color: rgb(255 255 255);
    • color: rgb(100% 100% 100%);
    • color: rgba(255, 255, 255, 1); => RGBA = red, green, blue, alpha
    • color: rgb(255 255 255 / 0.5);
    • color: hsl(360 100% 100%); => First value defines the degree to turn, it can be anything
    • color: hsla(360, 100%, 100%, 1); => HSLA = hue, saturation, lightness, alpha
    • color: #ffggbb; => HEX value
  • font-size: 5px; => Changes the size of text by using pixel value
    • font-size: calc(0.75em + 1vmin);
    • font-size : clamp(2rem, 10vw, 5rem); => 1st argument is minimum, 2nd is preferred, 3rd is maximum size
  • font-weight: 100/bold/bolder/normal;
  • font-style: italic;
  • font-family: sans-serif ariel;
  • text-align: left/right/center;
  • text-decoration: none/underline; => Used to remove decoration from anchor tag
  • text-transform: capitalize/uppercase;
  • line-height: 2; => Space between lines
Share: