Lec. 5 HTML CSS Lists, Tables and Containers - Copy - 1bf80d4212115d0f4b770c174ba
Lec. 5 HTML CSS Lists, Tables and Containers - Copy - 1bf80d4212115d0f4b770c174ba
Zahraa
Ayad
Internet Programming
Lecture 5
HTML & CSS Lists, Tables and
Containers
14 November 2023 1
by Asst. Lect. Zahraa
Ayad
Outlines
HTML Lists
Ordered List
Unordered List
Definition List
Styling Lists
HTML Tables
Styling Tables
Styling Containers
14 November 2023 2
by Asst. Lect. Zahraa
Ayad
HTML Lists
There are three Types of HTML Lists:
1. Ordered lists are lists where each item in the list is numbered. For example, the
list might be a set of steps for a recipe that must be performed in order.
2. Unordered lists are lists that begin with a bullet point (rather than characters that
indicate order).
3. Def inition lists are made up of a set of terms along with the def initions for each of
those terms.
14 November 2023 3
by Asst. Lect. Zahraa
Ayad
Ordered Lists
The <ol> Element
Each item in the list is placed between an opening <li> tag and a closing </li> tag.
14 November 2023 4
by Asst. Lect. Zahraa
Ayad
14 November 2023 5
by Asst. Lect. Zahraa
Ayad
Unordered Lists
The <ul> Element
Each item in the list is placed between an opening <li> tag and a closing </li> tag.
14 November 2023 6
by Asst. Lect. Zahraa
Ayad
14 November 2023 7
by Asst. Lect. Zahraa
Ayad
14 November 2023 8
by Asst. Lect. Zahraa
Ayad
14 November 2023 9
by Asst. Lect. Zahraa
Ayad
Styling Lists
We can change the style of ordered and unordered lists by using the following CSS
properties:
1. list-style-type
14 November 2023 10
by Asst. Lect. Zahraa
Ayad
14 November 2023 11
by Asst. Lect. Zahraa
Ayad
HTML Tables
The <table> Element
The <table> element is used to create a table. The contents of the table are written out
row by row.
14 November 2023 12
by Asst. Lect. Zahraa
Ayad
Example: <td colspan=“2”> indicates that the cell should run across two columns.
Example: <td rowspan=“3”> indicates that the cell should run across three rows.
14 November 2023 13
by Asst. Lect. Zahraa
Ayad
14 November 2023 14
by Asst. Lect. Zahraa
Ayad
14 November 2023 15
by Asst. Lect. Zahraa
Ayad
Styling Tables
We can add styling to tables by using the following CSS properties :
Possible values: 5px 20px 5px 20px (to specify a different value for each
one (Syntax padding: top right bottom left;)
14 November 2023 16
by Asst. Lect. Zahraa
Ayad
1. border: Possible values: none, 1px solid black, 5px dotted red, 10px dashed green
(Syntax border: thickness style color;)
14 November 2023 17
by Asst. Lect. Zahraa
Ayad
14 November 2023 18
by Asst. Lect. Zahraa
Ayad
14 November 2023 19
by Asst. Lect. Zahraa
Ayad
The <div> element is used to group HTML elements for styling purposes.
14 November 2023 20
by Asst. Lect. Zahraa
Ayad
14 November 2023 21
by Asst. Lect. Zahraa
Ayad
14 November 2023 22
by Asst. Lect. Zahraa
Ayad
14 November 2023 23
by Asst. Lect. Zahraa
Ayad
14 November 2023 24
by Asst. Lect. Zahraa
Ayad
3. We can apply other styling properties to <div> container like border, margin, padding , etc.
14 November 2023 25
by Asst. Lect. Zahraa
Ayad
14 November 2023 26
by Asst. Lect. Zahraa
Ayad
End of Lecture 5
14 November 2023 27