HTML Lists
There are three kinds of lists:
- ordered list: <ol> and <li>
- unordered list: <ul> and <li>
- definition list: <dl>, <dt>, and <dd>
CSS Boxes
In the eyes of CSS, each HTML element has its own box. We can use CSS to do many modifications to these boxes. There are the things that we can do:
- chaning the dimensions: width and height
- limiting the dimensions: min-width, max-width, min-height, and max-height
- overflowing the content: overflow
- changing the way to wrap the box: border, margin, and padding
- changing the border: border-width, border-style, and border-color
- align the content: text-align
- hiding the box: visibility
JavaScript
Arrays
An array is a special type of variable, which stroes a list of values. To create an array is similar to create a variable, except using a pair of square brackets to wrap arround the assigned values. Accessing the items of an array by calling its corresponding index.
Loops
Loops offer a quick and easy way to do something repeatedly.
for loop
A for loop repeats until a specified condition evaluates to false. A for loop looks like this:
- for (initialExpression; conditionExpression; incrementExpression){statement}
When a for loop executes, the following occurs:d
- The initializing expression is executed
- The condition Expression is evaluated, if the value of condition is false, the for loop terminates
- The statement executes
- The increment expression is executed
- Control returns to step 2
while loop
A while loop executes its statements as long as a specified condition evaluates to true. A while loop looks as follow:
- while (condition){statement}
If the condition becomes false, statement within the loop stops executing and control passes to the statement following the loop. The condition test occurs before statement in the loop is executed. If the condition returns true, statement is executed and the condition is tested again