Nested Lists
Send Feedback
Write HTML code that centers an h1 element with the content "My name is: YourName." The text should be underlined and in italics using HTML. Next, a line should be given below it. After that, nested lists with the specified bullet styling should be created, as shown below. Additionally, your favorite books, writers, subjects, and fields that you wish to explore should be added to the nested lists.
Give the following bullet styling to the unordered lists:
- Unordered list-1: "square"
- Unordered list-: "square"
- Unordered nested list for list-1: "disc"
- Unordered nested list for list-2: "circle"
- Ordered list-1: "I"
- Ordered list-2: "I"
- Ordered nested list for list-1: "a"
- Ordered nested list for list-2 : "1"
code for this question
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<center>
<h1>
<i><u>My Name is YourName</u></i>
</h1>
</center>
<hr />
<ul type="square">
<li>
<h2>My favorite books</h2>
<ul type="disc">
<li>Harry Potter</li>
<li>The God of Small Things</li>
<li>The Prophet</li>
</ul>
</li>
<li>
<h2>My favorite writers</h2>
<ul type="circle">
<li>JK Rowling</li>
<li>Arundhati Roy</li>
<li>Kahlil Gibran</li>
</ul>
</li>
</ul>
<ol type="I">
<li>
<h2>My favorite subjects</h2>
<ol type="a">
<li>Data Structures and Algorithms</li>
<li>Operating System</li>
<li>DBMS</li>
</ol>
</li>
<li>
<h2>Online courses I wish to explore</h2>
<ol start="4">
<li>Frontend using HTML, CSS, JS</li>
<li>Frontend using React.js</li>
<li>Backend using Node.js</li>
</ol>
</li>
</ol>
</body>
</html>
thank u so much
Comments
Post a Comment