reading-notes

https://mrobeidat.github.io/reading-notes/


HTML Lists

* Their types:

  • Ordered lists : created with the (ol)element and In this type, the list items are numbered with upper case roman numbers. In this type, the list items are numbered with lower case roman numbers. In this type, the list items are numbered with upper case letters.

  • unordered list :created with the (ul) element and these are sometimes called bulleted lists because the default visual appearance of an unordered list is to have small bullet icons in front of the list items. This type of list is best used when the order of the items isn’t salient.

HTML Boxes

* Box dimentions (Height and width)

The box-dimention property allows us to include the padding and border in an element’s total width and height. If you set box-sizing: border-box; on an element, padding and border are included in the width and height: Both divs are the same size now!

  • Over flowing content

The overflow property specifies what should happen if content overflows an element’s box. This property specifies whether to clip content or to add scrollbars when an element’s content is too big to fit in a specified area. Note: The overflow property only works for block elements with a specified height.

## Border, Margin, and padding

Every box has three available properties that can be adjusted to control its appearance which are (border ,margin and padding) and all of them do a almost the similar job.

!{}(https://blog.hubspot.com/hs-fs/hubfs/Google%20Drive%20Integration/Update%20css%20margin%20vs%20padding-2.png?width=650&name=Update%20css%20margin%20vs%20padding-2.png)

  • Change In-line Block display

A block-level element always starts on a new line. A block-level element always takes up the full width available (stretches out to the left and right as far as it can). A block level element has a top and a bottom margin, whereas an inline element does not. The <div> element is a block-level element.

  • CSS3 Border images

If you don’t want the border applied to the last (when using background-position: right; ) or first (for background-position: left; ) element in your menu then try the :last-child and :first-child selectors. You can set custom border size. Top, left and bottom will be 0px and set a border-image

  • Box Shadows

The box-shadow property allows you to add a drop shadow around a box. It works just like the text-shadow property.

And there are many features for the CSS that you can check online !



Javascript ARRAYS

In JavaScript, array is a single variable that is used to store different elements. It is often used when we want to store list of elements and access them by a single variable.

  • How to make an array?

  1. You must declare a variable of the desired array type.
  2. You must allocate the memory that will hold the array using new, and assign it to the array variable. Therefor, in Java all arrays are dynamically allocated.

  • IF.. Else statement

In Java, the if…else statement is a control flow statement that allows you to execute a block of code only if a certain condition is met.

  • SWITCH STATEMENTS

It’s a multi-way branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression. Basically, the expression can be byte, short, char, and int primitive data types.

  • TRUTHY & FALSY VALUES

Truthy values are values that evaluate to True in a boolean context. Falsy values are values that evaluate to False in a boolean context. Falsy values include empty sequences (lists, tuples, strings, dictionaries, sets), zero in every numeric type, None , and False .

  • Loops :

There are three types of loop: for, while, and

do … while. Each repeats a set of statements.

Loops are control structures used to repeat a given section of code a certain number of times or until a particular condition is met. Visual Basic has three main types of loops: for.. next loops, do loops and while loops.

  • KEY LOOP CONCEPTS

For ex : First step In for loop, initialization happens first and only one time, which means that the initialization part of for loop only executes once. Second step: Condition in for loop is evaluated on each iteration, if the condition is true then the statements inside for loop body gets executed.