OL TAG- This type of list are Ordered or Numbered list and these are marked by tag <OL> and </OL> and <li> to write list items.
<HTML><HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
<OL>
<li> Apple
<li> Mango
<li> Banana
</OL>
</BODY>
</HTML>
Attributes of OL Tag
UNIT-205
HTML Fundamentals
HTML Elements
</BODY>
</HTML>
Output:
Attributes of OL Tag
- Type
- Start
Type- By using this attribute of <OL> tag we can specify the type of ordered list. By using following values (A, a, I, i, 1).
A - for numbering with capital letters
a - for numbering with lower case letters
I - for numbering with capital Roman numbers
i - for numbering with lower case Roman numbers
1 - for numbering with common Arabic numbers
a - for numbering with lower case letters
I - for numbering with capital Roman numbers
i - for numbering with lower case Roman numbers
1 - for numbering with common Arabic numbers
<HTML>
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
<OL type="A">
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
<OL type="A">
<li> Apple
<li> Mango
<li> Banana
</OL>
<OL type="a">
</HTML>
<li> Apple
<li> Mango
<li> Banana
</OL>
<OL type="I">
</BODY><li> Apple
<li> Mango
<li> Banana
</OL>
<OL type="i">
<li> Apple
<li> Mango
<li> Banana
</OL>
<OL type="1">
<li> Apple
<li> Mango
<li> Banana
</OL>
</HTML>
Output:
Start- By using this attribute of <OL> tag we can change beginning value of list item.
If we want to start numbering list at 5 then we can use start attribute as follows:-
<HTML>
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
<OL start=5>
<HEAD>
<TITLE>
Title of the document
</TITLE>
</HEAD>
<BODY>
<OL start=5>
<li> Apple
<li> Mango
<li> Banana
</OL>
</BODY>
</HTML>
</HTML>
Output:
UNIT-205
HTML Fundamentals
HTML Elements
- HTML, HEAD, TITLE, BODY
- Attributes of Body Element: Background, Bgcolor, Text, Link, Alink, Vlink, Leftmargin, Topmargin
- FONT (Attributes of FONT Element: Color, Size, Face)
- IMG (Attributes of IMG Element: Src, Width, Height, Alt, Align)
- BASEFONT (Attributes of BASEFONT Element: Color, Size, Face)
- CENTER, BR
- HR (Attributes of HR Element: Width, Align, Noshade, Color, Size, Face)
- H1-H6 (Heading Elements)
- P (Paragraph), B (Bold), I (Italics), U (Underline)
- UL (Unordered List) Attributes of UL: Type
- OL (Ordered List) Attributes of OL: Type, Start
- Linking Internal and External Linking
- A (Anchor) Attributes of A Element: Href, Title, Name, Alt
- TABLE (Attributes of TABLE Element: Td, Th, Tr)