Skip to content

Instantly share code, notes, and snippets.

@davidbecker6081
Last active April 27, 2017 19:45
Show Gist options
  • Save davidbecker6081/d826d3cb01d6687be99b851fa7edee07 to your computer and use it in GitHub Desktop.
Save davidbecker6081/d826d3cb01d6687be99b851fa7edee07 to your computer and use it in GitHub Desktop.
Prework Day 3 - David Becker

#Prework Day 3 Chapter 7

  1. If you're using an input element in a form, what attribute controls the behavior of that input?
    • the type attribute controls the behavior of the input (type = "checkbox")
  2. What element is used to create a dropdown list?
    • <select>with <option> elements
  3. If you're using an input element to send form data to a server, what should the type attribute be set to?
    • It depends on what is being inputed into the form. If we have text, then it would be <type="text"> or passwords: <type="password">
  4. What element is used to group similar form items together?
    • <fieldset> , which can contain a <legend> element as well for a caption

Chapter 13 + 15

  1. Describe the differences between border, margin, and padding.
    • Border- separates the edge of one box from another, Margin- refers to edge just outside the border (creates gaps between borders of two adjacent boxes), Padding- space between the border of a box and any content contained within the box
  2. For a CSS rule padding: 1px 2px 5px 10px, what sides of the content box does each pixel value correspond to?
    • Refers to sides in a clockwise order: top, right, bottom, left
  3. Descirbe the different between block-level and inline elements.
    • block level elements take up their own line, while inline elements flow between surrounding text/ block elements are the main building blocks of a layout/ block elements can be contained inside other block elements (the outside block is known as the containing or parent element)
  4. What is the role of fixed positioning, and why is z-index important in the scenario of using foxed positioning?
    • Fixed positioning positions an element in relation to the browser window, so when a user scrolls, the element stays in the same place on the browser window/ the z-index allows us to prevent overlapping elements by stacking context (sort of like 'bring to front' feature), the higher the index the more importance it holds in seeing it for overlapped elements
  5. What is the difference between a fixed and liquid layout?
    • fixed layout - do not change size as the user increases or decreases the size of their window (tend to use pixels) / liquid layout - increase or decrease as the browser window size is changed (tend to use percentages or em)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment