0% found this document useful (0 votes)
5 views

HTML3

The document explains the rowspan and colspan attributes in HTML, which allow table cells to span multiple rows or columns, respectively. It also introduces the <colgroup> tag for grouping columns and applying styles, and discusses the deprecated size attribute of the <hr> element for controlling thickness. Examples are provided to illustrate each concept in the context of HTML tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

HTML3

The document explains the rowspan and colspan attributes in HTML, which allow table cells to span multiple rows or columns, respectively. It also introduces the <colgroup> tag for grouping columns and applying styles, and discusses the deprecated size attribute of the <hr> element for controlling thickness. Examples are provided to illustrate each concept in the context of HTML tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Click to edit Master title style

HTML
Introduction

1
HTML Spantitle style
Click to edit Master

The rowspan attribute


• in HTML specifies the number of rows a cell should span. That is if a row spans two rows, it means it will take up
the space of two rows in that table. It allows the single table cell to span the height of more than one cell or row. It
provides the same functionality as “merge cell” in a spreadsheet program like Excel.

<td rowspan = "value">table content...</td>

2 2
Click to edit Master title style

<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Juan</td>
<!-- This cell will take up space on
two rows -->
<td rowspan="2">24</td>
</tr>
<tr>
<td>Tamad</td>
</tr>
</table>

3 3
HTML
Click to edit Master title style

4 4
Click
HTML to colspan
edit Master title style
Attribute
The colspan attribute in HTML specifies the number
of columns a cell should span. It allows the single
table cell to span the width of more than one cell or
column. It provides the same functionality as “merge
cell” in a spreadsheet program like Excel.

<td colspan = "value">table content...</td>

5 5
Click to edit Master title style
<table>
<tr>
<th colspan="2">Expense</th>
</tr>

<tr>
<td>Juan</td>
<td>$10</td>

</tr>

<tr>
<td colspan="">John</td>
<td>$8</td>

</tr>

</table>

6 6
Click
HTML to colgroup
edit MasterAttribute
title style

The <colgroup> tag in HTML is used to group


one or more <col> elements, allowing you to
apply styles or attributes (such as width) to
entire columns in a <table>.

<td colgroup = "value">table content...</td>

7 7
<table>
Click to edit Master title style
<colgroup>
<col span="2"
style="background-color: green; color: white" />
<col style="background-color: gray" />
</colgroup>
<tr>
<th>STUDENT</th>
<th>COURSE</th>
<th>AGE</th>
</tr>
<tr>
<td>Pepito Manaluto</td>
<td>Comp Scie</td>
<td>19</td>
</tr>
<tr>
<td>Pedring</td>
<td>IT</td>
<td>23</td>
</tr>
</table>
8 8
Click to edit Master title style
HTML <hr> size Attribute

HTML <hr> element’s size attribute defines the


height (thickness) of the horizontal rule. It accepts
numerical values that specify the pixel height.
However, this attribute is deprecated in HTML5, and
it’s recommended to use CSS for controlling the
height of <hr> elements.​
9
9
Click to edit Master title style
<body style="text-align:center;">
<h1>IT </h1>
<hr>

</body>

1010

You might also like