Unit-2.2 HTML Tables - Frames
Unit-2.2 HTML Tables - Frames
Prepared by
Dr Komarasamy G
Associate Professor (Grade-2)
School of Computing Science and Engineering
VIT Bhopal University
Unit-2 HTML and CSS
HTML5 Basics – Formatting – Colors – Images
– Links – Tables – Lists – Layout –
Forms–Canvas –Media.
CSS3 Basics – Selectors - Box Model -
Backgrounds and Borders -Text Effects –
Advanced Features.
HTML Image
• HTML img tag is used to display image on the web page. HTML
img tag is an empty tag that contains attributes only, closing tags
are not used in HTML image element.
• Let's see an example of HTML image.
• <h2>HTML Image Example</h2>
• <img src="good_morning.jpg" alt="Good Morning Friends"/>
HTML tags
HTML Table
• HTML table tag is used to display data in tabular form (row *
column). There can be many columns in a row.
• HTML tables are used to manage the layout of the page e.g.
header section, navigation bar, body content, footer section etc.
But it is recommended to use div tag over table to manage the
layout of the page .
HTML Table tags
Tag Description
<table> It defines a table.
<tr> It defines a row in a table.
<th> It defines a header cell in a table.
<td> It defines a cell in a table.
<caption> It defines the table caption.
<colgroup> It specifies a group of one or more columns in a table for
formatting.
<col> It is used with <colgroup> element to specify column
properties for each column.
<tbody> It is used to group the body content in a table.
<html>
<body>
<table>
<tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr>
<tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr>
<tr><td>James</td><td>William</td><td>80</td></tr>
<tr><td>Swati</td><td>Sironi</td><td>82</td></tr>
<tr><td>Chetna</td><td>Singh</td><td>72</td></tr>
</table>
</body>
First_Name Last_Name Marks
</html>
Sonoo Jaiswal 60
James William 80
Swati Sironi 82
Chetna Singh 72
HTML tags
<html>
<body>
<table border="1">
<tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr>
<tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr>
<tr><td>James</td><td>William</td><td>80</td></tr>
<tr><td>Swati</td><td>Sironi</td><td>82</td></tr>
<tr><td>Chetna</td><td>Singh</td><td>72</td></tr>
</table>
</body>
</html>
HTML tags
Example
<form>
First name:<br>
<input type="text" name="firstname"><br>
Last name:<br>
<input type="text" name="lastname">
</form>
HTML forms
Example
<form>
<input type="radio" name="gender" value="male" checked> Male<br>
<input type="radio" name="gender" value="female"> Female<br>
<input type="radio" name="gender" value="other"> Other
</form>
HTML forms
Notes on POST:
• POST has no size limitations, and can be used to send large
amounts of data.
• Form submissions with POST cannot be bookmarked
HTML forms
Grouping Form Data with <fieldset>
• The <fieldset> element is used to group related data in a form.
• The <legend> element defines a caption for
the <fieldset> element.
The <select> Element
The <select> Element
Visible Values:
Use the size attribute to specify the number of visible values:
Text Area