Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
16 views3 pages

Start Declare Create Add Open Create Create Create Create Close All The Tags

The document provides an HTML program that demonstrates the use of lists, including ordered, unordered, and nested lists, as well as a definition list. It outlines the algorithm for creating the program and includes the complete HTML code. The output displays various types of lists with example items and definitions.

Uploaded by

devan.bharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Start Declare Create Add Open Create Create Create Create Close All The Tags

The document provides an HTML program that demonstrates the use of lists, including ordered, unordered, and nested lists, as well as a definition list. It outlines the algorithm for creating the program and includes the complete HTML code. The output displays various types of lists with example items and definitions.

Uploaded by

devan.bharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Lists, Links and Images


a. Write a HTML program, to explain the working of lists.

ALGORITHM :

1. Start the program.

2. Declare the HTML document <!DOCTYPE html>.

3. Create the <html> tag

4. Add the document's metadata within the <head> tag:

5. Open the <body> tag to start the content under the html tag.

6. Create the main heading <h1> with the text "List Example".

7. Create an ordered list section using <ol>

8. Create an unordered list section using <ul>


9. Create a nested lists section.
10. Close all the tags.

11. End of the program.

PROGRAM :

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>List Example</title>
</head>
<body>
<h1>List Example</h1>

<!-- Ordered List -->


<h2>Ordered List</h2>
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

<!-- Unordered List -->


<h2>Unordered List</h2>
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>

<!-- Nested Lists -->


<h2>Nested Lists</h2>
<ul>
<li>First item
<ul>
<li>Subitem 1</li>
<li>Subitem 2</li>
</ul>
</li>
<li>Second item
<ol>
<li>Subitem 1</li>
<li>Subitem 2</li>
</ol>
</li>
<li>Third item</li>
</ul>

<!-- Definition List -->


<h2>Definition List</h2>
<dl>
<dt>HTML</dt>
<dd>A markup language for creating web pages.</dd>
<dt>CSS</dt>
<dd>A style sheet language used for describing the presentation of a document written
in HTML.</dd>
<dt>JavaScript</dt>
<dd>A programming language commonly used in web development.</dd>
</dl>
</body>
</html>

OUTPUT :
List Example
Ordered List
1. First item
2. Second item
3. Third item
Unordered List
 First item
 Second item
 Third item
Nested Lists
 First item
o Subitem 1
o Subitem 2
 Second item
1. Subitem 1
2. Subitem 2
 Third item
Definition List
HTML
A markup language for creating web pages.
CSS
A style sheet language used for describing the presentation of a document written in HTML.
JavaScript
A programming language commonly used in web development.

You might also like