we have three type of list
- Numbered lists.
- Bullet lists
- Definition list There are lots of occasions when we need to use lists. HTML provides us with three different types:
The ordered list is created with the ol element.mEach item in the list is placed between an opening li tag and a closing li tag.
The unordered list is created with the ul element.,mEach item in the list is placed between an opening li tag and a closing li tag.
The definition list is created with the dl element and usually consists of a series of terms and their definitions.
You can put a second list inside an li element to create a sublist or nested list.
By default a box is sized just big enough to hold its contents. To set your own dimensions for a box you can use the height and width properties
min-width, max-width
min-height, max-height
The overflow property tells the browser what to do if the content contained within a box is larger than the box itself. It can have one of two values:
- hidden
- scroll
-
border: Every box has a border (even if it is not visible or is specified to be 0 pixels wide). The border separates the edge of one box from another.
-
Margins sit outside the edge of the border. You can set the width of a margin to create a gap between the borders of two adjacent boxes.
-
Padding is the space between the border of a box and any content contained within it. Adding padding can increase the readability of its contents.
thin medium thick
solid dotted dashed double groove inset outset hidden / none and you can color it
visibility has tow attribute hidden visible
An array is a special type of variable. It doesn't just store one value; it stores a list of values. You create an array and give it a name just like you would any other variable (using the var keyword followed by the name of the array). The values are assigned to the array inside a pair of square brackets, and each value is separated by a comma. The values in the array do not need to be the same data type, so you can store a string , a number and a Boolean all in the same array. example var colors; colors ['white', 'black', ' custom'];
Values in an array are accessed as if they are in a numbered list. It is important to know that the numbering of this list starts at zero (not one).
it tries to make sense of the operation rather than report an error. A switch statement starts with a variable called the switch value. Each case indicates a possible value for this variable and the code that should run if the variable matches that value.
If you use a data type JavaScript did not expect, it tries to make sense of the operation rather than report an error.
Because the presence of an object or array can be considered truthy, it is often used to check for the existence of an element within a page.
A for loop is often used to loop through the items in an array. In this example, the scores for each round of a test are stored in an array called scores.
The key difference between a while loop and a do while loop is that the statements in the code block come before the condition. This means that those statements are run once whether or not the condition is met.