Lecture 3 - HTML - Links Table & List
Lecture 3 - HTML - Links Table & List
& TABLE
LINK
The syntax of creating an anchor:
<a href="url">Text to be displayed</a>
The <a> tag is used to create an anchor to link from, the href
attribute is used to address the document to link to, and the
words between the open and close of the anchor tag will be
displayed as a hyperlink.
This anchor defines a link to a website:
<a href=“http://www.google.com”>Visit Google</a>
These anchors defines a link to a document
<a href=“hello.html”>hello.html file</a>
<a href=
“http://www.w3schools.com/html/html_links.asp”>Learn
HTML Link</a>
LINK
LINK
Using Image as anchor:
Instead of writing the label of the link,
sometimes you might want to use an image
to link to other pages. Here is the example:
<html>
<head><title></title>
</head>
<body>
</html>
LIST
There are two types of list tag namely:
Unordered list
Ordered list
Unordered list has the following format:
<ul> Other methods: Output:
<li> text </li> <ul type= “disc”> •
<li> text </li> <ul type= “square”> ▪
</ul> <ul type= “circle”> o
UNORDERED LIST
Web 2.0 Applications
<ul>
<li> Blog</li>
<li> Social network </li>
</ul>
CASCADED UNORDERED LIST
Web 2.0 Phenomenon
<ul>
<li> Social Networking
Websites
</li>
<ul>
<li> Facebook </li>
<li> Twitter </li>
</ul>
<li> Wikis </li>
<li> Blog </li>
<ul>
<li> Photoblog</li>
<ul>
<li>Photopages</li></ul>
<li> Videoblog </li>
</ul>
</ul>
ORDERED LIST
Other methods:
<ol> <ol type= “A”>
<li> text </li> <ol type= “a”>
<li> text </li> <ol type= “I”>
</ol> <ol type= “i”>
<OL>
Educational websites:
<ol>
<li> www.w3schools.com
</li>
<li> www.javascript.com
</li>
<li> www.aspeasy.com</li>
</ol>
<OL>
Brands of Laptop:
<ol type="A">
<li> Dell </li>
<li> Toshiba </li>
<li> Acer </li>
</ol>
<ol type="i">
<li> Compaq </li>
<li> Lenovo </li>
<li> Apple Macbook </li>
</ol>
TABLE
<TABLE>
<TR><TD>Text </TD></TR>
</TABLE>
Form elements are elements that allow the user to enter information (like text
fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a
form.
<form>
<input>
</input>
</form>
Form Attributes
Attribute Description
name Name of the form
method Define the way data will be
transferred. Values accepted are
GET and POST.
action The address or page of which
data will be sent and processed.
The above example creates a form section with the name register. Data
will be sent using Post method to formprocess.asp
Form
POST method will send data through ‘document’
which is hidden from the user.
GET method will attach the data given by the user to
the destination URL.
Form Elements
Method Tag
Textbox <input type= "text">
Radio Button <input type= "radio">
Check Box <input type= "checkbox">
Hidden <input type= "hidden">
Text area <textarea>..</textarea>
List down box <select>..</select>
Password <input type= "password">
When any text is written in this type of input box, ‘*’ will
appear.
Textbox, Radio Button, Check Box
Property Description
type Define the type of Input. Acceptable values include text,
hidden, radio, reset or submit.
<select name="Age">
<option value="19">19 years old
<option value="20">20 years old
<option value="21">21 years old
</select>
<select name="Age">
<option>19 years old
<option>20 years old
<option>21 years old</select>