Professional Documents
Culture Documents
• Hypertext
• Text with embedded links to text in
the same or another document
• Non-sequential browsing of textual
material
3/8/2021 Web Programming 2
HTML History
specified with the href The target page the visual link in the
(hypertext reference) document
attribute
Week3.html
…
<h2 id="imgSection"> Example Image </h2>
…
<ul>
<li> list item 1 </li>
<li> list item 2 </li>
<li> list item 3 </li>
</ul>
<ol>
<li> list item 1 </li>
<li> list item 2 </li>
<li> list item 3 </li>
</ol>
<table>
<caption> Fruit Juice Drinks </caption>
Table title <!– table content -->
</table>
<table>
<tr>
<th>Name</th>
<th colspan="2">Telephone</th>
</tr>
<tr>
<td>Bill Gates</td>
<td>55577854</td>
<td>55577855</td>
</tr>
</table>
<form>
.
form elements
.
</form>
3/8/2021 Web Programming 22
Form Attributes
• The action attribute defines the action to be performed when the
form is submitted
• Usually, the form data is sent to a file on the server when the user clicks on
the submit button.
• For now, leave it blank (more on this later)
radio
checkbox
submit
input type attribute
file
label for attribute
password
optgroup
select hidden
form opt
textarea value
button
fieldset
legend
• Password – just like text except asterisks are displayed, rather than
the input characters
<form>
<label>Username:<br/>
<input type="text"/><br/>
</label>
<label>Password:<br/>
<input type="password"/><br/>
</label>
</form>
<form>
... form elements ...
<input type="submit" value="Submit">
</form>
<form>
Select grocery item
<select name = "groceries">
<option> milk </option>
<option> bread </option>
<option> eggs </option>
<option> cheese </option>
</select>
</form>
• Use the multiple attribute to allow the user to select more than one
value.
<select name = "groceries" multiple>
3/8/2021 Web Programming 36
Textarea Element <textarea>
• The <textarea> element defines a multi-line input field (a text area).
• The rows attribute specifies the visible
number of lines in a text area.
• The cols attribute specifies the visible
width of a text area.
• Scrolling is implicit if the area is overfilled