HTML Lists and Tables
HTML Lists and Tables
HTML Lists and Tables
HTML
By
Mamata Pandey
Lists
HTML lists allow web developers to group a set of related items in lists
HTML offers three ways for specifying lists of information
• <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.
All lists must contain one or more list elements within <li></li> tags
Unordered List
<ul> Vegetables
<li>Beetroot</li>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ul>
Type attribute of <ul> tag
You can use type attribute for <ul> tag to specify the type of bullet you like
You can use start attribute for <ol> tag to specify the starting point of
numbering you need.
Example:
<ol type = "1" start = "4"> - Numerals starts with 4
<ol type = "I" start = "4"> - Numerals starts with IV
<ol type = "i" start = "4"> - Numerals starts with iv
<ol type = "a" start = "4"> - Letters starts with d
<ol type = "A" start = "4"> - Letters starts with D
Definition List
HTML 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
Definition List makes use of following three tags
<dl>
<dt><b>HTML:</b></dt><dd>Hyper Text Markup Language</dd>
<dt><b>HTTP</b></dt><dd>Hyper Text Transfer Protocol</dd>
</dl>
Tables
The HTML tables allow web authors to arrange data like text, images, links,
other tables, etc. into rows and columns of cells
border pixels Specifies the border width. A value of "0" means no border.
cellpadding pixels or % Specifies the space between the cell borders and their contents.
<tr>
<th rowspan=“2”>Roll No</th>
<th colspan =“3”>Name
<th colspan=“5”>Marks
</tr>
Thank You