reading-notes

This Repo required for Asac labs class 2


Project maintained by ManarAbdelkarim Hosted on GitHub Pages — Theme by mattgraham

Read: 09 - Forms and Events

Chapter 7: “Forms”

What is form?

Forms are used to collect the user input details and process it via servers.Most of the websites use the login form to collect users informationThe best known form on the web is probably the search box that sits right in the middle of Google’s homepage In addition to enabling users to search, forms also allow users to perform other functions online. You will see forms when registering as a member of a website, when shopping online, and when signing up for newsletters or mailing lists.

e.i:

 <form>

 <input type="radio" name="status" value="Married" checked> Married<br>

 <input type="radio" name="status" value="Single"> Single<br>

 <input type="radio" name="status" value="Widow"> Widow 

 </form>
Married
Single
Widow
First Name:

Last Name:



Example for Submit Button

First Name:

Last Name


summary:

Chapter 14: “Lists, Tables & Forms”

Table:

The HTML <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.

tbody:

The HTML Table Body element (<tbody>) encapsulates a set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>).

tfoot :

The HTML <tfoot> element defines a set of rows summarizing the columns of the table.

thead:

The HTML <thead> element defines a set of rows defining the head of the columns of the table.

tr :

The HTML <tr> element defines a row of cells in a table. The row’s cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.

td:

The HTML <td> element defines a cell of a table that contains data. It participates in the table model.

 <html>
  
   <head>
  
   <style>
  
   table,
  
   td {
  
       border: 1px solid #333;
   }
  
   thead,
  
   tfoot {
  
       background-color: #333;
  
       color: #fff;
   }
  
   </style>
  
   </head>
  
   <table>
  
       <thead>
  
           <tr>
  
               <th colspan="2">The table header</th>
  
           </tr>
  
       </thead>
  
       <tbody>
  
           <tr>
  
               <td>The table body</td>
  
               <td>with two columns</td>
  
           </tr>
  
       </tbody>
  
   </table>
  
   </html>
The table header
The table body with two columns

Events:

what are Events?

DIFFERENT EVENT TYPES Here is a selection of the events that occur in the browser while you are browsing the web. Any of these events can be used to trigger a function in your JavaScript code. UIEVENTS Occur when a user interacts with the browser’s user interface (UI) rather than the web page