Skip to main content

LIST TAG




List tag





HTML lists are used to organize and structure content on a web page. There are two types of lists in HTML: ordered and unordered.

An ordered list is represented by the <ol> tag, and each list item is represented by the <li> tag. The items in an ordered list are numbered, and the numbers are automatically generated by the browser.

Here's an example of an ordered list:

<ol>

<li>Item 1</li>

<li>Item 2</li>

<li>Item 3</li>

</ol>



This will be rendered as:

Item 1
Item 2
Item 3


An unordered list is represented by the <ul> tag, and each list item is represented by the <li> tag. The items in an unordered list are bullet points, and the bullet points are automatically generated by the browser.

Here's an example of an unordered list:

<ul>

<li>Item 1</li>

<li>Item 2</li>

<li>Item 3</li>

</ul>

This will be rendered as:

Item 1
Item 2
Item 3


You can also nest lists within lists. For example, you can have an unordered list within an ordered list, or vice versa.

Here's an example of a nested list:

<ol>

<li>Parent Item 1

<ul>

<li>Child Item 1</li>

<li>Child Item 2</li>

</ul>

</li>

<li>Parent Item 2

<ol>

<li>Child Item 1</li>

<li>Child Item 2</li>

</ol>

</li>

</ol>

This will be rendered as:

Parent Item 1
Child Item 1
Child Item 2
Parent Item 2
Child Item 1
Child Item 2


You can also style lists with CSS, such as changing the bullet points or numbers, and customizing the spacing between list items.

In conclusion, lists are an essential element in HTML, that allow you to organize and structure your content in a clear and meaningful way. With ordered and unordered lists, and the ability to nest lists, you can create complex and dynamic layouts for your web pages.

Comments

Popular posts from this blog

HTML Element

HTML Element HTMl Element क्या है – What is an HTML Element? यह प्रश्न हमेशा ही Confuse करता है. खासततौर पर नये-नये Programmers तो HTML Elements के बारे में Confused ही रहते है. इसी Confusion को दूर करने के लिये हमने यह Lesson तैयार किया है. इस Lesson में हम आपको HTML Element क्या है? HTML Element और HTML Tag में अंतर क्या है – Different between HTML Tag and HTML Element? HTML Element के प्रकार – Types of HTML Elements? आदि के बारे में जानकारी देंगे. Table of Content HTML Element क्या है – What is an HTML Element?

Clock Using Html & Js

CLOCK : : Code for this clock <! DOCTYPE html > < html lang = " en " > < head >     < meta charset = " UTF-8 " >     < meta http-equiv = " X-UA-Compatible " content = " IE=edge " >     < meta name = " viewport " content = " width=device-width, initial-scale=1.0 " >     < title > Document </ title > </ head > < style >     body {         background-color : black ;         width : 98 vw ;         height : 95 vh ;         border : 4 px double cornflowerblue ;     }     . heading {         text-align : center ;         margin-top : 10 px ;         font-size : 70 px ;         color : crimson ;     }     . heading img {         height : 50 px ;         width : 60 px ;     }     . time {         text-align : center ;         color : crimson ;         font-size : 100 px ;         padding-top : 70 px ;     }     .