If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
HTML में list information या data की listing करने के लिए किया जाता है। list हमें किसी भी data को show करने का efficient way provide कराती है।
HTML में list 3 तरह की होती है।
Ordered List मतलब जहाँ पर हमें data listing के साथ increasing order में numbers भी show करने हो। इसलिए इसे Numbered list भी कहते हैं।
Ordered List के लिए हम <ol></ol> tags का use करते हैं। और data listing के लिए <li></li> tags का use करते हैं।
File : html_ordered_list.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Ordered List Example</title>
</head>
<body>
<ol>
<li>PHP</li>
<li>Laravel</li>
<li>JavaScript</li>
<li>JQuery</li>
<li>HTML</li>
</ol>
</body>
</html>
Example में आप देख सकते हैं कि जो भी listing हुई है उनके sequence number के साथ हुई है।
Unordered list में सभी data list number न होकर bullets के साथ दिखते हैं। इसलिए इसे Bullet list भी कहते हैं। Unordered List के लिए हम <ul></ul> tags का use करते हैं। और data listing के लिए <li></li> tags का use करते हैं।
File : html_unordered_list.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Unordered List Example</title>
</head>
<body>
<ul>
<li>PHP</li>
<li>Laravel</li>
<li>JavaScript</li>
<li>JQuery</li>
<li>HTML</li>
</ul>
</body>
</html>
HTML Description List भी हम listing के लिए कर सकते हैं , Description List को Definition List भी कहते हैं। इसका structure कुछ directory जैसा होता है।
Description List हम तब use करते हैं जब किसी term के बारे में छोटी - छोटी definition show कराना करना चाहते हो। इसके 3 main tags होते हैं।
File : html_description_list.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Description List Example</title>
</head>
<body>
<dl>
<dt>PHP</dt>
<dd> - A open sources, object oriented, cross platform , server side, scripting language.</dd>
<dt>JavaScript</dt>
<dd> - A open sources, object oriented, cross platform , client side, scripting language</dd>
<dt>jQuery</dt>
<dd> - A JavaScript Library</dd>
<dt>HTML</dt>
<dd> - Hyper Text Markup Language.</dd>
</dl>
</body>
</html>
Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)
Get connected with me. :) LinkedIn Twitter Instagram Facebook