Skip to the content.

Class-04

HTML

HTML links allow the user to navigate and switch between pages and other websites. There are few types of links that are used in HTML, they all share the same concept however each one of them has a different use.

links

  1. Linking to Other Sites this type is used to move the user to another websites by clicking on the link text.
  2. Linking to Other Pages on the Same Site this type is used to move the user to another webpage on the same websites by clicking on the link text, and it is better to use relative links rather than URLs.
  3. Email Links this type is used to open email programs with an email address, by clicking on the link text.

CSS

In order to control the position of an HTML elements, CSS define each element as if it has its own box. The box would be either:

  1. Block-level box it create a “block” or “box”, browsers typically display the block-level element with a new line. It may contain inline elements and other block-level elements. It also create “larger” structure than inline elements. The best practice of it in: <h1> <p> <ul> <li>.

  2. Inline box it flow in between surrounding text. The best practice of it in:<img> <b> <i>

The image below illustrate each one of them. dd


JavaScript

In order to know how to code with JavaScript we have to define the most important aspect in this language which is the funcitons. JavaScript functions are reusable blocks of code that perform a specific task, taking some form of input and returning an output. To define a function, we must use the function keyword, followed by a name, followed by parentheses ( ). Then we have to write the function logic between curly brackets { }. For example :

JS function

Function expressions:

Functions can also be created by a function expression. Such a function can be anonymous; it does not have to have a name. For example, the function square could have been defined as:

expression

Calling functions:

Calling the function is the last step to execute the function and it actually performs the specified actions with the indicated parameters ( ).

Functions are great for efficiency - you can define it one time and then use it multiple times, as needed. You don’t have to rewrite the same or similar code over and over again. JavaScript functions also allow you to plug in different inputs, or arguments, to get different results, based on the information you are working with. Using JavaScript functions saves a lot of time and makes your code less cumbersome.


Pair programming

Pair programming involves two roles: the Driver and the Navigator. The Driver is the main programmer who is writing the code. The Navigator monitor and evaluate the Driver work in order to guide him/her without any direct contact to the computer. The Navigator foucs on seeing the big picture, The Driver is more attentive to details. ` The benefit of Pair Programming is:

  1. Greater efficiency
  2. Engaged collaboration
  3. Learning from fellow students
  4. Social skills
  5. Job interview readiness
  6. Work environment readiness