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

Basic HTML Web Page Structure

  Basic HTML Web Page Structure in Hindi.   लेखक   RAVINDRA CHAUBEY HTML Document के Basic Structure की पूरी जानकारी. HTML Document या एक HTML Page का निर्माण HTML Elements और   HTML Tags   से होता है. HTML Page को आप   Webpage   के नाम से भी जानते है. एक अखबार ( Newspaper) या पत्रिका लेख ( Magazine Article) की बनावट के अनुरूप ही एक HTML Page का Structure होता है. एक सामान्य पत्रिका लेख में Headings ( शीर्षक) , Paragraphs, Sub-headings ( उपशीर्षक) आदि होते है. ठीक यही चीजे एक Basic HTML Document में भी होती है.  एक HTML Document में भी शीर्षक , Paragraphs तो होते ही है. इनके अलावा भी कई और चीजे एक HTML Page में होती है. जिनके बारे में नीचे बताया जा रहा है. Table of Content HTML Page Structure  The Doctype Element

HTML सीखने के लिए Right Tools and Skills की जानकारी.

  HTML सीखने के लिए Right Tools and Skills की जानकारी.   लेखक   RAVINDRA CHAUBEY HTML को सीखने के लिए आवश्यक Tools और Skills क़े बारे में जानीए. HTML Codes लिखने के लिए और HTML से Website बनाने से पहले ये जानना जरूरी है कि आप और आपका   Computer  HTML Codes लिखने के लिए बिल्कुल तैयार है ? क्योंकि HTML को लिखने और HTML से Website बनाने के लिए कुछ Technical Skills और Tools की जरूरत पडती है. जिनकी सहायता से HTML Codes को लिखा और देखा जाता है. इस Lesson में हम आपको HTML Codes को लिखने के लिए आवश्यक Technical Skills और कुछ जरूरी Right Tools के बारे में ही बताऐंगे. ताकि यह पक्का हो सके कि आप और आपका कम्प्युटर HTML Codes से   Webpage   बनाने के लिए बिल्कुल तैयार है. इस Lesson को हमने निम्न भागों में विभाजित किया है. Table of Content HTML लिखने के लिए आवश्यक Technical Skills Computer Fundamentals का ज्ञान – Knowledge of Computer Fundamentals Keyboard की जानकारी – Knowledge of Keyboard HTML लिखने के लिए जरुरी Right Tools Text Editor Web Browser 1. ...