HTML LISTS:
There are Three Types of HTML Lists:
- Ordered Lists are created using “ol” tags, and each list item lies between “li” tags.
- Unordered Lists are created using “ul” tags, and each list item lies between “li” tags.
- Definition Lists are lists that include terms along with their definitions, and are created using “d1” tags; such that the “dt” tags include the terms and the “dd” tags include the definitions.
Lists can be nested; a list/lits can be created inside another list
CSS BOXES:
- In CSS, each element is viewed as if it is a box.
- Box Dimentions (Height,Width)
height: 300px; width: 300px; OR height: 75%; width: 75%;
- Limiting Width “min-width, max-width”
- Limiting Height “min-Height, max-Height”
- Overflowing content can be either hidden or scrolled.
- Border, Margin & Padding, are three properties that control the appearance of the box.
- Content can be centered using the text-align property.
- Boxes can be hidden or visible using the visibility property.
-
CSS3 has introduced the ability to create image borders and rounded borders
-
Block-level boxes can be made into inline boxes, and inline boxes made into block-level boxes.
JS Control Flow
ARRAYS
- arrays are multi-value variable, where you can store “related’ data, of same or different type.
- Syntax: var arrayName = [element1, element2, …];
- each element in an array has an index that refers to its postion in the array.
- index numbering starts from 0.
- length property returns the number of items in an array.
- in order to call an element in an array, use this arrayName[index of the element]
DECISIONS & LOOPS
-
IF/IF ELSE statements is used to enable the code to make decisions based on a condition. Such that when the condition returns a true value a certain block of code is executed, and when it returns a false value another block of code is executed.
-
SWITCH statement shows a series of possible cases/values for a certain variable, along with the blocks of code that should be executed for each case.
-
Truthy Values are treated as if they are true, and Falsy Values are treated as if they are false.
-
Loops (For/While/Do While) are used when we want to execute a certain block of code repeatedly; for more than one time.