Lesson 5
Lesson 5
Learning Outcomes:
After completion of this lesson, the learner will be able to create web tables on a given
guideline and create lists according to the information structure.
Lesson Outline:
• Table properties
Borders, Background, column width, row height, span etc.
• Page divisions and structuring methods
• List types
Ordered, unordered, numbered, and other types of lists
• Information grouping and div tags
• Multimedia insertion and page designing.
<td> - Table data cell, data of any cell enclosed in these tags.
<table border = “xxx”> - border attribute assign the visible thickness of the table border.
<table width = “xxx”> - width attribute assign the width of the table where it can be relative
measurement or absolute measurement.
Let’s see an exercise how the above elements can be used to create a very basic table.
Implement the above html code and observe the following output.
Table rows can be grouped into a head <thead>, foot <tfoot>, and body <tbody> sections of a
table. Row groups convey additional structural information. When very long tables are printed
on sheets, the head and foot information may be repeated on each page that contains table
data.
• Element colgroup
Groups columns
• Element col
The following code provide a usage of the above tags in a web page with additional
components such as including images. Perform the following exercise and observe the output
given below in the figure 5.2.
The output of the above code can be seen on the following figure 5.2.
If you have study and perform according to the video tutorials given in above activity, you will
know how to manipulate tables with expression web IDE. Further to the given instructions, the
followings are some directions to use in expression web.
• To add a cell to a table
– Place the insertion point in the cell next to where you want to add a cell.
– On the Table menu, point to Insert, and then click Cell to the Left or Cell to the
Right.
• To add a row to a table
– Place the insertion point in the row above or below the row that you want to
add.
– On the Table menu, point to Insert, and then click Rows or Columns.
– Click Rows, and then type or select the number of rows you want to add.
– Under Location, specify if you want to place the row above or below the selected
row.
• To add a column to a table
– Place the insertion point in the column next to where you want to add a column.
– On the Table menu, point to Insert, and then click Rows or Columns.
– Click Columns, and then type or select the number of columns you want to add.
– Under Location, specify if you want to place the column to the right or left of the
selected column.
• To split cells in a table
– Right-click the cell that you want to split, point to modify, and then click Split
Cells.
– Click Split into columns or Split into rows.
– In the Number of columns or Number of rows field, type the number of columns
or rows that you want to split the cell into.
• To merge cells in a table
– Select a row, column, or group of adjacent cells.
– Right-click, point to Modify, and then click Merge Cells.
HTML provides web designers a several options for specifying lists of information. All lists must
contain one or more list elements. Lists may contain:
Unordered information
Ordered information
Definitions
<ul> − An unordered list. This will list items using plain bullets.
<ol> − An ordered list. This will use different schemes of numbers to list your items.
<dl> − A definition list. This arranges your items in the same way as they are arranged in a
dictionary.
An unordered list is a collection of related items that have no special order or sequence. This
list is created by using HTML <ul> tag. Each item in the list is marked with a bullet.
The following code provide a brief description of the usage of an unordered list.
<!DOCTYPE html>
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul>
<li>Colombo</li>
<li>Matara</li>
<li>Galle</li>
<li>Kalutara</li>
</ul>
</body>
<html>
Try the above code and observe the view of unordered list. You can use type attribute for <ul>
tag to specify the type of bullet you like. By default, it is a disc. Following are the possible
options:
<ul type = "square">
<ul type = "disc">
<ul type = "circle">
Modify the above code to view different types of bullets as given above.
Web designers are given option to put items in a numbered list instead of bulleted, for this
purpose HTML ordered list are used. This list is created by using <ol> tag. The numbering starts
at one and is incremented by one for each successive ordered list element tagged with <li>.
The following code shows an application of an ordered list.
<!DOCTYPE html>
<html>
<head>
<title>HTML ordered List</title>
</head>
<body>
<ol>
<li>Colombo</li>
<li>Matara</li>
<li>Galle</li>
<li>Kalutara</li>
</ol>
</body>
<html>
Try the above code to view an ordered list where the default order generate the index 1, 2, 3 .. .
Here by using type attribute for <ol> tag, you can specify the type of numbering. By default, it is
a number. Following are the possible options:
Modify the above coding to view different types of indexing options given above.
5.2.3 Definition List
HTML and XHTML supports a list style which is called definition lists where entries are listed like
in a dictionary or encyclopedia. The definition list is the ideal way to present a glossary, list of
terms, or other name/value list.
<!DOCTYPE html>
<html>
<head>
<title>Definition List</title>
</head>
<body>
<dl>
<dt><b>HTML</b></dt>
<dd>This stands for Hyper Text Markup Language</dd>
<dt><b>HTTP</b></dt>
<dd>This stands for Hyper Text Transfer Protocol</dd>
</dl>
</body>
</html>
The <div> tag defines a division or a section in an HTML document. The <div> tag is often used
as a container for other HTML elements to style them separately or to perform certain tasks
with client side script which you are going to learn later.
By investigating through the following example, you will be able to understand the applicability
of div tag for structuring a web content.
<html>
<head>
<title> Div example </title>
</head>
<body>