0% found this document useful (0 votes)
11 views4 pages

Practical No17table1

The document provides instructions for creating a webpage that displays a first-year timetable using HTML tables. It explains the structure of HTML tables, including the use of <table>, <tr>, <td>, <th>, <caption>, <thead>, <tbody>, <tfoot>, <col>, and <colgroup> tags, along with the attributes colspan and rowspan. An example table is provided to illustrate how to effectively use these elements and attributes.

Uploaded by

poojalandge1295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Practical No17table1

The document provides instructions for creating a webpage that displays a first-year timetable using HTML tables. It explains the structure of HTML tables, including the use of <table>, <tr>, <td>, <th>, <caption>, <thead>, <tbody>, <tfoot>, <col>, and <colgroup> tags, along with the attributes colspan and rowspan. An example table is provided to illustrate how to effectively use these elements and attributes.

Uploaded by

poojalandge1295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Practical no:-17

Practical title: Create a webpage that displays first year timetable. Make effective use of row span and
cols pan attributes. Make use of tag too.

Theory:-

An HTML Table is an arrangement of data in rows and columns in tabular format. Tables are useful for
various tasks, such as presenting text information and numerical data. A table is a useful tool for quickly
and easily finding connections between different types of data. Tables are also used to create databases.

1. Tables are define in <table> tag.


2. A table is divided into rows <tr> and each row is divided into data cells <td> which is the content
of a data cell.
3. A data cell can contain text,images,list,parapgraph,forms,horizontal rule, table etc.
Syntax of table:-

<table>

<tr>

<td> content</td>

<td> content </td>

<td> content </td>

</tr>

</table>

HTML Tags Descriptions

Defines the structure


for organizing data in
<table>
rows and columns
within a web page.

Represents
a row within an HTML
<tr>
table, containing
individual cells.

<th> Shows a
table header cell that
typically holds titles or
HTML Tags Descriptions

headings.

Represents a
standard data cell,
<td>
holding content or
data.

Provides a title or
<caption> description for the
entire table.

Defines the header


section of a table,
<thead>
often containing
column labels.

Represents the main


content area of a
<tbody> table, separating it
from the header or
footer.

Specifies the footer


section of a table,
<tfoot>
typically holding
summaries or totals.

Defines attributes for


table columns that
<col> can be applied to
multiple columns at
once.

Groups together a set


of columns in a table
<colgroup> to which you can apply
formatting or
properties collectively.
HTML Table with colspan
If you want to make a cell span more than one column, you can use the
colspan attribute.

It will divide one cell/row into multiple columns, and the number of columns
depend on the value of colspan attribute.

HTML Table with rowspan


If you want to make a cell span more than one row, you can use the rowspan
attribute.

It will divide a cell into multiple rows. The number of divided rows will
depend on rowspan values.

Example:-

<table>

<caption>Employee details</caption>

<tr>

<th>Name</th>

<th colspan="2">Jobs</th>

<th>Working Experience</th>

</tr>

<tr>

<td>John</td>

<td>Software Engineer</td>

<td>Data Analyst</td>

<td rowspan="2" >5 Years</td>

</tr>

<tr>

<td>Ale</td>

<td colspan="2">Senior Web developer</td>


<td>2 Year</td>

</tr>

<tr>

<td>Jack</td>

<td>Junior Tech Writer</td>

<td>Blogger</td>

<td>6 Months</td>

</tr>

</table>

Conclusion:-

You might also like