0% found this document useful (0 votes)
5 views9 pages

Lec 04

The lecture discusses the use of HTML tables for organizing tabular data, highlighting features like cell spanning with colspan and rowspan attributes. It also covers the creation of forms in HTML, detailing the action and method attributes for processing user input. Various technologies for processing web forms, such as PHP, ASP.NET, and Ruby on Rails, are mentioned.

Uploaded by

zkryaalhsany411
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views9 pages

Lec 04

The lecture discusses the use of HTML tables for organizing tabular data, highlighting features like cell spanning with colspan and rowspan attributes. It also covers the creation of forms in HTML, detailing the action and method attributes for processing user input. Various technologies for processing web forms, such as PHP, ASP.NET, and Ruby on Rails, are mentioned.

Uploaded by

zkryaalhsany411
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

2024-11-09

Lecture 4

Tables and forms

Dr. Mohammed Shobail

How tables are used


✓ HTML tables were created for instances when you need to add tabular
material (data arranged into rows and columns) to a web page.
✓ Tables may be used to organize calendars, schedules, statistics, or other
types of information.
✓ A table cell may contain any sort of information, including
numbers, text elements, and even images and multimedia objects.
✓ In HTML5, tables do not have lines between the rows or between
the columns
- We can add those with Cascading Style Sheets.

1
2024-11-09

Table
table column
table header

row

cell

Table

2
2024-11-09

Using HTML tags

Example

3
2024-11-09

spanning Cells
✓ One fundamental feature of table structure is cell
spanning, which is the stretching of a cell to cover
several rows or columns.
✓ You make a header or data cell span by adding the
following attributes:
– colspan, or
– rowspan

Column spans
✓ Column spans, created with the colspan attribute in the
td or th element, stretch a cell to the right to span over
the subsequent columns

4
2024-11-09

Row spans
✓ Row spans, created with the rowspan attribute, work
just like column spans, but they cause the cell to span
downward over several rows.

Table caption
✓ Tables are given titles with the <caption> tag, which
can immediately follow <table>
<table>
<caption> Fruit Juice Drinks
</caption>
<tr>
<th> </th>
<th> Apple </th>
<th> Orange </th>
<th> Screwdriver </th>
</tr>
<tr>
<th> Breakfast </th>
<td> 0 </td>
<td> 1 </td>
<td> 0 </td>
</tr>
<tr>
<th> Lunch </th>
2016-2017 <td> 1 </td> 10
<td> 0 </td>
<td> 0 </td>
</tr>
</table>

5
2024-11-09

Forms
✓ A form is the usual way information is gotten from a
browser user to a server
✓ HTML has tags to create a collection of objects that
implement this information gathering
– The objects are called widgets or controls or
components

11

How Forms Work

12

6
2024-11-09

The form Element

13

The action attribute


✓ The action attribute provides the location (URL) of the
application or script (sometimes called the action page) that will be used
to process the form.
<form action="/mailinglist.php “ method="post">...</form>
<form action="/mailinglist.asp “ method="post">...</form>

<form action="/mailinglist.jsp “ method="post">...</form>

14

7
2024-11-09

✓ Web forms may be processed using one of the following technologies:


– PHP (.php) is an open source scripting language most commonly used with the
Apache web server.
– Microsoft’s ASP.NET (Active Server Pages) (.asp) is a programming
environment for the Microsoft Internet Information Server (IIS).
– Ruby on Rails. Ruby is the programming language that is used with the Rails
platform. Many popular web applications are built with it.
– JavaServer Pages (.jsp) is a Java-based technology similar to ASP. Python is a
popular scripting language for web and server applications.

15

The method attribute


✓ The method attribute specifies how the information should be sent to the
server. For example

✓ When the browser encodes that information for its trip to the server,
it looks like this.

✓ If the form method is GET this query string will be sent through the URL,
while if the form method is POST it will be sent through the HTTP protocol.

16

8
2024-11-09

You might also like