HTML
v HTML:
-
Ø HTML stands for Hyper Text Markup Language.
Ø It is a standard language which
is used to design static web pages using a markup language.
Ø HTML is the combination of Hypertext
and Markup language.
·
Hypertext
defines the link between the web pages.
·
A markup
language is used to define the text document within tag which defines the
structure of web pages.
Ø Most of the markup languages
(e.g. HTML) are human-readable.
Ø The language uses tags to define
what manipulation has to be done on the text.
v HTML
Table: -
Ø HTML table tag is used to
display data in tabular form (row * column).
Ø We can create a table to display
data in tabular form, using <table>
element, with the help of <tr>
,<td>, and <th> elements.
Ø In Each table, table row is
defined by <tr> tag, table
header is defined by <th>, and
table data is defined by <td>
tags.
Ø Table tag attributes are border, bgcolor,
background, cell-padding and cell-spacing.
i)
border attribute is used to specify border to the table.
ii)
bgcolor attribute is used
to set the background color for whole table or just for a cell.
iii)
Background attribute is
used to set the background image for whole table or just for a cell.
iv)
cellpadding and cellspacing are used to adjust the
white space in the table cells. The cellspacing attribute defines space between
table cells, while cellpadding represents the distance between cell borders and
the content within a cell.
Ø Table data <td> attributes are rowspan and colspan.
i)
colspan attribute
is used to merge two or more columns into a single column.
ii)
rowspan is used
merge two or more rows.
HTML Table Tags:-
|
Tag |
Description |
|
<table> |
It defines
a table. |
|
<tr> |
It defines
a row in a table. |
|
<th> |
It defines
a header cell in a table. |
|
<td> |
It defines
a cell in a table. |
|
<caption> |
It defines
the table caption. |
Output:-
Example2:-
Output:-
v HTML
Lists:-
Ø HTML Lists are used to specify
lists of information.
Ø All lists may contain one or more
list elements.
Ø There are three different types
of HTML lists:
1.
Ordered List
(ol).
2.
Unordered
List (ul).
3.
Definition
List (dl).
Ø We can create a list inside another
list, which will be termed as nested List.
1)
Ordered List:-
Ø An Ordered List is also called as
Numbered List because all the list
items are marked with numbers by default.
Ø The ordered list starts with <ol> tag and the list items start
with <li> tag.
Ø Ordered lists
are used when the order of the list's items is important.
Ø We can use type attribute for <ol> tag to specify the type of
numbering you like. By default, it is a number.
Ø We
can use ordered list to represent items either in numerical order format or
alphabetical order format, or any format where an order is emphasized.
Ø There
can be different types of numbered list: Numeric Number (1, 2, 3), Capital Roman Number (I II III), Small
Roman Number (i ii iii), Capital Alphabet (A B C), Small Alphabet (a b c).
<ol type = "1"> - Default-Case Numerals.
<ol type = "I"> - Upper-Case Numerals.
<ol type = "i"> - Lower-Case Numerals.
<ol type = "A"> - Upper-Case Letters.
<ol type = "a"> - Lower-Case Letters.
Ø The numbering of
items in an ordered list typically starts with 1. However, if we want to change
that we can use the start attribute.
<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.
Example:-
1)
Unordered List:- or Bulleted List
Ø An unordered list
is a collection of related items that have no special order or sequence.
Ø All the list items are marked
with bullets. It is also known as bulleted
list.
Ø The Unordered list starts with <ul> tag and list items start
with the <li> tag.
Ø The list items
are marked with bullets i.e small black circles by default.
Ø We can use unordered list where
we do not need to display items in any particular order.
Ø There can be 3 types of bulleted
list:
·
disc
·
circle
·
square
Ø To represent different ordered lists,
there are 4 types of attributes in <ul>
tag.
<ul type = “disc”> - The list items are marked with circle filled with
black color.
<ul type = “circle”> - The
list items are marked with circles.
<ul type = “square”> - The list items are marked with squares.
Example:-