readingnotes

View project on GitHub

Read3:

Lists on HTML:

  • < ol > The ordered list is created with the < ol > element.
  • Each item in the list is placed between an opening < li > tag and a closing < /li > tag. (The li stands for list item.)
  • The unordered list is created with the < ul > element.
  • < li > Each item in the list is placed between an opening < li > tag and a closing < /li > tag. (The li stands for list item.)
  • < dl > The definition list is created with the < dl > element and usually consists of a series of terms and their definitions.
  • < dt > This is used to contain the term being defined (the definition term).
  • < dd > This is used to contain the definition.

Css :

Boxes:

  • Block-level boxes can be made into inline boxes, and inline boxes made into block-level boxes. Boxes

Borders:

  • border:You can control the style of a border using the border-style property.(solid,dotted,dashed,groove,ridge,inset,outset,hidden/none)
  • The border property allows you to specify the width, style and color of a border in one property (and the values should be coded in that specific order).

#### Margin:

  • The margin property controls the gap between boxes. Its value is commonly given in pixels, although you may also use percentages or ems. If one box sits on top of another,margins are collapsed , which means the larger of the two margins will be used and the smaller will be disregarded.

#### Text-align:

  • The text-align property is inherited by child elements. You therefore also need to specify the text-align property on the centered box if you do not want the text inside it to be centered.

note: image sorces: w3school.

Javascript:

  • 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.
  • Here you can see that an if … e 1 se statement allows you to provide two sets of code: 1. one set if the condition evaluates to true 2. another set if the condition is false.
  • switch statements allow you to compare a value against possible outcomes (and also provides a default option if none match).
  • There are three types of loop: for, while, and do …while. Each repeats a set of statements.
  • Loops check a condition. if it returns true, acode block while run. then condition will be checked again and if still returns true,the code block while run again. it repeats until the condition returns false.(for:if you need to run code specific number of times ,while: if you don’t now how many times the code should run,do while: it will always run the statments inside the curly braces at least once even if the condition evaluate to false)