Skip to the content.

HTML Lists, Control Flow with JS, and the CSS Box Model

HTML Lists

  1. Ordered lists: numbered.
  2. Unordered lists: without nmbers.
  3. Definition lists: it lists definitions.

Note: you can use list inside another list.

Control Flow with JavaScript

Control flow is the order that the computer uses to excute a code. The code is generally excuted from the first to the last line orderly, but in some cases there are loopes and conditions that controles how the the computer sees the code and which lines it sees first.

Controle flow

Arrays are variables that can store pieces of related information.

Switch statments compares a value with more than one possible outcome, and it also has a default option if no outcome matched.

Loops is a method to do some operations repeatedly, like multiplying 3 by 7 for 12 times, and sometimes it depends on a condition. Some loops types in JavaScript:

Loops

CSS Boxes

CSS sees every HTML element as a seperated box, and it can control the size and dimentions of the box, such as:

CSS can also transfer the block level boxes to inline boxes and the inline boxes to block level boxes using: