Reading: html lists, control flow with js, css box model

Kinds of lists

Ordered

Unordered list

Definition list

Boxes

When you add elements to you webpage they live inside boxes that take up a certain amount of the page. When moving the elements you need to be paying attention to their sizes. Some of the ways you can control the boxes are with properties such as min-width & hight and max-width & hight.

When you make a box it has three properties border, margin, and padding. The border separates the edge of the box to the edge of another box. The margin sits outside the border. The padding is the space between your border and the content in the box.

Examples of box border design with css

Boarder Image

Box shadow

Boarder radius

Decisions and loops

a loop will continue to run until the condition returns false.

Three types of loops

  1. FOR
    • used if you need to run a loop a specific amount of times
    • uses a counter to run the loop a set amount of times. The counter uses a variable for the initialization of the counter then you set a condition for the number of times the counter should be ran and then add a counter to see how many times it has been ran.
  2. WHILE
    • if you do not know how many times the loop will have to run
  3. DO WHILE
    • like the while the loop will run but it will test the statement if condition is false