Web Design: Lecturer Dr. Mohand Lokman Ahmad Class Symbol: Oa6o7sx
Web Design: Lecturer Dr. Mohand Lokman Ahmad Class Symbol: Oa6o7sx
lecture 3
Lecturer
Dr. Mohand Lokman Ahmad
Class symbol: oa6o7sx
Links
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
<tr>
</tr>
</table>
cells that take up two columns
<table border="1">
<tr>
<th>Category</th>
<th colspan="3">Examples</th>
</tr>
<tr>
<td>Fruits</td>
<td>Apples</td>
<td>Oranges</td>
<td>Grapes</td>
</tr>
</table>
cells that take up two rows
<table border="1">
<tr>
<th>Department:</th>
<td>Accounting</td>
</tr>
<tr>
<th rowspan="2">Contact Person:</th>
<td>Freya Olsen</td>
</tr>
<tr>
<td>Maita Cot</td>
</tr>
</table>
cellpadding
<table border="1“ cellpadding="10">
<tr>
<td>This cell is padded. </td>
<td>This cell is padded too. </td>
</tr>
<tr>
<td>The world is round.</td>
<td>The sky is grey.</td>
</tr>
</table>
HTML Forms
HTML forms provide a great way to capture data from your web site. A form in an HTML page can be
used to submit data to a server for further processing.
The <form> tag has several attributes that would tell the browser what to do with the information that is
entered in the different fields. These attributes are:
• action
• Method
The action attribute tells your browser the location of the script that you are going to use to process the
form. On the other hand, the method attribute has two possible values, method=get or method=post, both
of which specify a method of submitting data to the script you have specified in the action attribute.
When you use the post method, the form data is packaged as part of an HTTP request and isn’t visible in
the browser. Because of that the submission is more secure than it is when you use the “get” method.
the input element
• text
• Input with attribute type=“text”. This gives the <html>
user to enter only a line of text. <head>
<title></title>
</head>
<body>
• Password <form >
<input type="text"></input>
• Very much like a text field, but this one is </form>
especially earmarked for passwords and other
sensitive data. Whatever you enter into the </body>
password field is masked. </html>
result
• The syntax for a password field is as follows:
<input type="password" >
the input element
<!DOCTYPE html>
• Checkboxes <html>
<head>
• A checkbox is used if you have a <title></title>
</head>
list of choices, a list from which <body>
you want the visitor to select as <form >
many options as possible or let <input type="checkbox" >
Yes, I am interested!
them select none of the choices <input type="checkbox" >No, do not
you provided. contact me.
</form>
</body>
<input type="checkbox" > </html>
the input element
<!DOCTYPE html>
<html>
• Radio Buttons <head>
<title></title>
</head>
• Radio buttons are used when <body>
<form >
you have a set number of <input type="radio" >Yup<br>
<input type="radio" >Nope
</form>
options and you only want to
</body>
let your site's visitor to </html>