reading-notes

HTML

HTML Questions

  1. When should you use an unordered list in your HTML doc?
    • when the order of the list doesn’t matter or do not have a numerical ordering.
  2. How do you change the bullet style of unordered list items?
    • in the CSS via the list-style-type property as a circle, dot, or a square.
  3. Whe should you use an ordered list vs an unordered list in your HTML doc?
    • <ol> for when the order matters, like a recipe or something. <ul> for when the order is not numerically important.
  4. Describe two ways you can change the numbers on list items provided by an ordered list.
    • reversed : boolean attribute specifies the list’s items are in reverse order; numbered high to low. * start : integer to start counting from; always an Arabic numberal (1,2,3…) * type : sets the numbering type: a lowercase letters, A uppercase, i lowercase roman numerals, I uppercase roman numerals

Learn CSS Questions

  1. Describe the CSS properties of margin and padding as characters in a story. What is their role in a story titled: “The Box Model”?
    • Padding sits around the outside of the box content in order to keep the content from getting squished or overrun with weeds.
    • Border wraps the content and any padding, almost like a fence, and keeps the wild things out and the safe things in.
  2. List and describe the parts of an HTML elements box as referred to by the box model
    • Content box: The area where your content is displayed; size it using properties like inline-size and block-size or width and height.
    • Padding box: The padding sits around the content as white space; size it using padding and related properties.
    • Border box: The border box wraps the content and any padding; size it using border and related properties.
    • Margin box: The margin is the outermost layer, wrapping the content, padding, and border as whitespace between this box and other elements; size it using margin and related properties.
    • retrieved from here

Learn JS

  1. What data types can you stor inside of an array?
    • strings, numbers, objects, and even other arrays. Data types can also be mixed…but maybe wait to do that…
  2. Is the people array a valid JS array? If so, how can I access the values stored? If not, why?
    • Yes, it contains strings and numbers. You can access the values with commands like for...of or map() or variable[0] = Johnson to change the first item in the array
  3. List the five shorthand operators for assignment in javascript and describe what they do.
    • x = f(); x += f(); x -= f(); x *= f(); x /= f()
  4. Read the code below and evaluate the last expression and explain what the result would be and why.
    • 10 false dog
  5. Describe a real world example of when a conditional statement should be used in a JS program.
    • one cookie or two…water or milk…true or false…
  6. Give an example of when a loop is useful in JavaScript.
    • Loops are useful for evaluating user inputs that query arrays and other things.