CSS1 - intro to web development

Cards (22)

  • To include a style sheet in an HTML file, we use the link element. <link> is a self-closing empty element and it goes inside the head element.
  • To know what kind of file to include, the opening link tag needs the rel attribute set using rel="stylesheet"
  • We specify which element to style with a tag selector which is any tag u want to
  • We can use the body selector if we want a style to apply to the entire page
  • Background-color for background
  • Font-family: for fonts
  • Color: for the color of the font
  • If we want to select one or more elements, we can set a class attribute for the exact elements we want to change.
  • If we want to style a specific element, we can include an id selector
  • To change how big text is, we use the font-size property.
  • To set the type of font for an element, start by adding the font-family property.
  • To bold the text of an element, we use the font-weight property and set the value to bold.
  • To change the height of an element, we use the height property.
  • To change the width of an element, we use the width property.
  • We use the border property to add borders on our elements
  • To make the border appear, we set the value to solid.
  • border-radius is a property that rounds the corners of an element.
  • Any element has four paddings counted clockwise from top to right, to bottom, to left.
  • Paddings generate space between the content and the border of an element.
  • To change the alignment of the content, we use the text-align property.
  • Margins generate space around an element, outside of any paddings and borders.
  • CSS is the acronym of “Cascading Style Sheets”.