<sub>
This tag is used for representing subscript
Example:
<html>
<head>
<title>example of subscript</title>
</head>
<body>
<font face="Arial"
size="3"><center>log<sub>10</sub></center</font>
</body>
</html>
Output:
<sup>
This tag represents superscript
Example:
<html>
<head>
<title>example of subscript</title>
</head>
<body>
<font face="Arial" size="3"><center>(a
+b)<sup>2</sup>=a<sup>2</sup>+2ab
+b<sup>2</sup></center></font>
</body>
</html>
Output:
Working with lists
List represents sequence of values/data
HTML supports 3 types of list
1. Unordered List <ul>..</ul>
2. Ordered List <ol>..</ol>
3. Definition List <dl>…</dl>
Unordered list
In unordered list, list of values are represented using bullets
Unordered list is represented using <ul>..</ul>
The list of elements/values are represented using <li>..</li>
Syntax:
<ul>
<li>text</li>
<li>text</li>
<li>text</li>
</ul>
Example:
<html>
<head>
<title>Unordered List Example </title>
</head>
<body bgcolor="yellow">
<h2>Fullstack Python </h2>
<ul>
<h2>
<li>Python</li>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Bootstrap</li>
<li>JQuery</li>
<li>Django</li>
<li>RestAPI</li>
<li>Flask</li>
<li>Projects</li>
</h2>
</ul>
</body>
</html>
Output:
Nested List
List within list is called nested list
Example:
<html>
<head>
<title>Unordered List Example </title>
</head>
<body bgcolor="yellow">
<h2>Fullstack Python </h2>
<ul>
<h2>
<li>Python</li>
<ul>
<li>CorePython</li>
<li>Adv.Python</li>
</ul>
<li>HTML</li>
<ul>
<li>HTML Basics</li>
<li>HTML Advanced</li>
</ul>
<li>CSS</li>
<li>JavaScript</li>
<li>Bootstrap</li>
<li>JQuery</li>
<li>Django</li>
<li>RestAPI</li>
<li>Flask</li>
<li>Projects</li>
</h2>
</ul>
</body>
</html>
Output:
Ordered List
Ordered list display list values with numbers or alphabets
By default ordered list, display list with numbers
<ol> tag is used to represent ordered list
List of values are represented using <li> tag
Syntax:
<ol>
<li>text</li>
<li>text</li>
<li>text</li>
</ol>
Example:
<html>
<head>
<title>Example of ordered list</title>
</head>
<body bgcolor=cyan>
<h2>India 20-20 Team</h2>
<font face="Arial" size="3" color="red">
<ol>
<li>Rohit Sharma(C)</li>
<li>Rahul</li>
</ol>
</font>
</body>
</html>
Output:
Nested Ordered List
Defining list inside list is called nested list
Example:
<html>
<head>
<title>Ordered List Example </title>
</head>
<body bgcolor=yellow>
<h2>Content</h2>
<font face="Arial" size="4">
<ol>
<li>C++ Training Overview </li>
<ol>
<li>C++ Training Course Objective </li>
<li>C++ Training Course Duration </li>
</ol>
</ol>
</font>
</body>
</html>
Output:
Ordered list and unordered list is having attribute or properties which
defines the characteristics of ordered list and unordered list