reading-note

html elements


There are lots of occasions when we

need to use lists. HTML provides us with

three different types:


The CSS Box Model

In CSS, the term “box model” is used when talking about design and layout.

The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content. The image below illustrates the box model: css box Explanation of the different parts:


JavaScript Loops

Loops are handy, if you want to run the same code over and over again, each time with a different value.

Often this is the case when working with arrays: Instead of writing: text += cars[0] + “
”; text += cars[1] + “
”; text += cars[2] + “
”; text += cars[3] + “
”; text += cars[4] + “
”; text += cars[5] + “
”; You can write: var i; for (i = 0; i < cars.length; i++) { text += cars[i] + “
”; }

Different Kinds of Loops

JavaScript supports different kinds of loops: