HTML Table and List
HTML Table and List
Table Tag
• The table tag displays information in rows and
columns.
• The <table> tag is a container tag
Table structure
Rows
Row 2 - Col 1
Row 1, 2, 3 & 4 - Col 4
Row 3 - Col 1 Row 2, 3 & 4 - Col 2 & 3
Row 4 - Col 1
• An unordered list starts with the <ul> tag. Each list item
starts with the <li> tag.
• The list items will be marked with bullets (small black
circles) by default:
• Example
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Type Property
Value Description
Home
Aboutus
Amity University:
Registration
Contactus
@CopyRight
Example-1
<!DOCTYPE html>
<html>
<body>
<ol type="1">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Description Lists
Attribute Description
action Backend script ready to process your passed data.
method Method to be used to upload data. The most frequently used are GET
and POST methods.
target Specify the target window or frame where the result of the script will be
displayed. It takes values like _blank, _self, _parent etc.
enctype You can use the enctype attribute to specify how the browser encodes
the data before it sends it to the server. Possible values are −
application/x-www-form-urlencoded − This is the standard method
most forms use in simple scenarios.
mutlipart/form-data − This is used when you want to upload binary data
in the form of files like image, word file etc.
Form Controls
1 submit
This creates a button that automatically submits a form.
2 reset
This creates a button that automatically resets form
controls to their initial values.
3 button
This creates a button that is used to trigger a client-side
script when the user clicks that button.
4 image
This creates a clickable button but we can use an image
as background of the button.
Example
<!DOCTYPE html>
<html>
<head>
<title>Multiple-Line Input Control</title>
</head>
<body>
<form>
<input type = "submit" name = "submit" value = "Submit" />
<input type = "reset" name = "reset" value = "Reset" />
<input type = "button" name = "ok" value = "OK" />
<input type = "image" name = "imagebutton" src = "/html/images/logo.png" />
</form>
</body>
</html>
Date,Color,Email,number,range,
<!DOCTYPE html>
<html>
<head>
<title>Multiple-Line Input Control</title>
</head>
<body>
<form>
<input type="color" name="favcolor">
<input type="date" name="bday">
<input type="email" name="email">
<input type="number" name="quantity" min="1" max="5">
<input type="range" name="points" min="0" max="10">
<input type="tel" name="usrtel">
</form>
</body>
</html>