Untitled

Cards (96)

    • CSS stands for Cascading Style Sheets
  • selectors are used to "find" (or select) the HTML elements you want to style.
  • id selector uses the id attribute of an HTML element to select a specific element.
  • universal selector (*) selects all HTML elements on the page.
  • grouping selector selects all the HTML elements with the same style definitions.
  • External styles are defined within the <link> element, inside the <head> section of an HTML page:
  • An internal style sheet may be used if one single HTML page has a unique style.
  • An inline style may be used to apply a unique style for a single element.
  • Comments are used to explain the code, and may help when you edit the source code at a later date.
  • A CSS comment is placed inside the <style> element, and starts with /* and ends with */
  • From the HTML tutorial, you learned that you can add comments to your HTML source by using the <!--...-->syntax.
  • An RGB color value represents RED, GREEN, and BLUE light sources.
  • Shades of gray are often defined using equal values for all the 3 light sources:
  • In CSS, a color can be specified using a hexadecimal value in the form:
    #rrggbb
  • In CSS, a color can be specified using hue, saturation, and lightness (HSL) in the form:
    hsl(hue, saturation, lightness)
  • Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue.
  • Saturation is a percentage value. 0% means a shade of gray, and 100% is the full color.
  • Lightness is also a percentage. 0% is black, 50% is neither light or dark, 100% is white
  • The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (not transparent at all)
  • The background-color property specifies the background color of an element.
  • The opacity property specifies the opacity/transparency of an element. It can take a value from 0.0 - 1.0. The lower value, the more transparent
  • The background-image property specifies an image to use as the background of an element.
  • If the image above is repeated only horizontally (background-repeat: repeat-x;)
  • To repeat an image vertically, set background-repeat: repeat-y;
  • The background-position property is used to specify the position of the background image
  • The background-attachment property specifies whether the background image should scroll or be fixed
  • The background Sets all the background properties in one declaration
  • Background-origin Specifies where the background image(s) is/are positioned
  • Background-clip Specifies the painting area of the background
  • CSS border properties allow you to specify the style, width, and color of an element's border.
  • border-style property specifies what kind of border to display.
  • The border-width property specifies the width of the four borders.
  • The border-color property is used to set the color of the four borders.
  • The border-radius property is used to add rounded borders to an element:
  • The CSS margin properties are used to create space around elements, outside of any defined borders.
  • Padding is used to create space around an element's content, inside of any defined borders.
  • The CSS height and width properties are used to set the height and width of an element.
  • The CSS max-width property is used to set the maximum width of an element.
    • inherit - The height/width will be inherited from its parent value
    • initial - Sets the height/width to its default value